update
[unres.git] / source / unres / src_CSA / readrtns_csa.F
index 44709ce..e88a67e 100644 (file)
@@ -73,7 +73,7 @@ c      include 'COMMON.THREAD'
       include 'COMMON.MCM'
 c      include 'COMMON.MAP'
       include 'COMMON.HEADER'
-c      include 'COMMON.CSA'
+      include 'COMMON.CSA'
       include 'COMMON.CHAIN'
 c      include 'COMMON.MUCA'
 c      include 'COMMON.MD'
@@ -138,7 +138,7 @@ C Set up the time limit (caution! The time must be input in minutes!)
       call readi(controlcard,'MAXGEN',maxgen,10000)
       call readi(controlcard,'MAXOVERLAP',maxoverlap,1000)
       call readi(controlcard,"KDIAG",kdiag,0)
-      call readi(controlcard,"RESCALE_MODE",rescale_mode,1)
+      call readi(controlcard,"RESCALE_MODE",rescale_mode,0)
       if(me.eq.king .or. .not. out1file .and. fg_rank.eq.0)
      & write (iout,*) "RESCALE_MODE",rescale_mode
       split_ene=index(controlcard,'SPLIT_ENE').gt.0
@@ -380,7 +380,7 @@ C
         bad(i,1)=scalscp*bad(i,1)
         bad(i,2)=scalscp*bad(i,2)
       enddo
-      call rescale_weights(t_bath)
+c      call rescale_weights(t_bath)
       if(me.eq.king.or..not.out1file)
      & write (iout,22) wsc,wscp,welec,wvdwpp,wbond,wang,wscloc,wtor,
      &  wtor_d,wstrain,wel_loc,wcorr,wcorr5,wcorr6,wsccor,wturn3,
@@ -455,6 +455,9 @@ c        print *,'Finished reading pdb data'
         call contact(.false.,ncont_ref,icont_ref,co)
 
         if (sideadd) then 
+C Following 2 lines for diagnostics; comment out if not needed
+         write (iout,*) "Before sideadd"
+         call intout
          if(me.eq.king.or..not.out1file)
      &    write(iout,*)'Adding sidechains'
          maxsi=1000
@@ -472,6 +475,11 @@ c              call gen_side(iti,theta(i+1),alph(i),omeg(i),fail)
           endif
          enddo
         endif  
+C 10/03/12 Adam: Recalculate coordinates with new side chain positions
+        call chainbuild
+C Following 2 lines for diagnostics; comment out if not needed
+        write (iout,*) "After sideadd"
+        call intout
       endif
 
       if (indpdb.eq.0) then
@@ -577,7 +585,7 @@ C     Juyong:READ read_info
 C     READ fragment information!!
 C     both routines should be in dfa.F file!!
 
-      if (.not. (wdfa_dist.eq.0.0 .and. wdfa_tor.eq.0.0
+      if (.not. (wdfa_dist.eq.0.0 .and. wdfa_tor.eq.0.0 .and.
      &            wdfa_nei.eq.0.0 .and. wdfa_beta.eq.0.0)) then
        call init_dfa_vars
        print*, 'init_dfa_vars finished!'
@@ -800,9 +808,6 @@ c            call gen_rand_conf(itmp,*31)
 
       endif 
 C Generate distance constraints, if the PDB structure is to be regularized. 
-      if (nthread.gt.0) then
-        call read_threadbase
-      endif
       call setup_var
       if (me.eq.king .or. .not. out1file)
      & call intout
@@ -1154,6 +1159,9 @@ c!bankt
       call readi(minimcard,'MINFUN',minfun,maxmin)
       call reada(minimcard,'TOLF',tolf,1.0D-2)
       call reada(minimcard,'RTOLF',rtolf,1.0D-4)
+      print_min_stat=min0(index(minimcard,'PRINT_MIN_STAT'),1)
+      print_min_res=min0(index(minimcard,'PRINT_MIN_RES'),1)
+      print_min_ini=min0(index(minimcard,'PRINT_MIN_INI'),1)
       write (iout,'(/80(1h*)/20x,a/80(1h*))') 
      &         'Options in energy minimization:'
       write (iout,'(4(a,i5),a,1pe14.5,a,1pe14.5)')