Merge branch 'UCGM' of mmka.chem.univ.gda.pl:unres4 into UCGM
[unres4.git] / source / wham / wham_calc.F90
index 81093c8..102e8e4 100644 (file)
         eello_turn6,eel_loc,edihcnstr,etors_d,estr,evdw2_14,esccor, &
         ecationcation,ecation_prot, evdwpp,eespp ,evdwpsb,eelpsb, &
         evdwsb, eelsb, estr_nucl,ebe_nucl,esbloc,etors_nucl,etors_d_nucl,&
-        ecorr_nucl, ecorr3_nucl,epeppho, escpho, epepbase,escbase
+        ecorr_nucl, ecorr3_nucl,epeppho, escpho, epepbase,escbase,ecation_nucl
 
 
       integer :: ind_point(maxpoint),upindE,indE
             escpho=    enetb(48,i,iparm)
             epepbase=  enetb(47,i,iparm)
             escbase=   enetb(46,i,iparm)
-
+            ecation_nucl= enetb(50,i,iparm)
 #ifdef DEBUG
             write (iout,'(3i5,6f5.2,15f12.3)') i,ib,iparm,(ft(l),l=1,6),&
              evdw+evdw_t,evdw2,ees,evdw1,ecorr,eel_loc,estr,ebe,escloc,&
             etot=wsc*evdw+wscp*evdw2+welec*ees &
             +wvdwpp*evdw1 &
             +wang*ebe+wtor*etors+wscloc*escloc &
-            +wstrain*ehpb+nss*ebr+wcorr*ecorr+wcorr5*ecorr5 &
+            +wstrain*ehpb+wcorr*ecorr+wcorr5*ecorr5 &
             +wcorr6*ecorr6+wturn4*eello_turn4 &
             +wturn3*eello_turn3 &
             +wturn6*eello_turn6+wel_loc*eel_loc &
             +wvdwsb*evdwsb+welsb*eelsb+wsbloc*esbloc+wtor_nucl*etors_nucl&
             +wtor_d_nucl*etors_d_nucl+wcorr_nucl*ecorr_nucl+wcorr3_nucl*ecorr3_nucl&
             +wscbase*escbase&
-            +wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho
+            +wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho+wcatnucl*ecation_nucl
+
 
 
 #else
             etot=wsc*evdw+wscp*evdw2 &
             +welec*(ees+evdw1) &
             +wang*ebe+wtor*etors+wscloc*escloc &
-            +wstrain*ehpb+nss*ebr+wcorr*ecorr+wcorr5*ecorr5 &
+            +wstrain*ehpb+wcorr*ecorr+wcorr5*ecorr5 &
             +wcorr6*ecorr6+wturn4*eello_turn4 &
             +wturn3*eello_turn3 &
             +wturn6*eello_turn6+wel_loc*eel_loc+edihcnstr &
             +wvdwsb*evdwsb+welsb*eelsb+wsbloc*esbloc+wtor_nucl*etors_nucl&
             +wtor_d_nucl*etors_d_nucl+wcorr_nucl*ecorr_nucl+wcorr3_nucl*ecorr3_nucl&
             +wscbase*escbase&
-            +wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho
+            +wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho+wcatnucl*ecation_nucl
+
 
 
 #endif
             escpho=    enetb(48,i,iparm)
             epepbase=  enetb(47,i,iparm)
             escbase=   enetb(46,i,iparm)
-
+            ecation_nucl=enetb(50,i,iparm)
 #ifdef SPLITELE
             etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2+ft(1)*welec*ees &
             +wvdwpp*evdw1 &
             +wang*ebe+ft(1)*wtor*etors+wscloc*escloc &
-            +wstrain*ehpb+nss*ebr+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
+            +wstrain*ehpb+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
             +ft(5)*wcorr6*ecorr6+ft(3)*wturn4*eello_turn4 &
             +ft(2)*wturn3*eello_turn3 &
             +ft(5)*wturn6*eello_turn6+ft(2)*wel_loc*eel_loc &
             *ft(1)+wtor_d_nucl*ft(2)*etors_d_nucl+wcorr_nucl*ecorr_nucl &
             +wcorr3_nucl*ecorr3_nucl&
             +wscbase*escbase&
-            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho
+            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho+ wcatnucl*ecation_nucl
 
 #else
             etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2 &
             +ft(1)*welec*(ees+evdw1) &
             +wang*ebe+ft(1)*wtor*etors+wscloc*escloc &
-            +wstrain*ehpb+nss*ebr+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
+            +wstrain*ehpb+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
             +ft(5)*wcorr6*ecorr6+ft(3)*wturn4*eello_turn4 &
             +ft(2)*wturn3*eello_turn3 &
             +ft(5)*wturn6*eello_turn6+ft(2)*wel_loc*eel_loc+edihcnstr &
             *ft(1)+wtor_d_nucl*ft(2)*etors_d_nucl+wcorr_nucl*ecorr_nucl &
             +wcorr3_nucl*ecorr3_nucl&
             +wscbase*escbase&
-            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho
+            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho+ wcatnucl*ecation_nucl
+
 
 #endif
             write (iout,*) "WTF,",etot,potEmin_all(ib,iparm),entfac(i)/beta_h(ib,iparm)
             escpho=    enetb(48,t,iparm)
             epepbase=  enetb(47,t,iparm)
             escbase=   enetb(46,t,iparm)
-
+            ecation_nucl=enetb(50,t,iparm)
 
           do k=0,nGridT
             betaT=startGridT+k*delta_T
             etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2+ft(1)*welec*ees &
             +wvdwpp*evdw1 &
             +wang*ebe+ft(1)*wtor*etors+wscloc*escloc &
-            +wstrain*ehpb+nss*ebr+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
+            +wstrain*ehpb+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
             +ft(5)*wcorr6*ecorr6+ft(3)*wturn4*eello_turn4 &
             +ft(2)*wturn3*eello_turn3 &
             +ft(5)*wturn6*eello_turn6+ft(2)*wel_loc*eel_loc &
             *ft(1)+wtor_d_nucl*ft(2)*etors_d_nucl+wcorr_nucl*ecorr_nucl &
             +wcorr3_nucl*ecorr3_nucl&
             +wscbase*escbase&
-            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho
+            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho &
+            + wcatnucl*ecation_nucl
+
 
             eprim=ftprim(6)*evdw_t+ftprim(1)*welec*ees &
                  +ftprim(1)*wtor*etors+ &
             etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2 &
             +ft(1)*welec*(ees+evdw1) &
             +wang*ebe+ft(1)*wtor*etors+wscloc*escloc &
-            +wstrain*ehpb+nss*ebr+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
+            +wstrain*ehpb+ft(3)*wcorr*ecorr+ft(4)*wcorr5*ecorr5 &
             +ft(5)*wcorr6*ecorr6+ft(3)*wturn4*eello_turn4 &
             +ft(2)*wturn3*eello_turn3 &
             +ft(5)*wturn6*eello_turn6+ft(2)*wel_loc*eel_loc+edihcnstr &
             *ft(1)+wtor_d_nucl*ft(2)*etors_d_nucl+wcorr_nucl*ecorr_nucl &
             +wcorr3_nucl*ecorr3_nucl&
             +wscbase*escbase&
-            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho
+            +ft(1)*wpepbase*epepbase+wscpho*escpho+wpeppho*epeppho&
+            + wcatnucl*ecation_nucl
+
 
             eprim=ftprim(6)*evdw_t+ftprim(1)*welec*(ees+evdw1) &
                 +ftprim(1)*wtor*etors+ &