X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc-HCD-5D%2Funres.F;h=978fa59f764dea9eb45d3e5537505280d2199cb6;hb=f9783c27de185ff3e1d6e874a37a1a8c4d3c93a3;hp=be40e755f42f94135c1bd159f72ca371dd8434a8;hpb=3d04f1babd4ae90f9a0b8f256a2ce0a2c5751f33;p=unres.git diff --git a/source/unres/src-HCD-5D/unres.F b/source/unres/src-HCD-5D/unres.F index be40e75..978fa59 100644 --- a/source/unres/src-HCD-5D/unres.F +++ b/source/unres/src-HCD-5D/unres.F @@ -59,7 +59,8 @@ c call memmon_print_usage() C Read force field parameters and job setup data call readrtns C -c write (iout,*) "After readrtns" + write (iout,*) "After readrtns" + call flush(iout) call cartprint call intout if (me.eq.king .or. .not. out1file) then @@ -86,9 +87,14 @@ C Fine-grain slaves just do energy and gradient components. call ergastulum ! slave workhouse in Latin else #endif + if (indpdb.eq.0 .and. .not.read_cart) call chainbuild + if (indpdb.ne.0 .or. read_cart) then + dc(1,0)=c(1,1) + dc(2,0)=c(2,1) + dc(3,0)=c(3,1) + endif if (modecalc.eq.0) then write (iout,*) "Calling exec_eeval_or_minim" - call cartprint call exec_eeval_or_minim else if (modecalc.eq.1) then call exec_regularize @@ -223,8 +229,8 @@ c include 'COMMON.CONTACTS' common /lbfgstat/ status,niter,nfun #endif integer ilen - if (indpdb.eq.0) call chainbuild - if (indpdb.ne.0) then + if (indpdb.eq.0 .and. .not.read_cart) call chainbuild + if (indpdb.ne.0 .or. read_cart) then dc(1,0)=c(1,1) dc(2,0)=c(2,1) dc(3,0)=c(3,1) @@ -331,16 +337,7 @@ c print *,'Calling MINIMIZE.' call etotal(energy(0)) etot = energy(0) call enerprint(energy(0)) - call intout - if (out_int) call briefout(0,etot) - if (out_cart) then - cartname=prefix(:ilen(prefix))//'.x' - potE=etot - call cartoutx(0.0d0) - endif - if (outpdb) call pdbout(etot,titel(:50),ipdb) - 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 @@ -350,10 +347,13 @@ c print *,'Calling MINIMIZE.' 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.) - call briefout(0,etot) + endif + if (refstr) call rms_nac_nnc(rms,frac,frac_nn,co,.true.) + if (out_int) call briefout(0,etot) + if (out_cart) then + cartname=prefix(:ilen(prefix))//'.x' + potE=etot + call cartoutx(0.0d0) endif if (outpdb) call pdbout(etot,titel(:50),ipdb) if (outmol2) call mol2out(etot,titel(:32))