C approximation. C
C C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
include 'COMMON.GEO'
include 'COMMON.HEADER'
include 'COMMON.CONTROL'
- include 'COMMON.CONTACTS'
+c include 'COMMON.CONTACTS'
include 'COMMON.CHAIN'
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
& 'Mesoscopic molecular dynamics (MD) ',
& 'Not used 13',
& 'Replica exchange molecular dynamics (REMD)'/
+ integer ilen
external ilen
+ integer ierr
c call memmon_print_usage()
call flush(iout)
C
if (modecalc.eq.-2) then
- call test
- stop
+c call test
+c stop
else if (modecalc.eq.-1) then
write(iout,*) "call check_sc_map next"
call check_bond
end
c--------------------------------------------------------------------------
subroutine exec_MD
+ implicit none
include 'DIMENSIONS'
#ifdef MPI
include "mpif.h"
c---------------------------------------------------------------------------
#ifdef MPI
subroutine exec_MREMD
+ implicit none
include 'DIMENSIONS'
#ifdef MPI
include "mpif.h"
include 'COMMON.CONTROL'
include 'COMMON.IOUNITS'
include 'COMMON.REMD'
+ integer i
if (me.eq.king .or. .not. out1file)
& write (iout,*) "Calling chainbuild"
call chainbuild
#endif
c---------------------------------------------------------------------------
subroutine exec_eeval_or_minim
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
#ifdef MPI
include 'mpif.h'
include 'COMMON.GEO'
include 'COMMON.HEADER'
include 'COMMON.CONTROL'
- include 'COMMON.CONTACTS'
+c include 'COMMON.CONTACTS'
include 'COMMON.CHAIN'
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
include 'COMMON.REMD'
include 'COMMON.MD'
include 'COMMON.SBRIDGE'
+ integer i,icall,iretcode,nfun
common /srutu/ icall
- double precision energy(0:n_ene)
+ integer nharp,iharp(4,maxres/3)
+ integer nft_sc
+ logical fail
+ double precision energy(0:n_ene),etot,etota
double precision energy_long(0:n_ene),energy_short(0:n_ene)
+ double precision rms,frac,frac_nn,co
double precision varia(maxvar)
+ double precision time00,time1,time_ene,evals
+#ifdef LBFGS
+ character*9 status
+ integer niter
+ common /lbfgstat/ status,niter,nfun
+#endif
+ integer ilen
if (indpdb.eq.0) call chainbuild
if (indpdb.ne.0) then
dc(1,0)=c(1,1)
time_ene=tcpu()-time00
#endif
write (iout,*) "Time for energy evaluation",time_ene
- print *,"after etotal"
+c print *,"after etotal"
etota = energy(0)
etot =etota
call enerprint(energy(0))
call hairpin(.true.,nharp,iharp)
- print *,'after hairpin'
+c print *,'after hairpin'
call secondary2(.true.)
- print *,'after secondary'
+c print *,'after secondary'
if (minim) then
crc overlap test
+ if (indpdb.ne.0 .and. .not.dccart) then
+ call bond_regular
+ call chainbuild_extconf
+ call etotal(energy(0))
+ write (iout,*) "After bond regularization"
+ call enerprint(energy(0))
+ endif
+
if (overlapsc) then
- print *, 'Calling OVERLAP_SC'
+ write (iout,*) 'Calling OVERLAP_SC'
call overlap_sc(fail)
- print *,"After overlap_sc"
+ write (iout,*) "After overlap_sc"
endif
if (searchsc) then
#endif
call minim_dc(etot,iretcode,nfun)
else
- if (indpdb.ne.0) then
- call bond_regular
- call chainbuild_extconf
- endif
call geom_to_var(nvar,varia)
- print *,'Calling MINIMIZE.'
+c print *,'Calling MINIMIZE.'
#ifdef MPI
time1=MPI_WTIME()
#else
#endif
call minimize(etot,varia,iretcode,nfun)
endif
+#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)
#else
call enerprint(energy(0))
call intout
- call briefout(0,etot)
+ if (out_int) call briefout(0,etot)
+ if (out_cart) then
+ cartname=prefix(:ilen(prefix))//'.x'
+ potE=etot
+ call cartoutx(0.0d0)
+ endif
if (refstr) call rms_nac_nnc(rms,frac,frac_nn,co,.true.)
+#ifdef LBFGS
+ write (iout,'(a,a9)') 'LBFGS return code:',status
+ write (iout,'(a,i20)') '# of energy evaluations:',nfun+1
+ write (iout,'(a,f16.3)')'# of energy evaluations/sec:',evals
+#else
write (iout,'(a,i3)') 'SUMSL return code:',iretcode
write (iout,'(a,i20)') '# of energy evaluations:',nfun+1
write (iout,'(a,f16.3)')'# of energy evaluations/sec:',evals
+#endif
else
print *,'refstr=',refstr
if (refstr) call rms_nac_nnc(rms,frac,frac_nn,co,.true.)
end
c---------------------------------------------------------------------------
subroutine exec_regularize
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
#ifdef MPI
include 'mpif.h'
include 'COMMON.GEO'
include 'COMMON.HEADER'
include 'COMMON.CONTROL'
- include 'COMMON.CONTACTS'
+c include 'COMMON.CONTACTS'
include 'COMMON.CHAIN'
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
include 'COMMON.MD'
include 'COMMON.SBRIDGE'
double precision energy(0:n_ene)
+ double precision etot,rms,frac,frac_nn,co
+ integer iretcode
+#ifdef LBFGS
+ character*9 status
+ integer niter,nfun
+ common /lbfgstat/ status,niter,nfun
+#endif
call gen_dist_constr
call sc_conf
if (outpdb) call pdbout(etot,titel(:50),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
c---------------------------------------------------------------------------
subroutine exec_thread
+ implicit none
include 'DIMENSIONS'
#ifdef MP
include "mpif.h"
end
c---------------------------------------------------------------------------
subroutine exec_MC
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
character*10 nodeinfo
+ integer ipar
double precision varia(maxvar)
#ifdef MPI
include "mpif.h"
end
c---------------------------------------------------------------------------
subroutine exec_mult_eeval_or_minim
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
#ifdef MPI
include 'mpif.h'
- dimension muster(mpi_status_size)
+ integer muster(mpi_status_size)
+ integer ierr,ierror
#endif
include 'COMMON.SETUP'
include 'COMMON.TIME1'
include 'COMMON.GEO'
include 'COMMON.HEADER'
include 'COMMON.CONTROL'
- include 'COMMON.CONTACTS'
+c include 'COMMON.CONTACTS'
include 'COMMON.CHAIN'
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
include 'COMMON.MD'
include 'COMMON.SBRIDGE'
double precision varia(maxvar)
- dimension ind(6)
- double precision energy(0:max_ene)
+ integer i,j,iconf,ind(6)
+ integer n,it,man,nf_mcmf,nmin,imm,mm,nft
+ double precision energy(0:max_ene),ene,etot,ene0
+ double precision rms,frac,frac_nn,co
+ double precision time
logical eof
eof=.false.
#ifdef MPI
end
c---------------------------------------------------------------------------
subroutine exec_checkgrad
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
#ifdef MPI
include 'mpif.h'
include 'COMMON.GEO'
include 'COMMON.HEADER'
include 'COMMON.CONTROL'
- include 'COMMON.CONTACTS'
+c include 'COMMON.CONTACTS'
include 'COMMON.CHAIN'
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
include 'COMMON.FFIELD'
include 'COMMON.REMD'
include 'COMMON.MD'
+ include 'COMMON.QRESTR'
include 'COMMON.SBRIDGE'
+ integer icall
common /srutu/ icall
double precision energy(0:max_ene)
c print *,"A TU?"
goto (10,20,30) icheckgrad
10 call check_ecartint
return
- 20 call check_cartgrad
+ 20 write (iout,*)
+ & "Checking the gradient of Cartesian coordinates disabled."
return
30 call check_eint
return
end
c---------------------------------------------------------------------------
subroutine exec_CSA
+ implicit none
#ifdef MPI
include "mpif.h"
#endif
end
c---------------------------------------------------------------------------
subroutine exec_softreg
+ implicit none
include 'DIMENSIONS'
include 'COMMON.IOUNITS'
include 'COMMON.CONTROL'
- double precision energy(0:max_ene)
+ double precision energy(0:max_ene),etot
+ double precision rms,frac,frac_nn,co
call chainbuild
call etotal(energy(0))
call enerprint(energy(0))
if (.not.lsecondary) then
write(iout,*) 'Calling secondary structure recognition'
- call secondary2(debug)
+ call secondary2(.true.)
else
write(iout,*) 'Using secondary structure supplied in pdb'
endif