--- branches/development/src/nonbonded/GB.cpp 2011/03/18 19:31:52 1544 +++ branches/development/src/nonbonded/GB.cpp 2011/04/08 21:25:19 1545 @@ -267,8 +267,7 @@ namespace OpenMD { if (!initialized_) initialize(); - pair key = make_pair(idat.atype1, idat.atype2); - GBInteractionData mixer = MixingMap[key]; + GBInteractionData mixer = MixingMap[idat.atypes]; RealType sigma0 = mixer.sigma0; RealType dw = mixer.dw; @@ -285,8 +284,8 @@ namespace OpenMD { RealType a, b, g; - bool i_is_LJ = idat.atype1->isLennardJones(); - bool j_is_LJ = idat.atype2->isLennardJones(); + bool i_is_LJ = idat.atypes.first->isLennardJones(); + bool j_is_LJ = idat.atypes.second->isLennardJones(); if (i_is_LJ) { a = 0.0; @@ -367,28 +366,28 @@ namespace OpenMD { } - RealType GB::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { + RealType GB::getSuggestedCutoffRadius(pair atypes) { if (!initialized_) initialize(); RealType cut = 0.0; - if (at1->isGayBerne()) { - GayBerneParam gb1 = getGayBerneParam(at1); + if (atypes.first->isGayBerne()) { + GayBerneParam gb1 = getGayBerneParam(atypes.first); 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)); - } else if (at1->isLennardJones()) { - cut = max(cut, 2.5 * getLJSigma(at1)); + } else if (atypes.first->isLennardJones()) { + cut = max(cut, 2.5 * getLJSigma(atypes.first)); } - if (at2->isGayBerne()) { - GayBerneParam gb2 = getGayBerneParam(at2); + 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)); - } else if (at1->isLennardJones()) { - cut = max(cut, 2.5 * getLJSigma(at2)); + } else if (atypes.second->isLennardJones()) { + cut = max(cut, 2.5 * getLJSigma(atypes.second)); } return cut;