dfa wham and cluster corrections
[unres.git] / source / cluster / wham / src / initialize_p.F
index 06e7b0b..3fe87fc 100644 (file)
@@ -58,6 +58,7 @@ C
       ibond=28
       isccor=29
       jrms=30
+      ientin=38
 C
 C Set default weights of the energy terms.
 C
@@ -155,6 +156,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
@@ -224,14 +228,16 @@ c-------------------------------------------------------------------------
      &   "EVDW SC-SC","EVDW2 SC-p","EES p-p","ECORR4 ","ECORR5 ",
      &   "ECORR6 ","EELLO ","ETURN3 ","ETURN4 ","ETURN6 ",
      &   "EBE bend","ESC SCloc","ETORS ","ETORSD ","EHPB","EVDWPP",
-     &   "ESTR","ESCCOR","EVDW2_14",""/
+     &   "ESTR","ESCCOR","EVDW2_14","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","WBOND","WSCCOR","WSCP14",""/
-      data nprint_ene /18/
+     &   "WHPB","WVDWPP","WBOND","WSCCOR","WSCP14","WDIHCNSTR",
+     &   "WHOMOLOGY","WDFAD","WDFAT","WDFAN","WDFAB"," "," "/
+      data nprint_ene /23/
       data print_order /1,2,3,17,11,12,13,14,4,5,6,7,8,9,10,16,15,18,19,
-     &   20/
+     &   20,21,22,23,24,25/
       end 
 c---------------------------------------------------------------------------
       subroutine init_int_table
@@ -291,6 +297,7 @@ cd   &   (ihpb(i),jhpb(i),i=1,nss)
         do ii=1,nss
           if (ihpb(ii).eq.i+nres) then
             scheck=.true.
+            if (dyn_ss) go to 10
             jj=jhpb(ii)-nres
             goto 10
           endif
@@ -341,7 +348,7 @@ cd      write (iout,*) 'i=',i,' scheck=',scheck,' jj=',jj
           nint_gr(i)=1
           istart(i,1)=i+1
           iend(i,1)=nct
-          ind_scint=int_scint+nct-i
+          ind_scint=ind_scint+nct-i
 #endif
         endif
 #ifdef MPL
@@ -475,6 +482,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,
@@ -498,6 +508,9 @@ C Partition local interactions
       ithet_end=nres
       iphi_start=nnt+3
       iphi_end=nct
+      itau_start=4
+      itau_end=nres
+
 #endif
       return
       end 
@@ -559,3 +572,45 @@ 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'
+#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-nnt+1,idihconstr_start_homo,
+     &  idihconstr_end_homo)
+      idihconstr_start_homo=idihconstr_start_homo+nnt-1
+      idihconstr_end_homo=idihconstr_end_homo+nnt-1
+      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
+      idihconstr_end_homo=lim_dih
+      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