New valence-torsionals completed
[unres.git] / source / unres / src_MD-M / minimize_p.F
index 902dde2..ef24c0c 100644 (file)
@@ -44,14 +44,14 @@ c     DO WHILE (NOT_DONE)
 * controls output                                                       
       iv(19)=2                                                          
 * selects output unit                                                   
-c     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)=0                                                          
+      iv(22)=print_min_res
 * 1 means to print out summary stats                                    
-      iv(23)=0                                                          
+      iv(23)=print_min_stat
 * 1 means to print initial x and d                                      
-      iv(24)=0                                                          
+      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                                  
@@ -141,11 +141,13 @@ C Workers wait for variables and NF, and NFL from the boss
       do while (iorder.ge.0)
 c      write (*,*) 'Processor',fg_rank,' CG group',kolor,
 c     & ' receives order from Master'
+#ifdef MPI
         time00=MPI_Wtime()
         call MPI_Bcast(iorder,1,MPI_INTEGER,king,FG_COMM,IERR)
         time_Bcast=time_Bcast+MPI_Wtime()-time00
         if (icall.gt.4 .and. iorder.ge.0) 
      &   time_order(iorder)=time_order(iorder)+MPI_Wtime()-time00
+#endif
        icall=icall+1
 c      write (*,*) 
 c     & 'Processor',fg_rank,' completed receive MPI_BCAST order',iorder
@@ -261,7 +263,7 @@ c     endif
 cd      print *,'func',nf,nfl,icg
       call var_to_geom(n,x)
       call zerograd
-      call chainbuild
+      call chainbuild_extconf
 cd    write (iout,*) 'ETOTAL called from FUNC'
       call etotal(energia(0))
       call sum_gradient
@@ -295,7 +297,7 @@ c     endif
       icg=mod(nf,2)+1
       call var_to_geom_restr(n,x)
       call zerograd
-      call chainbuild
+      call chainbuild_extconf
 cd    write (iout,*) 'ETOTAL called from FUNC'
       call etotal(energia(0))
       call sum_gradient
@@ -435,14 +437,14 @@ c----------------------------------------------------------
 * controls output                                                       
       iv(19)=2                                                          
 * selects output unit                                                   
-c     iv(21)=iout                                                       
-       iv(21)=0
+      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)=0                                                         
+      iv(22)=print_min_res
 * 1 means to print out summary stats                                    
-      iv(23)=0                                                          
+      iv(23)=print_min_stat
 * 1 means to print initial x and d                                      
-      iv(24)=0                                                         
+      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