X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Funres.F90;h=804f2285145f101b1d776c441ca52aa8562a3ace;hb=9591847f46e1b0163f508e2fda6a240fdc3e4890;hp=2946b66c63768186277c19bb824eeadaf888c533;hpb=0f5304c0d44e3ec4d6538de7d274c4b1a1930049;p=unres4.git diff --git a/source/unres/unres.F90 b/source/unres/unres.F90 index 2946b66..804f228 100644 --- a/source/unres/unres.F90 +++ b/source/unres/unres.F90 @@ -126,7 +126,7 @@ call exec_softreg else if (modecalc.eq.12) then call exec_MD - call exec_checkgrad +! call exec_checkgrad else if (modecalc.eq.14) then call exec_MREMD else @@ -168,8 +168,9 @@ #endif print *,'Start MD' call alloc_MD_arrays - call alloc_compare_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 @@ -228,7 +229,7 @@ ! use MD !include 'COMMON.MD' use energy_data - + use MD_data, only: iset use io_base use geometry, only:chainbuild use energy @@ -248,12 +249,16 @@ 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,dimension(4,nres/3) :: iharp !(4,nres/3)(4,maxres/3) + 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 integer :: j,k + if (iset.eq.0) iset=1 call alloc_compare_arrays if ((indpdb.eq.0).and.(.not.read_cart)) then call chainbuild @@ -298,10 +303,13 @@ 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) @@ -338,7 +346,13 @@ ! 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 @@ -377,6 +391,7 @@ use geometry_data !include 'COMMON.GEO''COMMON.CHAIN' ! use REMD !include 'COMMON.REMD' ! use MD !include 'COMMON.MD' + use regularize_ use compare implicit none @@ -404,7 +419,11 @@ 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 !----------------------------------------------------------------------------- @@ -489,8 +508,11 @@ 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. @@ -818,7 +840,9 @@ ! do j=1,3 ! dc(j,0)=ran_number(-0.2d0,0.2d0) ! enddo +#ifdef UMB usampl=.true. +#endif totT=1.d0 eq_time=0.0d0 call read_fragments @@ -924,7 +948,9 @@ 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 @@ -995,6 +1021,7 @@ ! 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 @@ -1042,14 +1069,17 @@ ! 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