--- branches/development/src/primitives/Bend.cpp 2011/11/22 20:38:56 1665 +++ branches/development/src/primitives/Bend.cpp 2012/07/06 22:01:58 1767 @@ -40,12 +40,14 @@ * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ +#include "config.h" +#include #include "primitives/Bend.hpp" namespace OpenMD { /**@todo still a lot left to improve*/ - void Bend::calcForce(RealType& angle) { + void Bend::calcForce(RealType& angle, bool doParticlePot) { Vector3d pos1 = atom1_->getPos(); Vector3d pos2 = atom2_->getPos(); Vector3d pos3 = atom3_->getPos(); @@ -95,9 +97,11 @@ namespace OpenMD { atom2_->addFrc(force2); atom3_->addFrc(force3); - atom1_->addParticlePot(potential_); - atom2_->addParticlePot(potential_); - atom3_->addParticlePot(potential_); + if (doParticlePot) { + atom1_->addParticlePot(potential_); + atom2_->addParticlePot(potential_); + atom3_->addParticlePot(potential_); + } angle = theta /M_PI * 180.0; }