X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MIN%2Fminimize_p.F;h=72190e8f95b1a06b86ccf607ccb3190e947d0cfa;hb=eb99e7324e8d488f1fc782e2fbd3f1fb41e53f99;hp=5252faa98a7ac22a7041a71d8aed32861564dc9a;hpb=478a9d9a1c99eb3f4bc4ca676ff3162bdd01d633;p=unres.git diff --git a/source/unres/src_MIN/minimize_p.F b/source/unres/src_MIN/minimize_p.F index 5252faa..72190e8 100644 --- a/source/unres/src_MIN/minimize_p.F +++ b/source/unres/src_MIN/minimize_p.F @@ -27,11 +27,10 @@ c common /przechowalnia/ v icall = 1 - - NOT_DONE=.TRUE. - -c DO WHILE (NOT_DONE) - +C Following 3 line for diagnostics; comment out if not needed + write(iout,*) "Enter MINIMIZE liv",liv," lv",lv + write (iout,*) "Coordinates before minimization" + call intout call deflt(2,iv,liv,lv,v) * 12 means fresh start, dont call deflt iv(1)=12 @@ -42,16 +41,16 @@ c DO WHILE (NOT_DONE) if (maxmin.eq.0) maxmin=1000 iv(18)=maxmin * controls output - iv(19)=2 + iv(19)=2 * selects output unit -c iv(21)=iout - iv(21)=iout + iv(21)=0 + if (print_min_ini+print_min_stat+print_min_res.gt.0) iv(21)=iout * 1 means to print out result - iv(22)=1 + iv(22)=print_min_res * 1 means to print out summary stats - iv(23)=1 + iv(23)=print_min_stat * 1 means to print initial x and d - iv(24)=1 + iv(24)=print_min_ini * min val for v(radfac) default is 0.1 v(24)=0.1D0 * max val for v(radfac) default is 4.0 @@ -79,10 +78,6 @@ c v(25)=4.0D0 d(i)=1.0D-1 enddo cd print *,'Calling SUMSL' -c call var_to_geom(nvar,x) -c call chainbuild -c call etotal(energia(0)) -c etot = energia(0) IF (mask_r) THEN call x2xx(x,xx,nvar_restr) call sumsl(nvar_restr,d,xx,func_restr,grad_restr, @@ -94,25 +89,15 @@ c etot = energia(0) etot=v(10) iretcode=iv(1) cd print *,'Exit SUMSL; return code:',iretcode,' energy:',etot -cd write (iout,'(/a,i4/)') 'SUMSL return code:',iv(1) -c call intout -c change=reduce(x) + write (iout,'(/a,i4,a,f15.5/)') 'SUMSL return code:',iv(1), + & " energy",etot call var_to_geom(nvar,x) -c if (change) then -c write (iout,'(a)') 'Reduction worked, minimizing again...' -c else -c not_done=.false. -c endif - call chainbuild -c call etotal(energia(0)) -c etot=energia(0) -c call enerprint(energia(0)) +c call chainbuild +c call etotal(energia(0)) +c etot=energia(0) +c call enerprint(energia(0)) nfun=iv(6) -c write (*,*) 'Processor',MyID,' leaves MINIMIZE.' - -c ENDDO ! NOT_DONE - return end #ifdef MPI @@ -435,14 +420,13 @@ c common /przechowalnia/ v * controls output iv(19)=2 * selects output unit - iv(21)=iout -c iv(21)=0 + if (print_min_ini+print_min_stat+print_min_res.gt.0) iv(21)=iout * 1 means to print out result - iv(22)=1 + iv(22)=print_min_res * 1 means to print out summary stats - iv(23)=1 + iv(23)=print_min_stat * 1 means to print initial x and d - iv(24)=1 + iv(24)=print_min_ini * min val for v(radfac) default is 0.1 v(24)=0.1D0 * max val for v(radfac) default is 4.0