call exec_softreg
else if (modecalc.eq.12) then
call exec_MD
+ call exec_checkgrad
else if (modecalc.eq.14) then
call exec_MREMD
else
subroutine exec_MD
use MPI_data !include 'COMMON.SETUP'
use control_data !include 'COMMON.CONTROL'
- use geometry, only:chainbuild
+ use geometry, only:chainbuild,chainbuild_cart
use MDyn
use io_units !include 'COMMON.IOUNITS'
+ use compare, only:alloc_compare_arrays
! use io_common
implicit none
! include 'DIMENSIONS'
print *,'Start MD'
call alloc_MD_arrays
print *,'After MD alloc'
+ call alloc_compare_arrays
+ print *,'After compare alloc'
if (me.eq.king .or. .not. out1file) &
write (iout,*) "Calling chainbuild"
+ if (extconf) then
call chainbuild
+ else
+ call chainbuild_cart
+ endif
call MD
return
end subroutine exec_MD
use REMD_data !include 'COMMON.REMD'
use geometry, only:chainbuild
use MREMDyn
+ use compare, only:alloc_compare_arrays
implicit none
! include 'DIMENSIONS'
integer :: i
call alloc_MD_arrays
call alloc_MREMD_arrays
-
+ call alloc_compare_arrays
! if (me.eq.king .or. .not. out1file) &
! write (iout,*) "Calling chainbuild"
! call chainbuild
real(kind=8) :: energy_long(0:n_ene),energy_short(0:n_ene)
real(kind=8) :: varia(6*nres) !(maxvar) (maxvar=6*maxres)
real(kind=8) :: time00, evals, etota, etot, time_ene, time1
- integer :: nharp,nft_sc,iretcode,nfun
+ integer :: nharp,nft_sc,iretcode
+#ifndef LBFGS
+ integer :: nfun
+#endif
integer,dimension(4,nres) :: iharp !(4,nres/3)(4,maxres/3)
logical :: fail
real(kind=8) :: rms,frac,frac_nn,co
etota = energy_(0)
etot = etota
call enerprint(energy_)
+ if (.false.) then
call hairpin(.true.,nharp,iharp)
call secondary2(.true.)
+ endif
if (minim) then
!rc overlap test
+ print *,"overlap",searchsc,overlapsc
if (overlapsc) then
print *, 'Calling OVERLAP_SC'
call overlap_sc(fail)
! call check_eint
! call exec_checkgrad !el
endif
+! print *,'SUMSL return code is',iretcode,' eval ',nfun
+#ifdef LBFGS
+ print *,'LBFGS return code is',status,' eval ',nfun
+#else
print *,'SUMSL return code is',iretcode,' eval ',nfun
+#endif
+
#ifdef MPI
evals=nfun/(MPI_WTIME()-time1)
#endif
use geometry_data !include 'COMMON.GEO''COMMON.CHAIN'
! use REMD !include 'COMMON.REMD'
! use MD !include 'COMMON.MD'
+
use regularize_
use compare
implicit none
if (outpdb) call pdbout(etot,titel(:32),ipdb)
if (outmol2) call mol2out(etot,titel(:32))
if (refstr) call rms_nac_nnc(rms,frac,frac_nn,co,.true.)
+#ifdef LBFGS
+ write (iout,'(a,a9)') 'LBFGS return code:',status
+#else
write (iout,'(a,i3)') 'SUMSL return code:',iretcode
+#endif
return
end subroutine exec_regularize
!-----------------------------------------------------------------------------
real(kind=8) :: energy_(0:n_ene)
logical :: eof
real(kind=8) :: etot,ene0
- integer :: mm,imm,nft,n,iconf,nmin,i,iretcode,nfun,it,&
+ integer :: mm,imm,nft,n,iconf,nmin,i,iretcode,it,&
nf_mcmf,j
+#ifndef LBFGS
+ integer :: nfun
+#endif
real(kind=8) :: rms,frac,frac_nn,co,time,ene
eof=.false.
use MD_data
use energy
use MDyn, only:setup_fricmat
+#ifndef FIVEDIAG
use REMD, only:fricmat_mult,ginv_mult
+#endif
#ifdef MPI
include "mpif.h"
#endif
! write (2,*) "After sum_gradient"
! write (2,*) "dimen",dimen," dimen3",dimen3
! call flush(2)
+#ifndef FIVEDIAG
else if (iorder.eq.4) then
call ginv_mult(z,d_a_tmp)
else if (iorder.eq.5) then
! call flush(2)
! write (iout,*) "My chunk of ginv_block"
! call MATOUT2(my_ng_count,dimen3,maxres2,maxers2,ginv_block)
+#endif
else if (iorder.eq.6) then
call int_from_cart1(.false.)
else if (iorder.eq.7) then
call chainbuild_cart
else if (iorder.eq.8) then
call intcartderiv
+#ifndef FIVEDIAG
else if (iorder.eq.9) then
call fricmat_mult(z,d_a_tmp)
+#endif
else if (iorder.eq.10) then
call setup_fricmat
endif