adam's update
[unres.git] / source / unres / src-HCD-5D / initialize_p.F
index 7465eec..c73426c 100644 (file)
@@ -45,16 +45,19 @@ cMS$ATTRIBUTES C ::  proc_proc
       include 'COMMON.MINIM' 
       include 'COMMON.DERIV'
       include 'COMMON.SPLITELE'
+      include 'COMMON.VAR'
 c Common blocks from the diagonalization routines
       integer IR,IW,IP,IJK,IPK,IDAF,NAV,IODA,KDIAG,ICORFL,IXDR
       integer i,idumm,j,k,l,ichir1,ichir2,iblock,m
       double precision rr
       COMMON /IOFILE/ IR,IW,IP,IJK,IPK,IDAF,NAV,IODA(400)
       COMMON /MACHSW/ KDIAG,ICORFL,IXDR
-      logical mask_r
 c      real*8 text1 /'initial_i'/
 
       mask_r=.false.
+      mask_theta=1
+      mask_phi=1
+      mask_side=1
 #ifndef ISNAN
 c NaNQ initialization
       i=-1
@@ -311,6 +314,7 @@ C Initialize the variables responsible for the mode of gradient storage.
 C
       nfl=0
       icg=1
+      sideonly=.false.
 C
 C Initialize constants used to split the energy into long- and short-range
 C components
@@ -441,7 +445,7 @@ c---------------------------------------------------------------------------
       include 'COMMON.TORCNSTR'
       include 'COMMON.IOUNITS'
       include 'COMMON.DERIV'
-      include 'COMMON.CONTACTS'
+      include 'COMMON.CORRMAT'
       integer iturn3_start_all,iturn3_end_all,iturn4_start_all,
      & iturn4_end_all,iatel_s_all,
      & iatel_e_all,ielstart_all,ielend_all,ntask_cont_from_all,
@@ -469,10 +473,12 @@ c---------------------------------------------------------------------------
      & my_ele_int(0:max_fg_Procs-1),my_ele_intt(0:max_fg_Procs)
 C... Determine the numbers of start and end SC-SC interaction 
 C... to deal with by current processor.
+#ifdef FOURBODY
       do i=0,nfgtasks-1
         itask_cont_from(i)=fg_rank
         itask_cont_to(i)=fg_rank
       enddo
+#endif
       lprint=energy_dec
       if (lprint)
      &write (iout,*) 'INIT_INT_TABLE nres=',nres,' nnt=',nnt,' nct=',nct
@@ -890,6 +896,7 @@ c      nlen=nres-nnt+1
         enddo
         call flush(iout)
         endif
+#ifdef FOURBODY
         ntask_cont_from=0
         ntask_cont_to=0
         itask_cont_from(0)=fg_rank
@@ -1090,6 +1097,7 @@ c          call flush(iout)
         call MPI_Group_free(fg_group,ierr)
         call MPI_Group_free(cont_from_group,ierr)
         call MPI_Group_free(cont_to_group,ierr)
+#endif
         call MPI_Type_contiguous(3,MPI_DOUBLE_PRECISION,MPI_UYZ,IERROR)
         call MPI_Type_commit(MPI_UYZ,IERROR)
         call MPI_Type_contiguous(18,MPI_DOUBLE_PRECISION,MPI_UYZGRAD,