correction for idihconstr_end_homo, no differ in wham now
[unres.git] / source / unres / src_MD / initialize_p.F
index d02ebd1..2b88edf 100644 (file)
@@ -37,8 +37,9 @@ cMS$ATTRIBUTES C ::  proc_proc
       include 'COMMON.MINIM' 
       include 'COMMON.DERIV'
       include 'COMMON.SPLITELE'
+      include 'COMMON.MD'
 c Common blocks from the diagonalization routines
-      COMMON /IOFILE/ IR,IW,IP,IJK,IPK,IDAF,NAV,IODA(400)
+      COMMON /IOFILE/ IR,IW,IPP,IJK,IPK,IDAF,NAV,IODA(400)
       COMMON /MACHSW/ KDIAG,ICORFL,IXDR
       logical mask_r
 c      real*8 text1 /'initial_i'/
@@ -245,6 +246,7 @@ C
 #ifndef SPLITELE
       nprint_ene=nprint_ene-1
 #endif
+      usampl=.true.
       return
       end
 c-------------------------------------------------------------------------
@@ -560,6 +562,7 @@ C Partition local interactions
       call int_bounds(nres-2,ithet_start,ithet_end)
       ithet_start=ithet_start+2
       ithet_end=ithet_end+2
+      write (iout,*) "ithet_start",ithet_start," ithet_end",ithet_end
       call int_bounds(nct-nnt-2,iturn3_start,iturn3_end) 
       iturn3_start=iturn3_start+nnt
       iphi_start=iturn3_start+2
@@ -1407,15 +1410,15 @@ c------------------------------------------------------------------------------
       include 'COMMON.CONTROL'
       include 'COMMON.MD'
       include 'COMMON.INTERACT'
-      write(iout,*)"homology_partition: lim_odl=",lim_odl,
-     &   " lim_dih",lim_dih
+cd      write(iout,*)"homology_partition: lim_odl=",lim_odl,
+cd     &   " lim_dih",lim_dih
 #ifdef MPI
-      write (iout,*) "MPI"
+      if (me.eq.king .or. .not. out1file) write (iout,*) "MPI"
       call int_bounds(lim_odl,link_start_homo,link_end_homo)
-      call int_bounds(lim_dih-nnt+1,idihconstr_start_homo,
+      call int_bounds(lim_dih,idihconstr_start_homo,
      &  idihconstr_end_homo)
-      idihconstr_start_homo=idihconstr_start_homo+nnt-1
-      idihconstr_end_homo=idihconstr_end_homo+nnt-1
+      idihconstr_start_homo=idihconstr_start_homo+nnt-1+3
+      idihconstr_end_homo=idihconstr_end_homo+nnt-1+3
       if (me.eq.king .or. .not. out1file) 
      &  write (iout,*) 'Processor',fg_rank,' CG group',kolor,
      &  ' absolute rank',MyRank,
@@ -1427,8 +1430,8 @@ c------------------------------------------------------------------------------
       write (iout,*) "Not MPI"
       link_start_homo=1
       link_end_homo=lim_odl
-      idihconstr_start_homo=nnt
-      idihconstr_end_homo=lim_dih
+      idihconstr_start_homo=nnt+3
+      idihconstr_end_homo=lim_dih+nnt-1+3
       write (iout,*) 
      &  ' lim_odl',lim_odl,' link_start=',link_start_homo,
      &  ' link_end',link_end_homo,' lim_dih',lim_dih,