NAMD
Classes | Macros | Functions
ComputeGBISser.C File Reference
#include "Vector.h"
#include <limits>
#include "InfoStream.h"
#include "Node.h"
#include "PatchMap.h"
#include "PatchMap.inl"
#include "AtomMap.h"
#include "ComputeGBISser.h"
#include "ComputeGBISserMgr.decl.h"
#include "PatchMgr.h"
#include "Molecule.h"
#include "ReductionMgr.h"
#include "ComputeMgr.h"
#include "ComputeMgr.decl.h"
#include "ComputeGBIS.inl"
#include "Debug.h"
#include "SimParameters.h"
#include "WorkDistrib.h"
#include "varsizemsg.h"
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include "ComputeGBISserMgr.def.h"

Go to the source code of this file.

Classes

struct  vect
 
struct  ComputeGBISAtom
 
class  GBISCoordMsg
 
class  GBISForceMsg
 
class  ComputeGBISserMgr
 

Macros

#define BENCH_PERIOD   1000
 
#define GBIS_DEDR_FORCE   1
 
#define GBIS_DEDA_FORCE   1
 
#define GBIS_COUL_FORCE   1
 
#define MIN_DEBUG_LEVEL   3
 
#define COUL_CONST   332.0636
 

Functions

void Phase2_PairSer (BigReal r, BigReal r2, BigReal r_i, BigReal qiqj, BigReal ai, BigReal aj, BigReal epsilon_p_i, BigReal epsilon_s_i, BigReal kappa, int exclij, BigReal scale14, int stat, BigReal &coulEij, BigReal &ddrCoulEij, BigReal &gbEij, BigReal &ddrGbEij, BigReal &dEdai, BigReal &dEdaj)
 
void CalcHPairSer (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal ri0, BigReal rjs, BigReal rj0, BigReal ris, int &dij, int &dji, BigReal &dhij, BigReal &dhji)
 
void CalcDHPairSer (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal ri0, BigReal rjs, BigReal rj0, BigReal ris, int &dij, int &dji, BigReal &dhij, BigReal &dhji)
 
void CalcScaleSer (BigReal r, BigReal t, BigReal c, BigReal &s, BigReal &d)
 
void h0Ser (BigReal r, BigReal r2, BigReal ri, Real rc, BigReal r0, BigReal rs, BigReal &h)
 
void dh0Ser (BigReal r, BigReal r2, BigReal ri, Real rc, BigReal r0, BigReal rs, BigReal &dh)
 
void h1Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
 
void dh1Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
 
void h2Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
 
void dh2Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
 
void h3Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
 
void dh3Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
 
void h4Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
 
void dh4Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
 
void h5Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
 
void dh5Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
 
void h6Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
 
void dh6Ser (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
 
void CalcHSer (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h, int &d)
 
void CalcDHSer (BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh, int &d)
 
void Calc_Coul_PairSer (BigReal r_i, BigReal qiqj, BigReal epsilon_p_i, int exclij, BigReal scale14, BigReal &coulE, BigReal &ddrCoulE)
 
void Calc_dEdr_PairSer (BigReal r, BigReal r2, BigReal qiqj, BigReal ai, BigReal aj, BigReal kappa, BigReal epsilon_p_i, BigReal epsilon_s_i, BigReal &aiaj, BigReal &expr2aiaj4, BigReal &fij, BigReal &f_i, BigReal &expkappa, BigReal &Dij, BigReal &gbE, BigReal &ddrGbE)
 
void Calc_dEda_PairSer (BigReal r2, BigReal ai, BigReal aj, BigReal qiqj, BigReal kappa, BigReal aiaj, BigReal expkappa, BigReal expr2aiaj4, BigReal fij, BigReal f_i, BigReal Dij, BigReal epsilon_s_i, BigReal &dEdai, BigReal &dEdaj)
 

Macro Definition Documentation

#define BENCH_PERIOD   1000

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 22 of file ComputeGBISser.C.

Referenced by ComputeGBISserMgr::recvCoord().

#define COUL_CONST   332.0636

Definition at line 59 of file ComputeGBISser.C.

#define GBIS_COUL_FORCE   1

Definition at line 27 of file ComputeGBISser.C.

#define GBIS_DEDA_FORCE   1

Definition at line 26 of file ComputeGBISser.C.

#define GBIS_DEDR_FORCE   1

Definition at line 25 of file ComputeGBISser.C.

#define MIN_DEBUG_LEVEL   3

Definition at line 45 of file ComputeGBISser.C.

Function Documentation

void Calc_Coul_PairSer ( BigReal  r_i,
BigReal  qiqj,
BigReal  epsilon_p_i,
int  exclij,
BigReal  scale14,
BigReal coulE,
BigReal ddrCoulE 
)
inline

Definition at line 1183 of file ComputeGBISser.C.

References EXCHCK_FULL, and EXCHCK_MOD.

1191  {
1192  if (exclij != EXCHCK_FULL) {//not excluded
1193  //calculate Coulomb Energy
1194  coulE = -qiqj*epsilon_p_i*r_i;
1195 
1196  //calculate Coulomb Force
1197  if (exclij == EXCHCK_MOD)
1198  coulE *= scale14;
1199  ddrCoulE = -r_i*coulE;
1200  } else {
1201  coulE = 0;
1202  ddrCoulE = 0;
1203  }
1204 }
#define EXCHCK_MOD
Definition: Molecule.h:87
#define EXCHCK_FULL
Definition: Molecule.h:86
void Calc_dEda_PairSer ( BigReal  r2,
BigReal  ai,
BigReal  aj,
BigReal  qiqj,
BigReal  kappa,
BigReal  aiaj,
BigReal  expkappa,
BigReal  expr2aiaj4,
BigReal  fij,
BigReal  f_i,
BigReal  Dij,
BigReal  epsilon_s_i,
BigReal dEdai,
BigReal dEdaj 
)
inline

Definition at line 1255 of file ComputeGBISser.C.

Referenced by Phase2_PairSer().

1270  {
1271 
1272  BigReal tmp_dEda = 0.5*qiqj*f_i*f_i
1273  *(kappa*epsilon_s_i*expkappa-Dij*f_i)
1274  *(aiaj+0.25*r2)*expr2aiaj4;//0
1275  dEdai = tmp_dEda/ai;
1276  dEdaj = tmp_dEda/aj;
1277 }
double BigReal
Definition: common.h:114
void Calc_dEdr_PairSer ( BigReal  r,
BigReal  r2,
BigReal  qiqj,
BigReal  ai,
BigReal  aj,
BigReal  kappa,
BigReal  epsilon_p_i,
BigReal  epsilon_s_i,
BigReal aiaj,
BigReal expr2aiaj4,
BigReal fij,
BigReal f_i,
BigReal expkappa,
BigReal Dij,
BigReal gbE,
BigReal ddrGbE 
)
inline

Definition at line 1210 of file ComputeGBISser.C.

Referenced by Phase2_PairSer().

1227  {
1228  //allocate local variables
1229  BigReal aiaj4,ddrDij,ddrf_i,ddrfij;
1230 
1231  //calculate GB energy
1232  aiaj = ai*aj;
1233  aiaj4 = 4*aiaj;
1234  expr2aiaj4 = exp(-r2/aiaj4);
1235  fij = sqrt(r2+aiaj*expr2aiaj4);
1236  f_i = 1/fij;
1237  if (kappa > 0)
1238  expkappa = exp(-kappa*fij);
1239  else
1240  expkappa = 1.0;
1241  Dij = epsilon_p_i - expkappa*epsilon_s_i;//dielectric term
1242  gbE = qiqj*Dij*f_i;
1243 
1244  //calculate energy derivatives
1245  ddrfij = r*f_i*(1 - 0.25*expr2aiaj4);
1246  ddrf_i = -ddrfij*f_i*f_i;
1247  ddrDij = kappa*expkappa*ddrfij*epsilon_s_i;
1248  ddrGbE = qiqj*(ddrDij*f_i+Dij*ddrf_i);
1249 }
double BigReal
Definition: common.h:114
void CalcDHPairSer ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  ri0,
BigReal  rjs,
BigReal  rj0,
BigReal  ris,
int &  dij,
int &  dji,
BigReal dhij,
BigReal dhji 
)
inline

Definition at line 1155 of file ComputeGBISser.C.

References CalcDHSer().

1168  {
1169  CalcDHSer(r,r2,ri,rc,ri0,rjs,dhij,dij);//hij
1170  CalcDHSer(r,r2,ri,rc,rj0,ris,dhji,dji);//hji
1171 }
void CalcDHSer(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh, int &d)
void CalcDHSer ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal dh,
int &  d 
)
inline

Definition at line 1120 of file ComputeGBISser.C.

References dh0Ser(), dh1Ser(), dh2Ser(), dh3Ser(), dh4Ser(), dh5Ser(), and dh6Ser().

Referenced by CalcDHPairSer().

1121  {
1122  if( r <= rc - rs && r > 4*rs ) {//II
1123  dh2Ser(r,r2,ri,rc,r0,rs,dh); d = 2;
1124  } else if (r <= rc + rs && r > rc - rs) {//I
1125  dh1Ser(r,r2,ri,rc,r0,rs,dh); d = 1;
1126  } else if (r > rc + rs) {//0
1127  dh0Ser(r,r2,ri,rc,r0,rs,dh); d = 0;
1128  } else if( r <= 4*rs && r > r0 + rs ) {//III
1129  dh3Ser(r,r2,ri,rc,r0,rs,dh); d = 3;
1130  } else if ( r <= r0 + rs && r > (r0>rs?r0-rs:rs-r0) ) {//IV
1131  dh4Ser(r,r2,ri,rc,r0,rs,dh); d = 4;
1132  } else if (r0 < rs ) {//V
1133  dh5Ser(r,r2,ri,rc,r0,rs,dh); d = 5;
1134  } else {//VI
1135  dh6Ser(r,r2,ri,rc,r0,rs,dh); d = 6;
1136  }
1137 }
void dh3Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
void dh6Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
void dh2Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
void dh4Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
void dh0Ser(BigReal r, BigReal r2, BigReal ri, Real rc, BigReal r0, BigReal rs, BigReal &dh)
void dh1Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
void dh5Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &dh)
void CalcHPairSer ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  ri0,
BigReal  rjs,
BigReal  rj0,
BigReal  ris,
int &  dij,
int &  dji,
BigReal dhij,
BigReal dhji 
)
inline

Definition at line 1138 of file ComputeGBISser.C.

References CalcHSer().

1151  {
1152  CalcHSer(r,r2,ri,rc,ri0,rjs,hij,dij);//hij
1153  CalcHSer(r,r2,ri,rc,rj0,ris,hji,dji);//hji
1154 }
void CalcHSer(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h, int &d)
void CalcHSer ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal h,
int &  d 
)
inline

Definition at line 1102 of file ComputeGBISser.C.

References h0Ser(), h1Ser(), h2Ser(), h3Ser(), h4Ser(), h5Ser(), and h6Ser().

Referenced by CalcHPairSer().

1103  {
1104  if( r <= rc - rs && r > 4*rs ) {//II
1105  h2Ser(r,r2,ri,rc,r0,rs,h); d = 2;
1106  } else if (r <= rc + rs && r > rc - rs) {//I
1107  h1Ser(r,r2,ri,rc,r0,rs,h); d = 1;
1108  } else if (r > rc + rs) {//0
1109  h0Ser(r,r2,ri,rc,r0,rs,h); d = 0;
1110  } else if( r <= 4*rs && r > r0 + rs ) {//III
1111  h3Ser(r,r2,ri,rc,r0,rs,h); d = 3;
1112  } else if ( r <= r0 + rs && r > (r0>rs?r0-rs:rs-r0) ) {//IV
1113  h4Ser(r,r2,ri,rc,r0,rs,h); d = 4;
1114  } else if (r0 < rs ) {//V
1115  h5Ser(r,r2,ri,rc,r0,rs,h); d = 5;
1116  } else {//VI
1117  h6Ser(r,r2,ri,rc,r0,rs,h); d = 6;
1118  }
1119 }
void h2Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
void h3Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
void h5Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
void h0Ser(BigReal r, BigReal r2, BigReal ri, Real rc, BigReal r0, BigReal rs, BigReal &h)
void h4Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
void h1Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
void h6Ser(BigReal r, BigReal r2, BigReal ri, BigReal rc, BigReal r0, BigReal rs, BigReal &h)
void CalcScaleSer ( BigReal  r,
BigReal  t,
BigReal  c,
BigReal s,
BigReal d 
)
inline

Definition at line 257 of file ComputeGBISser.C.

262  {//output s'(r)
263 
264  if (r <= t) { //[0,trans]
265  s = 1;
266  d = 0;
267  } else if (r < c) { //[trans,cutoff]
268  //precompute
269  BigReal ct = (c-t);
270  BigReal ct_i = 1/ct;
271  BigReal ct_i2 = ct_i*ct_i;
272  //BigReal ct_i4 = ct_i2*ct_i2;
273 
274  BigReal rt = r - t;
275  BigReal rt2 = rt*rt;
276  BigReal omrtct2 = 1-rt2*ct_i2;
277  s = omrtct2*omrtct2;
278 
279  BigReal rc = r - c;
280  d=s*4*rt/(rc*(rt+ct));
281 
282  } else { //[cutoff,infinity]
283  s = 0;
284  d = 0;
285  }
286 }
double BigReal
Definition: common.h:114
void dh0Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
Real  rc,
BigReal  r0,
BigReal  rs,
BigReal dh 
)
inline

Definition at line 991 of file ComputeGBISser.C.

Referenced by CalcDHSer().

992  {
993  dh = 0;
994 }
void dh1Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal dh 
)
inline

Definition at line 1008 of file ComputeGBISser.C.

Referenced by CalcDHSer().

1009  {
1010 
1011  BigReal rci = 1.0/rc;
1012  BigReal rmrs = r-rs;// 4 times
1013  BigReal rmrsi = 1.0/rmrs;
1014  BigReal rmrs2 = rmrs*rmrs;
1015  BigReal rs2 = rs*rs;
1016  BigReal logr = log(rmrs*rci);
1017  BigReal rci2 = rci*rci;
1018  dh = ri*ri*(-0.25*logr - (rc*rc - rmrs2)*(rs2 + r2)*0.125*rci2*rmrsi*rmrsi);
1019 }
double BigReal
Definition: common.h:114
void dh2Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal dh 
)
inline

Definition at line 1027 of file ComputeGBISser.C.

References DA, DB, DC, DD, and DE.

Referenced by CalcDHSer().

1028  {
1029 
1030  BigReal k = rs*ri; k*=k;//k=(rs/r)^2
1031  dh = -rs*ri*ri*ri*k*(DA+k*(DB+k*(DC+k*(DD+k*DE))));
1032 }
#define DA
Definition: ComputeGBIS.inl:37
#define DD
Definition: ComputeGBIS.inl:40
#define DB
Definition: ComputeGBIS.inl:38
#define DC
Definition: ComputeGBIS.inl:39
#define DE
Definition: ComputeGBIS.inl:41
double BigReal
Definition: common.h:114
void dh3Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal dh 
)
inline

Definition at line 1039 of file ComputeGBISser.C.

Referenced by CalcDHSer().

1040  {
1041  BigReal rs2 = rs*rs;
1042  BigReal r2mrs2i = 1.0/(r2-rs2);
1043  dh = -0.25*ri*(2*(r2+rs2)*rs*r2mrs2i*r2mrs2i + ri*log((r-rs)/(r+rs)));
1044 }
double BigReal
Definition: common.h:114
void dh4Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal dh 
)
inline

Definition at line 1058 of file ComputeGBISser.C.

Referenced by CalcDHSer().

1059  {
1060  BigReal ri2 = ri*ri;
1061  BigReal r02 = r0*r0;
1062  BigReal rs2 = rs*rs;
1063  BigReal r0i = 1.0/r0;
1064  BigReal rspri = 1.0/(r+rs);
1065  BigReal logr = log(r0*rspri);
1066  BigReal r02mrs2 = r02-rs2;
1067  BigReal rilogr = ri*logr;
1068  dh = 0.25*( (-0.5+(r2*r02mrs2 - 2*r*rs*rs2+rs2*r02mrs2)
1069  * 0.5*ri2*rspri*rspri)*r0i*r0i - ri*rilogr );
1070 }
double BigReal
Definition: common.h:114
void dh5Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal dh 
)
inline

Definition at line 1082 of file ComputeGBISser.C.

Referenced by CalcDHSer().

1083  {
1084  BigReal rs2 = rs*rs;
1085  BigReal r2mrs2i = 1/(r2-rs2);
1086  BigReal rsr2mrs2i = rs*r2mrs2i;
1087  BigReal rprs = r+rs;
1088  BigReal rmrs = r-rs;
1089  BigReal logr = 0.5*ri*log(-rmrs/rprs);
1090  dh = -0.5*ri*((rs2+r2)*rsr2mrs2i*r2mrs2i+logr );
1091 }
double BigReal
Definition: common.h:114
void dh6Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal dh 
)
inline

Definition at line 1097 of file ComputeGBISser.C.

Referenced by CalcDHSer().

1098  {
1099  dh = 0;
1100 }
void h0Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
Real  rc,
BigReal  r0,
BigReal  rs,
BigReal h 
)
inline

Definition at line 987 of file ComputeGBISser.C.

Referenced by CalcHSer().

988  {
989  h = 0;
990 }
void h1Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal h 
)
inline

Definition at line 996 of file ComputeGBISser.C.

Referenced by CalcHSer().

997  {
998 
999  BigReal rci = 1.0/rc;
1000  BigReal rmrs = r-rs;// 4 times
1001  BigReal rmrsi = 1.0/rmrs;
1002  BigReal rmrs2 = rmrs*rmrs;
1003  BigReal rs2 = rs*rs;
1004  BigReal logr = log(rmrs*rci);
1005  BigReal rci2 = rci*rci;
1006  h = 0.125*ri*(1 + 2*r*rmrsi + rci2*(r2 - 4*rc*r - rs2) + 2*logr);
1007 }
double BigReal
Definition: common.h:114
void h2Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal h 
)
inline

Definition at line 1021 of file ComputeGBISser.C.

References TA, TB, TC, TD, and TE.

Referenced by CalcHSer().

1022  {
1023 
1024  BigReal k = rs*ri; k*=k;//k=(rs/r)^2
1025  h = rs*ri*ri*k*(TA+k*(TB+k*(TC+k*(TD+k*TE))));
1026 }
#define TE
Definition: ComputeGBIS.inl:36
#define TD
Definition: ComputeGBIS.inl:35
#define TA
Definition: ComputeGBIS.inl:32
#define TC
Definition: ComputeGBIS.inl:34
#define TB
Definition: ComputeGBIS.inl:33
double BigReal
Definition: common.h:114
void h3Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal h 
)
inline

Definition at line 1034 of file ComputeGBISser.C.

Referenced by CalcHSer().

1035  {
1036  BigReal r2mrs2i = 1.0/(r2-rs*rs);
1037  h = 0.5 * ( rs*r2mrs2i + 0.5 * log((r-rs)/(r+rs))*ri );
1038 }
double BigReal
Definition: common.h:114
void h4Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal h 
)
inline

Definition at line 1046 of file ComputeGBISser.C.

Referenced by CalcHSer().

1047  {
1048  BigReal ri2 = ri*ri;
1049  BigReal r02 = r0*r0;
1050  BigReal rs2 = rs*rs;
1051  BigReal r0i = 1.0/r0;
1052  BigReal rspri = 1.0/(r+rs);
1053  BigReal logr = log(r0*rspri);
1054  BigReal r02mrs2 = r02-rs2;
1055  BigReal rilogr = ri*logr;
1056  h = 0.25*( r0i*(2-0.5*(r0i*ri*(r2 + r02 - rs2))) - rspri + rilogr );
1057 }
double BigReal
Definition: common.h:114
void h5Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal h 
)
inline

Definition at line 1072 of file ComputeGBISser.C.

Referenced by CalcHSer().

1073  {
1074  BigReal rs2 = rs*rs;
1075  BigReal r2mrs2i = 1/(r2-rs2);
1076  BigReal rsr2mrs2i = rs*r2mrs2i;
1077  BigReal rprs = r+rs;
1078  BigReal rmrs = r-rs;
1079  BigReal logr = 0.5*ri*log(-rmrs/rprs);
1080  h = 0.5*( rsr2mrs2i + 2/r0 + logr );
1081 }
double BigReal
Definition: common.h:114
void h6Ser ( BigReal  r,
BigReal  r2,
BigReal  ri,
BigReal  rc,
BigReal  r0,
BigReal  rs,
BigReal h 
)
inline

Definition at line 1093 of file ComputeGBISser.C.

Referenced by CalcHSer().

1094  {
1095  h = 0;
1096 }
void Phase2_PairSer ( BigReal  r,
BigReal  r2,
BigReal  r_i,
BigReal  qiqj,
BigReal  ai,
BigReal  aj,
BigReal  epsilon_p_i,
BigReal  epsilon_s_i,
BigReal  kappa,
int  exclij,
BigReal  scale14,
int  stat,
BigReal coulEij,
BigReal ddrCoulEij,
BigReal gbEij,
BigReal ddrGbEij,
BigReal dEdai,
BigReal dEdaj 
)
inline

Definition at line 1283 of file ComputeGBISser.C.

References Calc_dEda_PairSer(), and Calc_dEdr_PairSer().

1306  {
1307 
1308  //calculate Coulomb energy and force
1309  //Calc_Coul_Pair(r_i,qiqj,epsilon_p_i,exclij,scale14,coulEij,ddrCoulEij);
1310  coulEij = 0;
1311  ddrCoulEij = 0;
1312 
1313  //calculate GB energy and force
1314  BigReal aiaj,expr2aiaj4,fij,f_i,expkappa,Dij;
1315  Calc_dEdr_PairSer(r,r2,qiqj,ai,aj,kappa,epsilon_p_i,epsilon_s_i,
1316  aiaj,expr2aiaj4,fij,f_i,expkappa,Dij,gbEij,ddrGbEij);
1317 
1318  //calculate dEda
1319  if (doSlow) {
1320  Calc_dEda_PairSer(r2,ai,aj,qiqj,kappa,aiaj,expkappa,expr2aiaj4,
1321  fij,f_i,Dij,epsilon_s_i,dEdai,dEdaj);
1322  }
1323 }
void Calc_dEdr_PairSer(BigReal r, BigReal r2, BigReal qiqj, BigReal ai, BigReal aj, BigReal kappa, BigReal epsilon_p_i, BigReal epsilon_s_i, BigReal &aiaj, BigReal &expr2aiaj4, BigReal &fij, BigReal &f_i, BigReal &expkappa, BigReal &Dij, BigReal &gbE, BigReal &ddrGbE)
void Calc_dEda_PairSer(BigReal r2, BigReal ai, BigReal aj, BigReal qiqj, BigReal kappa, BigReal aiaj, BigReal expkappa, BigReal expr2aiaj4, BigReal fij, BigReal f_i, BigReal Dij, BigReal epsilon_s_i, BigReal &dEdai, BigReal &dEdaj)
double BigReal
Definition: common.h:114