correction for idihconstr_end_homo, no differ in wham now
[unres.git] / source / wham / src / initialize_p.F
index 710496d..8ca4c0b 100644 (file)
@@ -56,6 +56,7 @@ C
       ientout=19
       ibond=28
       isccor=29
+      ientin=38
 C
 C WHAM files
 C
@@ -159,6 +160,9 @@ C Initialize the bridge arrays
        ihpb(i)=0
        jhpb(i)=0
       enddo
+      do i=1,maxres
+        dyn_ss_mask(i)=.false.
+      enddo
 C
 C Initialize timing.
 C
@@ -225,21 +229,20 @@ c-------------------------------------------------------------------------
      &'C','M','F','I','L','V','W','Y','A','G','T',
      &'S','Q','N','E','D','H','R','K','P','X'/
       data potname /'LJ','LJK','BP','GB','GBV'/
-      data ename / 
+      data ename /
      &   "EVDW SC-SC","EVDW2 SC-p","EES p-p","ECORR4 ","ECORR5 ",
      &   "ECORR6 ","EELLO ","ETURN3 ","ETURN4 ","ETURN6 ",
-     &   "EBE bend","ESC SCloc","ETORS ","ETORSD ","EHPB","EVDWPP",
-     &   "EVDW2_14","ESTR","ESCCOR","EDIHC","EVDW_T"/
+     &   "EBE bend","ESC SCloc","ETORS ","ETORSD ","EHPB ","EVDWPP ",
+     &   "ESTR ","EVDW2_14 ","ESCCOR ", " ","EDIHCNSTR","EHOMOLOGY",
+     &   "DFA DIS","DFA TOR","DFA NEI","DFA BET"," "/
       data wname /
      &   "WSC","WSCP","WELEC","WCORR","WCORR5","WCORR6","WEL_LOC",
      &   "WTURN3","WTURN4","WTURN6","WANG","WSCLOC","WTOR","WTORD",
-     &   "WHPB","WVDWPP","WSCP14","WBOND","WSCCOR","WDIHC","WSC"/
-      data ww0 /1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,
-     &    1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,0.4d0,1.0d0,1.0d0,
-     &    0.0d0,0.0/
-      data nprint_ene /21/
-      data print_order /1,2,3,18,11,12,13,14,4,5,6,7,8,9,10,19,
-     &  16,15,17,20,21/
+     &   "WSTRAIN","WVDWPP","WBOND","SCAL14","WSCCOR"," ","WDIHCNSTR",
+     &   "WHOMOLOGY","WDFAD","WDFAT","WDFAN","WDFAB"," "/
+      data nprint_ene /24/
+      data print_order/1,2,3,11,12,13,14,4,5,6,7,8,9,10,19,18,15,17,16,
+     & 21,23,24,25,26,0,0,0/
       end 
 c---------------------------------------------------------------------------
       subroutine init_int_table
@@ -296,6 +299,7 @@ cd    write (iout,*) 'ns=',ns,' nss=',nss,' ihpb,jhpb',
 cd   &   (ihpb(i),jhpb(i),i=1,nss)
       do i=nnt,nct-1
         scheck=.false.
+        if (dyn_ss) go to 10
         do ii=1,nss
           if (ihpb(ii).eq.i+nres) then
             scheck=.true.
@@ -465,7 +469,7 @@ cd        write (iout,*) 'i.gt.nct-iscp'
         endif 
       enddo ! i
 #endif
-      if (lprint) then
+              if (lprint) then
         write (iout,'(a)') 'SC-p interaction array:'
         do i=iatscp_s,iatscp_e
           write (iout,'(i3,2(2x,2i3))') 
@@ -483,6 +487,9 @@ C Partition local interactions
       call int_bounds(nct-nnt-2,iphi_start,iphi_end) 
       iphi_start=iphi_start+nnt+2
       iphi_end=iphi_end+nnt+2
+      call int_bounds(nres-3,itau_start,itau_end)
+      itau_start=itau_start+3
+      itau_end=itau_end+3
       if (lprint) then 
         write (iout,*) 'Processor:',MyID,
      & ' loc_start',loc_start,' loc_end',loc_end,
@@ -506,6 +513,8 @@ C Partition local interactions
       ithet_end=nres
       iphi_start=nnt+3
       iphi_end=nct
+      itau_start=4
+      itau_end=nres
 #endif
       return
       end 
@@ -567,3 +576,47 @@ cd   &  ' nhpb',nhpb,' link_start=',link_start,
 cd   &  ' link_end',link_end
       return
       end
+c------------------------------------------------------------------------------
+      subroutine homology_partition
+      implicit real*8 (a-h,o-z)
+      include 'DIMENSIONS'
+      include 'DIMENSIONS.ZSCOPT'
+      include 'DIMENSIONS.FREE'
+#ifdef MPI
+      include 'mpif.h'
+#endif
+      include 'COMMON.SBRIDGE'
+      include 'COMMON.IOUNITS'
+c      include 'COMMON.SETUP'
+      include 'COMMON.CONTROL'
+      include 'COMMON.CHAIN'
+      include 'COMMON.INTERACT'
+      include 'COMMON.HOMRESTR'
+      write(iout,*)"homology_partition: lim_odl=",lim_odl,
+     &   " lim_dih",lim_dih
+#ifdef MPL
+      call int_bounds(lim_odl,link_start_homo,link_end_homo)
+      call int_bounds(lim_dih,idihconstr_start_homo,
+     &  idihconstr_end_homo)
+      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,
+     &  ' lim_odl',lim_odl,' link_start=',link_start_homo,
+     &  ' link_end',link_end_homo,' lim_dih',lim_dih,
+     &  ' idihconstr_start_homo',idihconstr_start_homo,
+     &  ' idihconstr_end_homo',idihconstr_end_homo
+#else
+      link_start_homo=1
+      link_end_homo=lim_odl
+      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,
+     &  ' idihconstr_start_homo',idihconstr_start_homo,
+     &  ' idihconstr_end_homo',idihconstr_end_homo
+#endif
+      return
+      end