X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=sidebyside;f=source%2Funres%2Funres.F90;h=804f2285145f101b1d776c441ca52aa8562a3ace;hb=9591847f46e1b0163f508e2fda6a240fdc3e4890;hp=4f9d879f808210348a196c1677afd892607f0f81;hpb=545cf9507d923cdf917d80ed079c753702c68840;p=unres4.git diff --git a/source/unres/unres.F90 b/source/unres/unres.F90 index 4f9d879..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 @@ -248,7 +249,10 @@ 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 @@ -342,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 @@ -381,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 @@ -408,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 !----------------------------------------------------------------------------- @@ -493,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. @@ -930,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 @@ -1001,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 @@ -1048,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