pdbread-mult
[unres.git] / source / unres / src-HCD-5D / energy_split-sep.F
index f16bc1b..34a1bd1 100644 (file)
@@ -44,6 +44,13 @@ c        if (fg_rank.eq.0) call int_from_cart1(.false.)
 #endif
       endif
 #ifdef MPI      
+      edfadis=0.0d0
+      edfator=0.0d0
+      edfanei=0.0d0
+      edfabet=0.0d0
+      ehomology_constr=0.0d0
+      Uconst=0.0d0
+      Uconst_back=0.0d0
 c      write(iout,*) "ETOTAL_LONG Processor",fg_rank,
 c     & " absolute rank",myrank," nfgtasks",nfgtasks
 c      call flush(iout)
@@ -111,10 +118,10 @@ C FG slaves receive the WEIGHTS array
           wliptran=weights(22)
           wtube=weights(25)
           wsaxs=weights(26)
-          wdfa_dist=weights_(28)
-          wdfa_tor=weights_(29)
-          wdfa_nei=weights_(30)
-          wdfa_beta=weights_(31)
+          wdfa_dist=weights(28)
+          wdfa_tor=weights(29)
+          wdfa_nei=weights(30)
+          wdfa_beta=weights(31)
         endif
         call MPI_Bcast(dc(1,1),6*nres,MPI_DOUBLE_PRECISION,
      &    king,FG_COMM,IERR)
@@ -137,7 +144,6 @@ c      print *,'Processor',myrank,' nnt=',nnt,' nct=',nct
         call make_pp_vdw_inter_list
       endif
 #endif     
-
 cd    print *,'nnt=',nnt,' nct=',nct
 C
 C Compute the side-chain and electrostatic interaction energy
@@ -231,7 +237,17 @@ c     &" ecorr",ecorr," ecorr5",ecorr5," ecorr6",ecorr6," eturn6",eturn6
       endif
       if ((wcorr4.eq.0.0d0 .and. wcorr.gt.0.0d0) .and. ipot.lt.6) then
          call multibody_hb(ecorr,ecorr5,ecorr6,n_corr,n_corr1)
+      else
+         ecorr=0.0d0
+         ecorr5=0.0d0
+         ecorr6=0.0d0
+         eturn6=0.0d0
       endif
+#else
+         ecorr=0.0d0
+         ecorr5=0.0d0
+         ecorr6=0.0d0
+         eturn6=0.0d0
 #endif
 C 
 C If performing constraint dynamics, call the constraint energy
@@ -340,6 +356,18 @@ c      call flush(iout)
       edfanei=0.0d0
       edfabet=0.0d0
 #endif
+      evdw=0.0d0
+      ees=0.0d0
+      evdw1=0.0d0
+      eel_loc=0.0d0
+      eello_turn3=0.0d0
+      eello_turn4=0.0d0
+      evdw2=0
+      evdw2_14=0
+      ecorr=0.0d0
+      ecorr5=0.0d0
+      ecorr6=0.0d0
+      eturn6=0.0d0
 c      write(iout,*) "ETOTAL_SHORT Processor",fg_rank,
 c     & " absolute rank",myrank," nfgtasks",nfgtasks
 c      call flush(iout)
@@ -526,6 +554,21 @@ c Lipid transfer
       else
         eliptran=0.0d0
       endif
+      if (AFMlog.gt.0) then
+        call AFMforce(Eafmforce)
+      else if (selfguide.gt.0) then
+        call AFMvel(Eafmforce)
+      else 
+        Eafmforce=0.0d0
+      endif
+      if (TUBElog.eq.1) then
+C      print *,"just before call"
+        call calctube(Etube)
+      elseif (TUBElog.eq.2) then
+        call calctube2(Etube)
+      else
+        Etube=0.0d0
+      endif
 
       if (ndih_constr.gt.0) call etor_constr(edihcnstr)
 c      print *,"Processor",myrank," computed Utor"