Merge branch 'devel' into AFM
[unres.git] / source / wham / src-NEWSC / COMMON.EMP
diff --git a/source/wham/src-NEWSC/COMMON.EMP b/source/wham/src-NEWSC/COMMON.EMP
new file mode 100755 (executable)
index 0000000..5a39536
--- /dev/null
@@ -0,0 +1,126 @@
+c! Variable Declarations
+c! Charge of i-th residue, charge of j-th residue,...
+      INTEGER Qi, Qj, Qij, ii, jj, itypi, itypj
+
+c! STUFF FROM EMOMO
+
+c! why do *I* have to declare those guys, when it is used throughout the whole code...
+      REAL*8 evdw, evdw_p, evdw_m
+      double precision xi, yi, zi, ctail(3,2), chead(3,2)
+c! FOLLOWING ARE ***NOT*** in common block!!!
+c! They are here just for their declarations
+      REAL*8 ecl,elj,equad,epol
+      INTEGER istate
+c! intermediates
+      REAL*8 c1, c2, fac, pom
+c! switch in the selector choosing which electrostatic energy/gradient function to call
+      INTEGER isel
+c! sigma factors
+      REAL*8 sig, sig0ij, sig1, sig2
+c! intermediates related to distance
+      REAL*8 rij_shift, rrij, R1, R2, RR1, RR2
+c! intermediates related to angles
+      REAL*8 sinth1sq, sinth2sq
+c! intermediates of Fgb
+      REAL*8 fgb, ee, ee1, ee2, eps0, pis
+
+c! squares of om1, om2 and om12 (those hold cosines of angles
+c! theta)
+      REAL*8 sqom1, sqom2, sqom12
+
+c! Geometry and general stuff
+c! a12sq = ai*aj from fgb which is present in Egbpol/Fgbpol,
+c! Epol/Gpol and others, ee is an intermediate.
+c! three dimensions for X, Y and Z Cartesians
+      REAL*8 a12sq
+
+c! square distance and cartesian distances of polar/charged heads of sidechains
+      REAL*8 Rhead, Rhead_distance(3), Rhead_sq
+c! square distance and cartesian distances of tail(hydrophobic centre of interaction)
+c! of a given pair of sidechains
+      REAL*8 Rtail, Rtail_distance(3)
+c! intermediates used in dXhead/dXtail
+      REAL*8 erhead(3), ertail(3), facd1, facd2, erdxi, erdxj
+
+c! unit vectors used to calculate R's
+      REAL*8 d1sq, d2sq, d1d2
+      REAL*8 d1, d2
+
+c! intermediates (hold different meanining in different places)
+      REAL*8 bat, hawk, eagle, condor, sparrow, rosella
+      REAL*8 tuna(3)
+
+c! holds 1/eps_in - 1/eps_out which appears in EGBpol Makowski et al JPCB 2011
+c! p. 6122
+      REAL*8 eps_inout_fac, eps_in
+
+c! DERIVATIVES
+c! intermediates
+      Real*8 dFdR, dFdL, dFdOM1, dFdOM2, dFdOM12
+c! Kronecker Delta used for dXhead/dXtail derivatives
+      Real*8 kro_delta
+c! Gcl
+      REAL*8 Gelconst
+      REAL*8 dGCLdR, dGCLdOM1, dGCLdOM2, dGCLdOM12
+
+c! Ggbpol
+c! energy
+      REAL*8 Egb, dGGBdFGB, dGGBdR
+      REAL*8 dFGBdR, alphapol1, alphapol2
+
+c! Gpol
+      REAL*8 fgb1, fgb2
+      REAL*8 dPOLdOM1, dPOLdOM2, dPOLdR1, dPOLdR2
+      REAL*8 dFGBdOM1, dFGBdOM2, dFGBdR1, dFGBdR2
+      REAL*8 dPOLdFGB1, dPOLdFGB2, MomoFac1, MomoFac2
+      REAL*8 erhead_tail(3,2)
+
+c! Gisocav
+      REAL*8 Fisocav, dGCVdR
+c! alpha parameters for Fisocav/Gisocav
+      REAL*8 al1, al2, al3, al4, csig
+
+c! Gcav
+c! energy
+      REAL*8 Fcav
+c! alphas from the equation
+      REAL*8 b1, b2, b3, b4
+c! intermediates
+      Real*8 chif, lambf, chilambf
+      REAL*8 top, bot, dtop, dbot, botsq
+      REAL*8 chis1, chis2, chis12
+c! final value
+      REAL*8 dCAVdOM1, dCAVdOM2, dCAVdOM12
+
+c! Gquad stuff
+c! intermediates
+      REAL*8 wqd, w1, w2, beta1
+c! final value
+      REAl*8 dQUADdR, dQUADdOM1, dQUADdOM2, dQUADdOM12
+
+c! Glj
+c! parameter, radial derivative
+      REAL*8 eps_head, dGLJdR
+
+c! Sum of states
+      REAL*8 BetaT, eheadtail, weightbol, sumweight
+c! this thing holds intermediates and final value
+c! (dimensions, gvdw(c/x)(i/j),intermediate(1) or final(2))
+      REAL*8 gheadtail(3,4,2)
+
+c! Now Commonize what we need to
+      COMMON /emp/ Qi, Qj, Qij, ii, jj, itypi, itypj, xi, yi, zi
+     & , sqom1, sqom2, sqom12, chead, ctail
+     & , al1, al2, al3, al4
+     & , b1, b2, b3, b4
+     & , Rhead, Rhead_distance, Rtail, Rtail_distance
+     & , R1, R2, RR1, RR2
+     & , d1sq, d2sq, d1, d2, d1d2
+     & , eps_inout_fac, eps_in, wqd, eps_head, a12sq
+     & , chis1, chis2, chis12, sig1, sig2, sig0ij
+     & , BetaT
+     & , dFdR, dFdL, dFdOM1, dFdOM2, dFdOM12
+     & , dCAVdOM1, dCAVdOM2, dCAVdOM12
+     & , dGCLdOM1, dGCLdOM2, dGCLdOM12
+     & , dPOLdOM1, dPOLdOM2
+     & , dQUADdR, dQUADdOM1, dQUADdOM2, dQUADdOM12
\ No newline at end of file