--- trunk/src/primitives/GhostBend.cpp 2012/08/22 02:28:28 1782 +++ trunk/src/primitives/GhostBend.cpp 2013/12/05 18:19:26 1953 @@ -35,7 +35,7 @@ * * [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). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ @@ -48,9 +48,9 @@ namespace OpenMD { /**@todo still a lot left to improve*/ void GhostBend::calcForce(RealType& angle, bool doParticlePot) { - DirectionalAtom* ghostAtom = static_cast(atom2_); + DirectionalAtom* ghostAtom = static_cast(atoms_[1]); - Vector3d pos1 = atom1_->getPos(); + Vector3d pos1 = atoms_[0]->getPos(); Vector3d pos2 = ghostAtom->getPos(); Vector3d r21 = pos1 - pos2; @@ -93,12 +93,12 @@ namespace OpenMD { // Total force in current bend is zero - atom1_->addFrc(force1); + atoms_[0]->addFrc(force1); ghostAtom->addFrc(-force1); ghostAtom->addTrq( cross(r23, force3) ); if(doParticlePot) { - atom1_->addParticlePot(potential_); + atoms_[0]->addParticlePot(potential_); ghostAtom->addParticlePot(potential_); }