--- branches/development/src/nonbonded/GB.cpp 2011/07/08 20:25:32 1587 +++ branches/development/src/nonbonded/GB.cpp 2012/01/06 19:03:05 1668 @@ -36,7 +36,8 @@ * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). - * [4] Vardeman & Gezelter, in progress (2009). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ #include @@ -239,7 +240,7 @@ namespace OpenMD { mixer.eps0 = sqrt(e1 * e2); RealType er = sqrt(er1 * er2); - RealType ermu = pow(er, (1.0 / mu_)); + RealType ermu = pow(er, (RealType(1.0) / mu_)); RealType xp = (1.0 - ermu) / (1.0 + ermu); RealType ap2 = 1.0 / (1.0 + ermu); @@ -397,18 +398,18 @@ namespace OpenMD { RealType d1 = gb1.GB_d; RealType l1 = gb1.GB_l; // sigma is actually sqrt(2)*l for prolate ellipsoids - cut = max(cut, 2.5 * sqrt(2.0) * max(d1, l1)); + cut = max(cut, RealType(2.5) * sqrt(RealType(2.0)) * max(d1, l1)); } else if (atypes.first->isLennardJones()) { - cut = max(cut, 2.5 * getLJSigma(atypes.first)); + cut = max(cut, RealType(2.5) * getLJSigma(atypes.first)); } if (atypes.second->isGayBerne()) { GayBerneParam gb2 = getGayBerneParam(atypes.second); RealType d2 = gb2.GB_d; RealType l2 = gb2.GB_l; - cut = max(cut, 2.5 * sqrt(2.0) * max(d2, l2)); + cut = max(cut, RealType(2.5) * sqrt(RealType(2.0)) * max(d2, l2)); } else if (atypes.second->isLennardJones()) { - cut = max(cut, 2.5 * getLJSigma(atypes.second)); + cut = max(cut, RealType(2.5) * getLJSigma(atypes.second)); } return cut;