- subroutine WHAM_CALC(islice,*)
+ subroutine WHAM_CALC(islice,*)
! Weighed Histogram Analysis Method (WHAM) code
! Written by A. Liwo based on the work of Kumar et al.,
! J.Comput.Chem., 13, 1011 (1992)
include "COMMON.SBRIDGE"
include "COMMON.PROT"
include "COMMON.ENEPS"
+ include "COMMON.SHIELD"
integer MaxPoint,MaxPointProc
parameter (MaxPoint=MaxStr,
& MaxPointProc=MaxStr_Proc)
& eplus,eminus,logfac,tanhT,tt
double precision etot,evdw,evdw_t,evdw2,ees,evdw1,ebe,etors,
& escloc,ehpb,ecorr,ecorr5,ecorr6,eello_turn4,eello_turn3,
- & eturn6,eel_loc,edihcnstr,etors_d,estr,evdw2_14,esccor
+ & eturn6,eel_loc,edihcnstr,etors_d,estr,evdw2_14,esccor,
+ & eliptran
integer ind_point(maxpoint),upindE,indE
character*16 plik
do t=0,MaxN
htot(t)=0
enddo
+C#define DEBUG
#ifdef MPI
do i=1,scount(me1)
#else
do iparm=1,nParmSet
#ifdef DEBUG
write (iout,'(2i5,21f8.2)') i,iparm,
- & (enetb(k,i,iparm),k=1,21)
+ & (enetb(k,i,iparm),k=1,22)
#endif
call restore_parm(iparm)
#ifdef DEBUG
estr=enetb(18,i,iparm)
esccor=enetb(19,i,iparm)
edihcnstr=enetb(20,i,iparm)
+ eliptran=enetb(22,i,iparm)
+
#ifdef DEBUG
write (iout,'(3i5,6f5.2,14f12.3)') i,ib,iparm,(ft(l),l=1,6),
& evdw+evdw_t,evdw2,ees,evdw1,ecorr,eel_loc,estr,ebe,escloc,
#endif
#ifdef SPLITELE
+ if (shield_mode.gt.0) then
+ etot=ft(1)*wsc*(evdw+ft(6)*evdw_t)+ft(1)*wscp*evdw2
+ & +ft(1)*welec*ees
+ & +ft(1)*wvdwpp*evdw1
+ & +wang*ebe+ft(1)*wtor*etors+wscloc*escloc
+ & +wstrain*ehpb+nss*ebr+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*eturn6+ft(2)*wel_loc*eel_loc
+ & +edihcnstr+ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
+ & +wbond*estr+wliptran*eliptran
+ else
etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2+ft(1)*welec*ees
& +wvdwpp*evdw1
& +wang*ebe+ft(1)*wtor*etors+wscloc*escloc
& +ft(2)*wturn3*eello_turn3
& +ft(5)*wturn6*eturn6+ft(2)*wel_loc*eel_loc
& +edihcnstr+ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
- & +wbond*estr
+ & +wbond*estr+wliptran*eliptran
+ endif
#else
+ if (shield_mode.gt.0) then
+ etot=ft(1)*wsc*(evdw+ft(6)*evdw_t)+ft(1)*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
+ & +ft(5)*wcorr6*ecorr6+ft(3)*wturn4*eello_turn4
+ & +ft(2)*wturn3*eello_turn3
+ & +ft(5)*wturn6*eturn6+ft(2)*wel_loc*eel_loc+edihcnstr
+ & +ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
+ & +wbond*estr+wliptran*eliptran
+ else
etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2
& +ft(1)*welec*(ees+evdw1)
& +wang*ebe+ft(1)*wtor*etors+wscloc*escloc
& +ft(2)*wturn3*eello_turn3
& +ft(5)*wturn6*eturn6+ft(2)*wel_loc*eel_loc+edihcnstr
& +ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
- & +wbond*estr
+ & +wbond*estr+wliptran*eliptran
+ endif
+
#endif
#ifdef DEBUG
write (iout,*) i,iparm,1.0d0/(beta_h(ib,iparm)*1.987D-3),
c write (iout,*) "ftbis",ftbis
betaT=1.0d0/(1.987D-3*betaT)
#ifdef SPLITELE
+ if (shield_mode.gt.0) then
+ etot=ft(1)*wsc*(evdw+ft(6)*evdw_t)+ft(1)*wscp*evdw2
+ & +ft(1)*welec*ees
+ & +ft(1)*wvdwpp*evdw1
+ & +wang*ebe+ft(1)*wtor*etors+wscloc*escloc
+ & +wstrain*ehpb+nss*ebr+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*eturn6+ft(2)*wel_loc*eel_loc
+ & +edihcnstr+ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
+ & +wbond*estr+wliptran*eliptran
+ eprim=ftprim(1)*(ft(6)*evdw_t+evdw)
+C & +ftprim(6)*evdw_t
+ & +ftprim(1)*wscp*evdw2
+ & +ftprim(1)*welec*ees
+ & +ftprim(1)*wvdwpp*evdw1
+ & +ftprim(1)*wtor*etors+
+ & ftprim(3)*wcorr*ecorr+ftprim(4)*wcorr5*ecorr5+
+ & ftprim(5)*wcorr6*ecorr6+ftprim(3)*wturn4*eello_turn4+
+ & ftprim(2)*wturn3*eello_turn3+ftprim(5)*wturn6*eturn6+
+ & ftprim(2)*wel_loc*eel_loc+ftprim(2)*wtor_d*etors_d+
+ & ftprim(1)*wsccor*esccor
+ ebis=ftbis(1)*wsc*(evdw+ft(6)*evdw_t)
+ & +ftbis(1)*wscp*evdw2+
+ & ftbis(1)*welec*ees
+ & +ftbis(1)*wvdwpp*evdw
+ & +ftbis(1)*wtor*etors+
+ & ftbis(3)*wcorr*ecorr+ftbis(4)*wcorr5*ecorr5+
+ & ftbis(5)*wcorr6*ecorr6+ftbis(3)*wturn4*eello_turn4+
+ & ftbis(2)*wturn3*eello_turn3+ftbis(5)*wturn6*eturn6+
+ & ftbis(2)*wel_loc*eel_loc+ftbis(2)*wtor_d*etors_d+
+ & ftbis(1)*wsccor*esccor
+ else
etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2+ft(1)*welec*ees
& +wvdwpp*evdw1
& +wang*ebe+ft(1)*wtor*etors+wscloc*escloc
& +ft(2)*wturn3*eello_turn3
& +ft(5)*wturn6*eturn6+ft(2)*wel_loc*eel_loc
& +edihcnstr+ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
- & +wbond*estr
+ & +wbond*estr+wliptran*eliptran
eprim=ftprim(6)*evdw_t+ftprim(1)*welec*ees
& +ftprim(1)*wtor*etors+
& ftprim(3)*wcorr*ecorr+ftprim(4)*wcorr5*ecorr5+
& ftbis(2)*wturn3*eello_turn3+ftbis(5)*wturn6*eturn6+
& ftbis(2)*wel_loc*eel_loc+ftbis(2)*wtor_d*etors_d+
& ftbis(1)*wsccor*esccor
+ endif
#else
+ if (shield_mode.gt.0) then
+ etot=ft(1)*wsc*(evdw+ft(6)*evdw_t)+ft(1)*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
+ & +ft(5)*wcorr6*ecorr6+ft(3)*wturn4*eello_turn4
+ & +ft(2)*wturn3*eello_turn3
+ & +ft(5)*wturn6*eturn6+ft(2)*wel_loc*eel_loc+edihcnstr
+ & +ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
+ & +wbond*estr+wliptran*eliptran
+ eprim=ftprim(1)*(evdw+ft(6)*evdw_t)
+ & +ftprim(1)*welec*(ees+evdw1)
+ & +ftprim(1)*wtor*etors+
+ & ftprim(1)*wscp*evdw2+
+ & ftprim(3)*wcorr*ecorr+ftprim(4)*wcorr5*ecorr5+
+ & ftprim(5)*wcorr6*ecorr6+ftprim(3)*wturn4*eello_turn4+
+ & ftprim(2)*wturn3*eello_turn3+ftprim(5)*wturn6*eturn6+
+ & ftprim(2)*wel_loc*eel_loc+ftprim(2)*wtor_d*etors_d+
+ & ftprim(1)*wsccor*esccor
+ ebis= ftbis(1)*(evdw+ft(6)*evdw_t)
+ & +ftbis(1)*wscp*evdw2
+ & +ftbis(1)*welec*(ees+evdw1)+ftbis(1)*wtor*etors+
+ & ftbis(3)*wcorr*ecorr+ftbis(4)*wcorr5*ecorr5+
+ & ftbis(5)*wcorr6*ecorr6+ftbis(3)*wturn4*eello_turn4+
+ & ftbis(2)*wturn3*eello_turn3+ftbis(5)*wturn6*eturn6+
+ & ftbis(2)*wel_loc*eel_loc+ftbis(2)*wtor_d*etors_d+
+ & ftprim(1)*wsccor*esccor
+ else
etot=wsc*(evdw+ft(6)*evdw_t)+wscp*evdw2
& +ft(1)*welec*(ees+evdw1)
& +wang*ebe+ft(1)*wtor*etors+wscloc*escloc
& +ft(2)*wturn3*eello_turn3
& +ft(5)*wturn6*eturn6+ft(2)*wel_loc*eel_loc+edihcnstr
& +ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor
- & +wbond*estr
+ & +wbond*estr+wliptran*eliptran
eprim=ftprim(6)*evdw_t+ftprim(1)*welec*(ees+evdw1)
& +ftprim(1)*wtor*etors+
& ftprim(3)*wcorr*ecorr+ftprim(4)*wcorr5*ecorr5+
& ftbis(2)*wturn3*eello_turn3+ftbis(5)*wturn6*eturn6+
& ftbis(2)*wel_loc*eel_loc+ftbis(2)*wtor_d*etors_d+
& ftprim(1)*wsccor*esccor
+
+ endif
+
#endif
weight=dexp(-betaT*(etot-potEmin)+entfac(t))
#ifdef DEBUG
#endif
return
-
+C#undef DEBUG
end