restoring read2sigma code after wrong merge
[unres.git] / source / unres / src_MD / energy_split-sep.F
index 81e4d81..9d0b82f 100644 (file)
@@ -263,7 +263,13 @@ cMS$ATTRIBUTES C ::  proc_proc
       include 'COMMON.CHAIN'
       include 'COMMON.VAR'
       include 'COMMON.LOCAL'
-
+      include 'COMMON.CONTROL'
+#ifndef DFA
+      edfadis=0.0d0
+      edfator=0.0d0
+      edfanei=0.0d0
+      edfabet=0.0d0
+#endif
 c      write(iout,'(a,i2)')'Calling etotal_short ipot=',ipot
 c      call flush(iout)
       if (modecalc.eq.12.or.modecalc.eq.14) then
@@ -395,6 +401,33 @@ C
 C Calculate electrostatic (H-bonding) energy of the main chain.
 C
   107 continue
+#ifdef DFA
+C     BARTEK for dfa test!
+      if (wdfa_dist.gt.0) then 
+         call edfad(edfadis)
+      else
+         edfadis=0.0
+      endif
+c      print*, 'edfad is finished!', edfadis
+      if (wdfa_tor.gt.0) then 
+         call edfat(edfator)
+      else
+         edfator=0.0
+      endif
+c      print*, 'edfat is finished!', edfator
+      if (wdfa_nei.gt.0) then 
+         call edfan(edfanei)
+      else
+         edfanei=0.0
+      endif
+c      print*, 'edfan is finished!', edfanei
+      if (wdfa_beta.gt.0) then 
+         call edfab(edfabet)
+      else
+         edfabet=0.0
+      endif
+c      print*, 'edfab is finished!', edfabet
+#endif
 c
 c Calculate the short-range part of Evdwpp
 c
@@ -426,6 +459,14 @@ C
 C Calculate the virtual-bond torsional energy.
 C
       call etor(etors,edihcnstr)
+c
+c Homology restraints
+c
+      if (constr_homology.ge.1) then
+        call e_modeller(ehomology_constr)
+      else
+        ehomology_constr=0.0d0
+      endif
 C
 C 6/23/01 Calculate double-torsional energy
 C
@@ -467,6 +508,11 @@ C
       energia(21)=esccor
       energia(22)=evdw_p
       energia(23)=evdw_m
+      energia(24)=ehomology_constr
+      energia(25)=edfadis
+      energia(26)=edfator
+      energia(27)=edfanei
+      energia(28)=edfabet
 c      write (iout,*) "ETOTAL_SHORT before SUM_ENERGY"
       call flush(iout)
       call sum_energy(energia,.true.)