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
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
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,
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
* 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