Commit c6ebf6e2 authored by Peter Eastman's avatar Peter Eastman
Browse files

Removed the word "harmonic" from lots of places it didn't belong, including class and method names

parent 58b094ce
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. * * USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/AmoebaHarmonicBondForce.h" #include "openmm/AmoebaBondForce.h"
#include "openmm/AmoebaHarmonicAngleForce.h" #include "openmm/AmoebaAngleForce.h"
#include "openmm/AmoebaHarmonicInPlaneAngleForce.h" #include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/AmoebaPiTorsionForce.h" #include "openmm/AmoebaPiTorsionForce.h"
#include "openmm/AmoebaStretchBendForce.h" #include "openmm/AmoebaStretchBendForce.h"
#include "openmm/AmoebaOutOfPlaneBendForce.h" #include "openmm/AmoebaOutOfPlaneBendForce.h"
......
#ifndef OPENMM_AMOEBA_HARMONIC_ANGLE_FORCE_H_ #ifndef OPENMM_AMOEBA_ANGLE_FORCE_H_
#define OPENMM_AMOEBA_HARMONIC_ANGLE_FORCE_H_ #define OPENMM_AMOEBA_ANGLE_FORCE_H_
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* OpenMMAmoeba * * OpenMMAmoeba *
...@@ -44,21 +44,21 @@ namespace OpenMM { ...@@ -44,21 +44,21 @@ namespace OpenMM {
* is set per-angle. The coefficients of the higher order terms each have a single value that * is set per-angle. The coefficients of the higher order terms each have a single value that
* is set globally. * is set globally.
* *
* To use it, create an AmoebaHarmonicAngleForce object then call addAngle() once for each angle. After * To use it, create an AmoebaAngleForce object then call addAngle() once for each angle. After
* an angle has been added, you can modify its force field parameters by calling setAngleParameters(). * an angle has been added, you can modify its force field parameters by calling setAngleParameters().
*/ */
class OPENMM_EXPORT AmoebaHarmonicAngleForce : public Force { class OPENMM_EXPORT AmoebaAngleForce : public Force {
public: public:
/** /**
* Create an AmoebaHarmonicAngleForce. * Create an AmoebaAngleForce.
*/ */
AmoebaHarmonicAngleForce(); AmoebaAngleForce();
/** /**
* Get the number of harmonic angle stretch terms in the potential function * Get the number of angle stretch terms in the potential function
*/ */
int getNumAngles() const { int getNumAngles() const {
return angles.size(); return angles.size();
...@@ -69,56 +69,56 @@ public: ...@@ -69,56 +69,56 @@ public:
* *
* @param cubicK the cubic force constant for the angle * @param cubicK the cubic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicAngleCubic( double cubicK ); void setAmoebaGlobalAngleCubic( double cubicK );
/** /**
* Get the global cubic term * Get the global cubic term
* *
* @return global cubicK term * @return global cubicK term
*/ */
double getAmoebaGlobalHarmonicAngleCubic( void ) const; double getAmoebaGlobalAngleCubic( void ) const;
/** /**
* Set the global quartic term * Set the global quartic term
* *
* @param quarticK the quartic force constant for the angle * @param quarticK the quartic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicAngleQuartic( double quarticK ); void setAmoebaGlobalAngleQuartic( double quarticK );
/** /**
* Get the global quartic term * Get the global quartic term
* *
* @return global quartic term * @return global quartic term
*/ */
double getAmoebaGlobalHarmonicAngleQuartic( void ) const; double getAmoebaGlobalAngleQuartic( void ) const;
/** /**
* Set the global pentic term * Set the global pentic term
* *
* @param penticK the pentic force constant for the angle * @param penticK the pentic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicAnglePentic( double penticK ); void setAmoebaGlobalAnglePentic( double penticK );
/** /**
* Get the global pentic term * Get the global pentic term
* *
* @return global penticK term * @return global penticK term
*/ */
double getAmoebaGlobalHarmonicAnglePentic( void ) const; double getAmoebaGlobalAnglePentic( void ) const;
/** /**
* Set the global sextic term * Set the global sextic term
* *
* @param sexticK the sextic force constant for the angle * @param sexticK the sextic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicAngleSextic( double sexticK ); void setAmoebaGlobalAngleSextic( double sexticK );
/** /**
* Get the global sextic term * Get the global sextic term
* *
* @return global sextic term * @return global sextic term
*/ */
double getAmoebaGlobalHarmonicAngleSextic( void ) const; double getAmoebaGlobalAngleSextic( void ) const;
/** /**
* Add an angle term to the force field. * Add an angle term to the force field.
...@@ -164,7 +164,7 @@ private: ...@@ -164,7 +164,7 @@ private:
std::vector<AngleInfo> angles; std::vector<AngleInfo> angles;
}; };
class AmoebaHarmonicAngleForce::AngleInfo { class AmoebaAngleForce::AngleInfo {
public: public:
int particle1, particle2, particle3; int particle1, particle2, particle3;
double length, quadraticK; double length, quadraticK;
...@@ -179,4 +179,4 @@ public: ...@@ -179,4 +179,4 @@ public:
} // namespace OpenMM } // namespace OpenMM
#endif /*OPENMM_AMOEBA_HARMONIC_ANGLE_FORCE_H_*/ #endif /*OPENMM_AMOEBA_ANGLE_FORCE_H_*/
#ifndef OPENMM_AMOEBA_HARMONIC_BOND_FORCE_H_ #ifndef OPENMM_AMOEBA_BOND_FORCE_H_
#define OPENMM_AMOEBA_HARMONIC_BOND_FORCE_H_ #define OPENMM_AMOEBA_BOND_FORCE_H_
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* OpenMMAmoeba * * OpenMMAmoeba *
...@@ -46,18 +46,18 @@ namespace OpenMM { ...@@ -46,18 +46,18 @@ namespace OpenMM {
* is set per-bond. The coefficients of the higher order terms each have a single value that * is set per-bond. The coefficients of the higher order terms each have a single value that
* is set globally. * is set globally.
* *
* To use it, create an AmoebaHarmonicBondForce object then call addBond() once for each bond. After * To use it, create an AmoebaBondForce object then call addBond() once for each bond. After
* a bond has been added, you can modify its force field parameters by calling setBondParameters(). * a bond has been added, you can modify its force field parameters by calling setBondParameters().
*/ */
class OPENMM_EXPORT AmoebaHarmonicBondForce : public Force { class OPENMM_EXPORT AmoebaBondForce : public Force {
public: public:
/** /**
* Create an AmoebaHarmonicBondForce. * Create an AmoebaBondForce.
*/ */
AmoebaHarmonicBondForce(); AmoebaBondForce();
/** /**
* Get the number of bond stretch terms in the potential function * Get the number of bond stretch terms in the potential function
*/ */
...@@ -70,28 +70,28 @@ public: ...@@ -70,28 +70,28 @@ public:
* *
* @param cubicK the cubic force constant for the bond * @param cubicK the cubic force constant for the bond
*/ */
void setAmoebaGlobalHarmonicBondCubic( double cubicK ); void setAmoebaGlobalBondCubic( double cubicK );
/** /**
* Get the global cubic term * Get the global cubic term
* *
* @return global cubicK term * @return global cubicK term
*/ */
double getAmoebaGlobalHarmonicBondCubic( void ) const; double getAmoebaGlobalBondCubic( void ) const;
/** /**
* Set the global quartic term * Set the global quartic term
* *
* @param quarticK the quartic force constant for the bond * @param quarticK the quartic force constant for the bond
*/ */
void setAmoebaGlobalHarmonicBondQuartic( double quarticK ); void setAmoebaGlobalBondQuartic( double quarticK );
/** /**
* Get the global quartic term * Get the global quartic term
* *
* @return global quartic term * @return global quartic term
*/ */
double getAmoebaGlobalHarmonicBondQuartic( void ) const; double getAmoebaGlobalBondQuartic( void ) const;
/** /**
* Add a bond term to the force field. * Add a bond term to the force field.
...@@ -136,7 +136,7 @@ private: ...@@ -136,7 +136,7 @@ private:
std::vector<BondInfo> bonds; std::vector<BondInfo> bonds;
}; };
class AmoebaHarmonicBondForce::BondInfo { class AmoebaBondForce::BondInfo {
public: public:
int particle1, particle2; int particle1, particle2;
double length, quadraticK; double length, quadraticK;
...@@ -151,4 +151,4 @@ public: ...@@ -151,4 +151,4 @@ public:
} // namespace OpenMM } // namespace OpenMM
#endif /*OPENMM_AMOEBA_HARMONIC_BOND_FORCE_H_*/ #endif /*OPENMM_AMOEBA_BOND_FORCE_H_*/
#ifndef OPENMM_AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE_H_ #ifndef OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_H_
#define OPENMM_AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE_H_ #define OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_H_
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* OpenMMAmoeba * * OpenMMAmoeba *
...@@ -44,18 +44,18 @@ namespace OpenMM { ...@@ -44,18 +44,18 @@ namespace OpenMM {
* quadratic term is set per-angle. The coefficients of the higher order terms each have a single value that * quadratic term is set per-angle. The coefficients of the higher order terms each have a single value that
* is set globally. * is set globally.
* *
* To use it, create an AmoebaHarmonicInPlaneAngle object then call addAngle() once for each angle. After * To use it, create an AmoebaInPlaneAngleForce object then call addAngle() once for each angle. After
* an angle has been added, you can modify its force field parameters by calling setAngleParameters(). * an angle has been added, you can modify its force field parameters by calling setAngleParameters().
*/ */
class OPENMM_EXPORT AmoebaHarmonicInPlaneAngleForce : public Force { class OPENMM_EXPORT AmoebaInPlaneAngleForce : public Force {
public: public:
/** /**
* Create an AmoebaHarmonicAngleForce. * Create an AmoebaAngleForce.
*/ */
AmoebaHarmonicInPlaneAngleForce(); AmoebaInPlaneAngleForce();
/** /**
* Get the number of in-plane angle terms in the potential function * Get the number of in-plane angle terms in the potential function
...@@ -69,56 +69,56 @@ public: ...@@ -69,56 +69,56 @@ public:
* *
* @param cubicK the cubic force constant for the angle * @param cubicK the cubic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicInPlaneAngleCubic( double cubicK ); void setAmoebaGlobalInPlaneAngleCubic( double cubicK );
/** /**
* Get the global cubic term * Get the global cubic term
* *
* @return global cubicK term * @return global cubicK term
*/ */
double getAmoebaGlobalHarmonicInPlaneAngleCubic( void ) const; double getAmoebaGlobalInPlaneAngleCubic( void ) const;
/** /**
* Set the global quartic term * Set the global quartic term
* *
* @param quarticK the quartic force constant for the angle * @param quarticK the quartic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicInPlaneAngleQuartic( double quarticK ); void setAmoebaGlobalInPlaneAngleQuartic( double quarticK );
/** /**
* Get the global quartic term * Get the global quartic term
* *
* @return global quartic term * @return global quartic term
*/ */
double getAmoebaGlobalHarmonicInPlaneAngleQuartic( void ) const; double getAmoebaGlobalInPlaneAngleQuartic( void ) const;
/** /**
* Set the global pentic term * Set the global pentic term
* *
* @param penticK the pentic force constant for the angle * @param penticK the pentic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicInPlaneAnglePentic( double penticK ); void setAmoebaGlobalInPlaneAnglePentic( double penticK );
/** /**
* Get the global pentic term * Get the global pentic term
* *
* @return global penticK term * @return global penticK term
*/ */
double getAmoebaGlobalHarmonicInPlaneAnglePentic( void ) const; double getAmoebaGlobalInPlaneAnglePentic( void ) const;
/** /**
* Set the global sextic term * Set the global sextic term
* *
* @param sexticK the sextic force constant for the angle * @param sexticK the sextic force constant for the angle
*/ */
void setAmoebaGlobalHarmonicInPlaneAngleSextic( double sexticK ); void setAmoebaGlobalInPlaneAngleSextic( double sexticK );
/** /**
* Get the global sextic term * Get the global sextic term
* *
* @return global sextic term * @return global sextic term
*/ */
double getAmoebaGlobalHarmonicInPlaneAngleSextic( void ) const; double getAmoebaGlobalInPlaneAngleSextic( void ) const;
/** /**
* Add an angle term to the force field. * Add an angle term to the force field.
...@@ -169,7 +169,7 @@ private: ...@@ -169,7 +169,7 @@ private:
std::vector<AngleInfo> angles; std::vector<AngleInfo> angles;
}; };
class AmoebaHarmonicInPlaneAngleForce::AngleInfo { class AmoebaInPlaneAngleForce::AngleInfo {
public: public:
int particle1, particle2, particle3, particle4; int particle1, particle2, particle3, particle4;
double length, quadraticK; double length, quadraticK;
...@@ -185,4 +185,4 @@ public: ...@@ -185,4 +185,4 @@ public:
} // namespace OpenMM } // namespace OpenMM
#endif /*OPENMM_AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE_H_*/ #endif /*OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_H_*/
...@@ -44,26 +44,26 @@ ...@@ -44,26 +44,26 @@
namespace OpenMM { namespace OpenMM {
/** /**
* This kernel is invoked by AmoebaHarmonicBondForce to calculate the forces acting on the system and the energy of the system. * This kernel is invoked by AmoebaBondForce to calculate the forces acting on the system and the energy of the system.
*/ */
class CalcAmoebaHarmonicBondForceKernel : public KernelImpl { class CalcAmoebaBondForceKernel : public KernelImpl {
public: public:
static std::string Name() { static std::string Name() {
return "CalcAmoebaHarmonicBondForce"; return "CalcAmoebaBondForce";
} }
CalcAmoebaHarmonicBondForceKernel(std::string name, const Platform& platform) : KernelImpl(name, platform) { CalcAmoebaBondForceKernel(std::string name, const Platform& platform) : KernelImpl(name, platform) {
} }
/** /**
* Initialize the kernel. * Initialize the kernel.
* *
* @param system the System this kernel will be applied to * @param system the System this kernel will be applied to
* @param force the AmoebaHarmonicBondForce this kernel will be used for * @param force the AmoebaBondForce this kernel will be used for
*/ */
virtual void initialize(const System& system, const AmoebaHarmonicBondForce& force) = 0; virtual void initialize(const System& system, const AmoebaBondForce& force) = 0;
/** /**
* Execute the kernel to calculate the forces and/or energy. * Execute the kernel to calculate the forces and/or energy.
...@@ -78,26 +78,26 @@ public: ...@@ -78,26 +78,26 @@ public:
}; };
/** /**
* This kernel is invoked by AmoebaHarmonicAngleForce to calculate the forces acting on the system and the energy of the system. * This kernel is invoked by AmoebaAngleForce to calculate the forces acting on the system and the energy of the system.
*/ */
class CalcAmoebaHarmonicAngleForceKernel : public KernelImpl { class CalcAmoebaAngleForceKernel : public KernelImpl {
public: public:
static std::string Name() { static std::string Name() {
return "CalcAmoebaHarmonicAngleForce"; return "CalcAmoebaAngleForce";
} }
CalcAmoebaHarmonicAngleForceKernel(std::string name, const Platform& platform) : KernelImpl(name, platform) { CalcAmoebaAngleForceKernel(std::string name, const Platform& platform) : KernelImpl(name, platform) {
} }
/** /**
* Initialize the kernel. * Initialize the kernel.
* *
* @param system the System this kernel will be applied to * @param system the System this kernel will be applied to
* @param force the HarmonicAngleForce this kernel will be used for * @param force the AmoebaAngleForce this kernel will be used for
*/ */
virtual void initialize(const System& system, const AmoebaHarmonicAngleForce& force) = 0; virtual void initialize(const System& system, const AmoebaAngleForce& force) = 0;
/** /**
* Execute the kernel to calculate the forces and/or energy. * Execute the kernel to calculate the forces and/or energy.
...@@ -111,26 +111,26 @@ public: ...@@ -111,26 +111,26 @@ public:
}; };
/** /**
* This kernel is invoked by AmoebaHarmonicInPlaneAngleForce to calculate the forces acting on the system and the energy of the system. * This kernel is invoked by AmoebaInPlaneAngleForce to calculate the forces acting on the system and the energy of the system.
*/ */
class CalcAmoebaHarmonicInPlaneAngleForceKernel : public KernelImpl { class CalcAmoebaInPlaneAngleForceKernel : public KernelImpl {
public: public:
static std::string Name() { static std::string Name() {
return "CalcAmoebaHarmonicInPlaneAngleForce"; return "CalcAmoebaInPlaneAngleForce";
} }
CalcAmoebaHarmonicInPlaneAngleForceKernel(std::string name, const Platform& platform) : KernelImpl(name, platform) { CalcAmoebaInPlaneAngleForceKernel(std::string name, const Platform& platform) : KernelImpl(name, platform) {
} }
/** /**
* Initialize the kernel. * Initialize the kernel.
* *
* @param system the System this kernel will be applied to * @param system the System this kernel will be applied to
* @param force the HarmonicInPlaneAngleForce this kernel will be used for * @param force the AmoebaInPlaneAngleForce this kernel will be used for
*/ */
virtual void initialize(const System& system, const AmoebaHarmonicInPlaneAngleForce& force) = 0; virtual void initialize(const System& system, const AmoebaInPlaneAngleForce& force) = 0;
/** /**
* Execute the kernel to calculate the forces and/or energy. * Execute the kernel to calculate the forces and/or energy.
......
#ifndef OPENMM_AMOEBA_HARMONIC_ANGLE_FORCE_IMPL_H_ #ifndef OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_
#define OPENMM_AMOEBA_HARMONIC_ANGLE_FORCE_IMPL_H_ #define OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* OpenMMAmoeba * * OpenMMAmoeba *
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/internal/ForceImpl.h" #include "openmm/internal/ForceImpl.h"
#include "openmm/AmoebaHarmonicAngleForce.h" #include "openmm/AmoebaAngleForce.h"
#include "openmm/Kernel.h" #include "openmm/Kernel.h"
#include <utility> #include <utility>
#include <set> #include <set>
...@@ -42,15 +42,15 @@ ...@@ -42,15 +42,15 @@
namespace OpenMM { namespace OpenMM {
/** /**
* This is the internal implementation of AmoebaHarmonicAngleForce. * This is the internal implementation of AmoebaAngleForce.
*/ */
class AmoebaHarmonicAngleForceImpl : public ForceImpl { class AmoebaAngleForceImpl : public ForceImpl {
public: public:
AmoebaHarmonicAngleForceImpl(AmoebaHarmonicAngleForce& owner); AmoebaAngleForceImpl(AmoebaAngleForce& owner);
~AmoebaHarmonicAngleForceImpl(); ~AmoebaAngleForceImpl();
void initialize(ContextImpl& context); void initialize(ContextImpl& context);
AmoebaHarmonicAngleForce& getOwner() { AmoebaAngleForce& getOwner() {
return owner; return owner;
} }
void updateContextState(ContextImpl& context) { void updateContextState(ContextImpl& context) {
...@@ -62,10 +62,10 @@ public: ...@@ -62,10 +62,10 @@ public:
} }
std::vector<std::string> getKernelNames(); std::vector<std::string> getKernelNames();
private: private:
AmoebaHarmonicAngleForce& owner; AmoebaAngleForce& owner;
Kernel kernel; Kernel kernel;
}; };
} // namespace OpenMM } // namespace OpenMM
#endif /*OPENMM_AMOEBA_HARMONIC_ANGLE_FORCE_IMPL_H_*/ #endif /*OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_*/
#ifndef OPENMM_AMOEBA_HARMONIC_BOND_FORCE_IMPL_H_ #ifndef OPENMM_AMOEBA_BOND_FORCE_IMPL_H_
#define OPENMM_AMOEBA_HARMONIC_BOND_FORCE_IMPL_H_ #define OPENMM_AMOEBA_BOND_FORCE_IMPL_H_
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* OpenMMAmoeba * * OpenMMAmoeba *
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/internal/ForceImpl.h" #include "openmm/internal/ForceImpl.h"
#include "openmm/AmoebaHarmonicBondForce.h" #include "openmm/AmoebaBondForce.h"
#include "openmm/Kernel.h" #include "openmm/Kernel.h"
#include <utility> #include <utility>
#include <set> #include <set>
...@@ -43,15 +43,15 @@ ...@@ -43,15 +43,15 @@
namespace OpenMM { namespace OpenMM {
/** /**
* This is the internal implementation of AmoebaHarmonicBondForce. * This is the internal implementation of AmoebaBondForce.
*/ */
class AmoebaHarmonicBondForceImpl : public ForceImpl { class AmoebaBondForceImpl : public ForceImpl {
public: public:
AmoebaHarmonicBondForceImpl(AmoebaHarmonicBondForce& owner); AmoebaBondForceImpl(AmoebaBondForce& owner);
~AmoebaHarmonicBondForceImpl(); ~AmoebaBondForceImpl();
void initialize(ContextImpl& context); void initialize(ContextImpl& context);
AmoebaHarmonicBondForce& getOwner() { AmoebaBondForce& getOwner() {
return owner; return owner;
} }
void updateContextState(ContextImpl& context) { void updateContextState(ContextImpl& context) {
...@@ -65,10 +65,10 @@ public: ...@@ -65,10 +65,10 @@ public:
std::vector< std::pair<int, int> > getBondedParticles() const; std::vector< std::pair<int, int> > getBondedParticles() const;
private: private:
AmoebaHarmonicBondForce& owner; AmoebaBondForce& owner;
Kernel kernel; Kernel kernel;
}; };
} // namespace OpenMM } // namespace OpenMM
#endif /*OPENMM_HARMONIC_BOND_FORCE_IMPL_H_*/ #endif /*OPENMM_BOND_FORCE_IMPL_H_*/
#ifndef OPENMM_AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE_IMPL_H_ #ifndef OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_IMPL_H_
#define OPENMM_AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE_IMPL_H_ #define OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_IMPL_H_
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* OpenMMAmoeba * * OpenMMAmoeba *
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/internal/ForceImpl.h" #include "openmm/internal/ForceImpl.h"
#include "openmm/AmoebaHarmonicInPlaneAngleForce.h" #include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/Kernel.h" #include "openmm/Kernel.h"
#include <utility> #include <utility>
#include <set> #include <set>
...@@ -42,15 +42,15 @@ ...@@ -42,15 +42,15 @@
namespace OpenMM { namespace OpenMM {
/** /**
* This is the internal implementation of AmoebaHarmonicInPlaneAngleForce. * This is the internal implementation of AmoebaInPlaneAngleForce.
*/ */
class AmoebaHarmonicInPlaneAngleForceImpl : public ForceImpl { class AmoebaInPlaneAngleForceImpl : public ForceImpl {
public: public:
AmoebaHarmonicInPlaneAngleForceImpl(AmoebaHarmonicInPlaneAngleForce& owner); AmoebaInPlaneAngleForceImpl(AmoebaInPlaneAngleForce& owner);
~AmoebaHarmonicInPlaneAngleForceImpl(); ~AmoebaInPlaneAngleForceImpl();
void initialize(ContextImpl& context); void initialize(ContextImpl& context);
AmoebaHarmonicInPlaneAngleForce& getOwner() { AmoebaInPlaneAngleForce& getOwner() {
return owner; return owner;
} }
void updateContextState(ContextImpl& context) { void updateContextState(ContextImpl& context) {
...@@ -62,10 +62,10 @@ public: ...@@ -62,10 +62,10 @@ public:
} }
std::vector<std::string> getKernelNames(); std::vector<std::string> getKernelNames();
private: private:
AmoebaHarmonicInPlaneAngleForce& owner; AmoebaInPlaneAngleForce& owner;
Kernel kernel; Kernel kernel;
}; };
} // namespace OpenMM } // namespace OpenMM
#endif /*OPENMM_AMOEBA_HARMONIC_ANGLE_FORCE_IMPL_H_*/ #endif /*OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_*/
...@@ -31,21 +31,21 @@ ...@@ -31,21 +31,21 @@
#include "openmm/Force.h" #include "openmm/Force.h"
#include "openmm/OpenMMException.h" #include "openmm/OpenMMException.h"
#include "openmm/AmoebaHarmonicAngleForce.h" #include "openmm/AmoebaAngleForce.h"
#include "openmm/internal/AmoebaHarmonicAngleForceImpl.h" #include "openmm/internal/AmoebaAngleForceImpl.h"
using namespace OpenMM; using namespace OpenMM;
AmoebaHarmonicAngleForce::AmoebaHarmonicAngleForce() { AmoebaAngleForce::AmoebaAngleForce() {
_globalCubicK = _globalQuarticK = _globalPenticK = _globalSexticK = 0.0; _globalCubicK = _globalQuarticK = _globalPenticK = _globalSexticK = 0.0;
} }
int AmoebaHarmonicAngleForce::addAngle(int particle1, int particle2, int particle3, double length, double quadraticK) { int AmoebaAngleForce::addAngle(int particle1, int particle2, int particle3, double length, double quadraticK) {
angles.push_back(AngleInfo(particle1, particle2, particle3, length, quadraticK)); angles.push_back(AngleInfo(particle1, particle2, particle3, length, quadraticK));
return angles.size()-1; return angles.size()-1;
} }
void AmoebaHarmonicAngleForce::getAngleParameters(int index, int& particle1, int& particle2, int& particle3, void AmoebaAngleForce::getAngleParameters(int index, int& particle1, int& particle2, int& particle3,
double& length, double& quadraticK ) const { double& length, double& quadraticK ) const {
particle1 = angles[index].particle1; particle1 = angles[index].particle1;
particle2 = angles[index].particle2; particle2 = angles[index].particle2;
...@@ -54,7 +54,7 @@ void AmoebaHarmonicAngleForce::getAngleParameters(int index, int& particle1, int ...@@ -54,7 +54,7 @@ void AmoebaHarmonicAngleForce::getAngleParameters(int index, int& particle1, int
quadraticK = angles[index].quadraticK; quadraticK = angles[index].quadraticK;
} }
void AmoebaHarmonicAngleForce::setAngleParameters(int index, int particle1, int particle2, int particle3, void AmoebaAngleForce::setAngleParameters(int index, int particle1, int particle2, int particle3,
double length, double quadraticK ) { double length, double quadraticK ) {
angles[index].particle1 = particle1; angles[index].particle1 = particle1;
angles[index].particle2 = particle2; angles[index].particle2 = particle2;
...@@ -63,38 +63,38 @@ void AmoebaHarmonicAngleForce::setAngleParameters(int index, int particle1, int ...@@ -63,38 +63,38 @@ void AmoebaHarmonicAngleForce::setAngleParameters(int index, int particle1, int
angles[index].quadraticK = quadraticK; angles[index].quadraticK = quadraticK;
} }
double AmoebaHarmonicAngleForce::getAmoebaGlobalHarmonicAngleCubic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAngleCubic( void ) const {
return _globalCubicK; return _globalCubicK;
} }
void AmoebaHarmonicAngleForce::setAmoebaGlobalHarmonicAngleCubic(double cubicK ) { void AmoebaAngleForce::setAmoebaGlobalAngleCubic(double cubicK ) {
_globalCubicK = cubicK; _globalCubicK = cubicK;
} }
double AmoebaHarmonicAngleForce::getAmoebaGlobalHarmonicAngleQuartic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAngleQuartic( void ) const {
return _globalQuarticK; return _globalQuarticK;
} }
void AmoebaHarmonicAngleForce::setAmoebaGlobalHarmonicAngleQuartic(double quarticK ) { void AmoebaAngleForce::setAmoebaGlobalAngleQuartic(double quarticK ) {
_globalQuarticK = quarticK; _globalQuarticK = quarticK;
} }
double AmoebaHarmonicAngleForce::getAmoebaGlobalHarmonicAnglePentic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAnglePentic( void ) const {
return _globalPenticK; return _globalPenticK;
} }
void AmoebaHarmonicAngleForce::setAmoebaGlobalHarmonicAnglePentic(double penticK ) { void AmoebaAngleForce::setAmoebaGlobalAnglePentic(double penticK ) {
_globalPenticK = penticK; _globalPenticK = penticK;
} }
double AmoebaHarmonicAngleForce::getAmoebaGlobalHarmonicAngleSextic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAngleSextic( void ) const {
return _globalSexticK; return _globalSexticK;
} }
void AmoebaHarmonicAngleForce::setAmoebaGlobalHarmonicAngleSextic(double sexticK ) { void AmoebaAngleForce::setAmoebaGlobalAngleSextic(double sexticK ) {
_globalSexticK = sexticK; _globalSexticK = sexticK;
} }
ForceImpl* AmoebaHarmonicAngleForce::createImpl() { ForceImpl* AmoebaAngleForce::createImpl() {
return new AmoebaHarmonicAngleForceImpl(*this); return new AmoebaAngleForceImpl(*this);
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/internal/ContextImpl.h" #include "openmm/internal/ContextImpl.h"
#include "openmm/internal/AmoebaHarmonicAngleForceImpl.h" #include "openmm/internal/AmoebaAngleForceImpl.h"
#include "openmm/amoebaKernels.h" #include "openmm/amoebaKernels.h"
using namespace OpenMM; using namespace OpenMM;
...@@ -39,26 +39,26 @@ using std::pair; ...@@ -39,26 +39,26 @@ using std::pair;
using std::vector; using std::vector;
using std::set; using std::set;
AmoebaHarmonicAngleForceImpl::AmoebaHarmonicAngleForceImpl(AmoebaHarmonicAngleForce& owner) : owner(owner) { AmoebaAngleForceImpl::AmoebaAngleForceImpl(AmoebaAngleForce& owner) : owner(owner) {
} }
AmoebaHarmonicAngleForceImpl::~AmoebaHarmonicAngleForceImpl() { AmoebaAngleForceImpl::~AmoebaAngleForceImpl() {
} }
void AmoebaHarmonicAngleForceImpl::initialize(ContextImpl& context) { void AmoebaAngleForceImpl::initialize(ContextImpl& context) {
kernel = context.getPlatform().createKernel(CalcAmoebaHarmonicAngleForceKernel::Name(), context); kernel = context.getPlatform().createKernel(CalcAmoebaAngleForceKernel::Name(), context);
kernel.getAs<CalcAmoebaHarmonicAngleForceKernel>().initialize(context.getSystem(), owner); kernel.getAs<CalcAmoebaAngleForceKernel>().initialize(context.getSystem(), owner);
} }
double AmoebaHarmonicAngleForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups) { double AmoebaAngleForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups) {
if ((groups&(1<<owner.getForceGroup())) != 0) if ((groups&(1<<owner.getForceGroup())) != 0)
return kernel.getAs<CalcAmoebaHarmonicAngleForceKernel>().execute(context, includeForces, includeEnergy); return kernel.getAs<CalcAmoebaAngleForceKernel>().execute(context, includeForces, includeEnergy);
return 0.0; return 0.0;
} }
std::vector<std::string> AmoebaHarmonicAngleForceImpl::getKernelNames() { std::vector<std::string> AmoebaAngleForceImpl::getKernelNames() {
std::vector<std::string> names; std::vector<std::string> names;
names.push_back(CalcAmoebaHarmonicAngleForceKernel::Name()); names.push_back(CalcAmoebaAngleForceKernel::Name());
return names; return names;
} }
...@@ -31,50 +31,50 @@ ...@@ -31,50 +31,50 @@
#include "openmm/Force.h" #include "openmm/Force.h"
#include "openmm/OpenMMException.h" #include "openmm/OpenMMException.h"
#include "openmm/AmoebaHarmonicBondForce.h" #include "openmm/AmoebaBondForce.h"
#include "openmm/internal/AmoebaHarmonicBondForceImpl.h" #include "openmm/internal/AmoebaBondForceImpl.h"
using namespace OpenMM; using namespace OpenMM;
AmoebaHarmonicBondForce::AmoebaHarmonicBondForce() { AmoebaBondForce::AmoebaBondForce() {
_globalCubicK = _globalQuarticK = 0.0; _globalCubicK = _globalQuarticK = 0.0;
} }
int AmoebaHarmonicBondForce::addBond(int particle1, int particle2, double length, double quadraticK) { int AmoebaBondForce::addBond(int particle1, int particle2, double length, double quadraticK) {
bonds.push_back(BondInfo(particle1, particle2, length, quadraticK )); bonds.push_back(BondInfo(particle1, particle2, length, quadraticK ));
return bonds.size()-1; return bonds.size()-1;
} }
void AmoebaHarmonicBondForce::getBondParameters(int index, int& particle1, int& particle2, double& length, double& quadraticK ) const { void AmoebaBondForce::getBondParameters(int index, int& particle1, int& particle2, double& length, double& quadraticK ) const {
particle1 = bonds[index].particle1; particle1 = bonds[index].particle1;
particle2 = bonds[index].particle2; particle2 = bonds[index].particle2;
length = bonds[index].length; length = bonds[index].length;
quadraticK = bonds[index].quadraticK; quadraticK = bonds[index].quadraticK;
} }
void AmoebaHarmonicBondForce::setBondParameters(int index, int particle1, int particle2, double length, double quadraticK ) { void AmoebaBondForce::setBondParameters(int index, int particle1, int particle2, double length, double quadraticK ) {
bonds[index].particle1 = particle1; bonds[index].particle1 = particle1;
bonds[index].particle2 = particle2; bonds[index].particle2 = particle2;
bonds[index].length = length; bonds[index].length = length;
bonds[index].quadraticK = quadraticK; bonds[index].quadraticK = quadraticK;
} }
void AmoebaHarmonicBondForce::setAmoebaGlobalHarmonicBondCubic(double cubicK ) { void AmoebaBondForce::setAmoebaGlobalBondCubic(double cubicK ) {
_globalCubicK = cubicK; _globalCubicK = cubicK;
} }
void AmoebaHarmonicBondForce::setAmoebaGlobalHarmonicBondQuartic(double quarticK ) { void AmoebaBondForce::setAmoebaGlobalBondQuartic(double quarticK ) {
_globalQuarticK = quarticK; _globalQuarticK = quarticK;
} }
double AmoebaHarmonicBondForce::getAmoebaGlobalHarmonicBondCubic( void ) const { double AmoebaBondForce::getAmoebaGlobalBondCubic( void ) const {
return _globalCubicK; return _globalCubicK;
} }
double AmoebaHarmonicBondForce::getAmoebaGlobalHarmonicBondQuartic( void ) const { double AmoebaBondForce::getAmoebaGlobalBondQuartic( void ) const {
return _globalQuarticK; return _globalQuarticK;
} }
ForceImpl* AmoebaHarmonicBondForce::createImpl() { ForceImpl* AmoebaBondForce::createImpl() {
return new AmoebaHarmonicBondForceImpl(*this); return new AmoebaBondForceImpl(*this);
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/internal/ContextImpl.h" #include "openmm/internal/ContextImpl.h"
#include "openmm/internal/AmoebaHarmonicBondForceImpl.h" #include "openmm/internal/AmoebaBondForceImpl.h"
#include "openmm/amoebaKernels.h" #include "openmm/amoebaKernels.h"
#include "openmm/Platform.h" #include "openmm/Platform.h"
...@@ -40,30 +40,30 @@ using std::pair; ...@@ -40,30 +40,30 @@ using std::pair;
using std::vector; using std::vector;
using std::set; using std::set;
AmoebaHarmonicBondForceImpl::AmoebaHarmonicBondForceImpl(AmoebaHarmonicBondForce& owner) : owner(owner) { AmoebaBondForceImpl::AmoebaBondForceImpl(AmoebaBondForce& owner) : owner(owner) {
} }
AmoebaHarmonicBondForceImpl::~AmoebaHarmonicBondForceImpl() { AmoebaBondForceImpl::~AmoebaBondForceImpl() {
} }
void AmoebaHarmonicBondForceImpl::initialize(ContextImpl& context) { void AmoebaBondForceImpl::initialize(ContextImpl& context) {
kernel = context.getPlatform().createKernel(CalcAmoebaHarmonicBondForceKernel::Name(), context); kernel = context.getPlatform().createKernel(CalcAmoebaBondForceKernel::Name(), context);
kernel.getAs<CalcAmoebaHarmonicBondForceKernel>().initialize(context.getSystem(), owner); kernel.getAs<CalcAmoebaBondForceKernel>().initialize(context.getSystem(), owner);
} }
double AmoebaHarmonicBondForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups) { double AmoebaBondForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups) {
if ((groups&(1<<owner.getForceGroup())) != 0) if ((groups&(1<<owner.getForceGroup())) != 0)
return kernel.getAs<CalcAmoebaHarmonicBondForceKernel>().execute(context, includeForces, includeEnergy); return kernel.getAs<CalcAmoebaBondForceKernel>().execute(context, includeForces, includeEnergy);
return 0.0; return 0.0;
} }
std::vector<std::string> AmoebaHarmonicBondForceImpl::getKernelNames() { std::vector<std::string> AmoebaBondForceImpl::getKernelNames() {
std::vector<std::string> names; std::vector<std::string> names;
names.push_back(CalcAmoebaHarmonicBondForceKernel::Name()); names.push_back(CalcAmoebaBondForceKernel::Name());
return names; return names;
} }
vector<pair<int, int> > AmoebaHarmonicBondForceImpl::getBondedParticles() const { vector<pair<int, int> > AmoebaBondForceImpl::getBondedParticles() const {
int numBonds = owner.getNumBonds(); int numBonds = owner.getNumBonds();
vector<pair<int, int> > bonds(numBonds); vector<pair<int, int> > bonds(numBonds);
for (int i = 0; i < numBonds; i++) { for (int i = 0; i < numBonds; i++) {
......
...@@ -31,21 +31,21 @@ ...@@ -31,21 +31,21 @@
#include "openmm/Force.h" #include "openmm/Force.h"
#include "openmm/OpenMMException.h" #include "openmm/OpenMMException.h"
#include "openmm/AmoebaHarmonicInPlaneAngleForce.h" #include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/internal/AmoebaHarmonicInPlaneAngleForceImpl.h" #include "openmm/internal/AmoebaInPlaneAngleForceImpl.h"
using namespace OpenMM; using namespace OpenMM;
AmoebaHarmonicInPlaneAngleForce::AmoebaHarmonicInPlaneAngleForce() { AmoebaInPlaneAngleForce::AmoebaInPlaneAngleForce() {
_globalCubicK = _globalQuarticK = _globalPenticK = _globalSexticK = 0.0; _globalCubicK = _globalQuarticK = _globalPenticK = _globalSexticK = 0.0;
} }
int AmoebaHarmonicInPlaneAngleForce::addAngle(int particle1, int particle2, int particle3, int particle4, double length, double quadraticK ) { int AmoebaInPlaneAngleForce::addAngle(int particle1, int particle2, int particle3, int particle4, double length, double quadraticK ) {
angles.push_back(AngleInfo(particle1, particle2, particle3, particle4, length, quadraticK )); angles.push_back(AngleInfo(particle1, particle2, particle3, particle4, length, quadraticK ));
return angles.size()-1; return angles.size()-1;
} }
void AmoebaHarmonicInPlaneAngleForce::getAngleParameters(int index, int& particle1, int& particle2, int& particle3, int& particle4, void AmoebaInPlaneAngleForce::getAngleParameters(int index, int& particle1, int& particle2, int& particle3, int& particle4,
double& length, double& quadraticK ) const { double& length, double& quadraticK ) const {
particle1 = angles[index].particle1; particle1 = angles[index].particle1;
particle2 = angles[index].particle2; particle2 = angles[index].particle2;
...@@ -55,7 +55,7 @@ void AmoebaHarmonicInPlaneAngleForce::getAngleParameters(int index, int& particl ...@@ -55,7 +55,7 @@ void AmoebaHarmonicInPlaneAngleForce::getAngleParameters(int index, int& particl
quadraticK = angles[index].quadraticK; quadraticK = angles[index].quadraticK;
} }
void AmoebaHarmonicInPlaneAngleForce::setAngleParameters(int index, int particle1, int particle2, int particle3, int particle4, void AmoebaInPlaneAngleForce::setAngleParameters(int index, int particle1, int particle2, int particle3, int particle4,
double length, double quadraticK ) { double length, double quadraticK ) {
angles[index].particle1 = particle1; angles[index].particle1 = particle1;
angles[index].particle2 = particle2; angles[index].particle2 = particle2;
...@@ -65,38 +65,38 @@ void AmoebaHarmonicInPlaneAngleForce::setAngleParameters(int index, int particle ...@@ -65,38 +65,38 @@ void AmoebaHarmonicInPlaneAngleForce::setAngleParameters(int index, int particle
angles[index].quadraticK = quadraticK; angles[index].quadraticK = quadraticK;
} }
void AmoebaHarmonicInPlaneAngleForce::setAmoebaGlobalHarmonicInPlaneAngleCubic(double cubicK ) { void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAngleCubic(double cubicK ) {
_globalCubicK = cubicK; _globalCubicK = cubicK;
} }
void AmoebaHarmonicInPlaneAngleForce::setAmoebaGlobalHarmonicInPlaneAngleQuartic(double quarticK ) { void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAngleQuartic(double quarticK ) {
_globalQuarticK = quarticK; _globalQuarticK = quarticK;
} }
double AmoebaHarmonicInPlaneAngleForce::getAmoebaGlobalHarmonicInPlaneAngleCubic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleCubic( void ) const {
return _globalCubicK; return _globalCubicK;
} }
double AmoebaHarmonicInPlaneAngleForce::getAmoebaGlobalHarmonicInPlaneAngleQuartic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleQuartic( void ) const {
return _globalQuarticK; return _globalQuarticK;
} }
void AmoebaHarmonicInPlaneAngleForce::setAmoebaGlobalHarmonicInPlaneAnglePentic(double cubicK ) { void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAnglePentic(double cubicK ) {
_globalPenticK = cubicK; _globalPenticK = cubicK;
} }
void AmoebaHarmonicInPlaneAngleForce::setAmoebaGlobalHarmonicInPlaneAngleSextic(double quarticK ) { void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAngleSextic(double quarticK ) {
_globalSexticK = quarticK; _globalSexticK = quarticK;
} }
double AmoebaHarmonicInPlaneAngleForce::getAmoebaGlobalHarmonicInPlaneAnglePentic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAnglePentic( void ) const {
return _globalPenticK; return _globalPenticK;
} }
double AmoebaHarmonicInPlaneAngleForce::getAmoebaGlobalHarmonicInPlaneAngleSextic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleSextic( void ) const {
return _globalSexticK; return _globalSexticK;
} }
ForceImpl* AmoebaHarmonicInPlaneAngleForce::createImpl() { ForceImpl* AmoebaInPlaneAngleForce::createImpl() {
return new AmoebaHarmonicInPlaneAngleForceImpl(*this); return new AmoebaInPlaneAngleForceImpl(*this);
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "openmm/internal/ContextImpl.h" #include "openmm/internal/ContextImpl.h"
#include "openmm/internal/AmoebaHarmonicInPlaneAngleForceImpl.h" #include "openmm/internal/AmoebaInPlaneAngleForceImpl.h"
#include "openmm/amoebaKernels.h" #include "openmm/amoebaKernels.h"
using namespace OpenMM; using namespace OpenMM;
...@@ -39,26 +39,26 @@ using std::pair; ...@@ -39,26 +39,26 @@ using std::pair;
using std::vector; using std::vector;
using std::set; using std::set;
AmoebaHarmonicInPlaneAngleForceImpl::AmoebaHarmonicInPlaneAngleForceImpl(AmoebaHarmonicInPlaneAngleForce& owner) : owner(owner) { AmoebaInPlaneAngleForceImpl::AmoebaInPlaneAngleForceImpl(AmoebaInPlaneAngleForce& owner) : owner(owner) {
} }
AmoebaHarmonicInPlaneAngleForceImpl::~AmoebaHarmonicInPlaneAngleForceImpl() { AmoebaInPlaneAngleForceImpl::~AmoebaInPlaneAngleForceImpl() {
} }
void AmoebaHarmonicInPlaneAngleForceImpl::initialize(ContextImpl& context) { void AmoebaInPlaneAngleForceImpl::initialize(ContextImpl& context) {
kernel = context.getPlatform().createKernel(CalcAmoebaHarmonicInPlaneAngleForceKernel::Name(), context); kernel = context.getPlatform().createKernel(CalcAmoebaInPlaneAngleForceKernel::Name(), context);
kernel.getAs<CalcAmoebaHarmonicInPlaneAngleForceKernel>().initialize(context.getSystem(), owner); kernel.getAs<CalcAmoebaInPlaneAngleForceKernel>().initialize(context.getSystem(), owner);
} }
double AmoebaHarmonicInPlaneAngleForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups) { double AmoebaInPlaneAngleForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups) {
if ((groups&(1<<owner.getForceGroup())) != 0) if ((groups&(1<<owner.getForceGroup())) != 0)
return kernel.getAs<CalcAmoebaHarmonicInPlaneAngleForceKernel>().execute(context, includeForces, includeEnergy); return kernel.getAs<CalcAmoebaInPlaneAngleForceKernel>().execute(context, includeForces, includeEnergy);
return 0.0; return 0.0;
} }
std::vector<std::string> AmoebaHarmonicInPlaneAngleForceImpl::getKernelNames() { std::vector<std::string> AmoebaInPlaneAngleForceImpl::getKernelNames() {
std::vector<std::string> names; std::vector<std::string> names;
names.push_back(CalcAmoebaHarmonicInPlaneAngleForceKernel::Name()); names.push_back(CalcAmoebaInPlaneAngleForceKernel::Name());
return names; return names;
} }
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
namespace OpenMM { namespace OpenMM {
/** /**
* This kernel is invoked by AmoebaHarmonicBondForce to calculate the forces acting on the system and the energy of the system. * This kernel is invoked by AmoebaBondForce to calculate the forces acting on the system and the energy of the system.
*/ */
class AmoebaCudaData { class AmoebaCudaData {
public: public:
......
...@@ -43,9 +43,9 @@ extern "C" OPENMMCUDA_EXPORT void registerKernelFactories() { ...@@ -43,9 +43,9 @@ extern "C" OPENMMCUDA_EXPORT void registerKernelFactories() {
AmoebaCudaKernelFactory* factory = new AmoebaCudaKernelFactory(); AmoebaCudaKernelFactory* factory = new AmoebaCudaKernelFactory();
platform.registerKernelFactory(CalcAmoebaHarmonicBondForceKernel::Name(), factory); platform.registerKernelFactory(CalcAmoebaBondForceKernel::Name(), factory);
platform.registerKernelFactory(CalcAmoebaHarmonicAngleForceKernel::Name(), factory); platform.registerKernelFactory(CalcAmoebaAngleForceKernel::Name(), factory);
platform.registerKernelFactory(CalcAmoebaHarmonicInPlaneAngleForceKernel::Name(), factory); platform.registerKernelFactory(CalcAmoebaInPlaneAngleForceKernel::Name(), factory);
platform.registerKernelFactory(CalcAmoebaPiTorsionForceKernel::Name(), factory); platform.registerKernelFactory(CalcAmoebaPiTorsionForceKernel::Name(), factory);
platform.registerKernelFactory(CalcAmoebaStretchBendForceKernel::Name(), factory); platform.registerKernelFactory(CalcAmoebaStretchBendForceKernel::Name(), factory);
platform.registerKernelFactory(CalcAmoebaOutOfPlaneBendForceKernel::Name(), factory); platform.registerKernelFactory(CalcAmoebaOutOfPlaneBendForceKernel::Name(), factory);
...@@ -113,14 +113,14 @@ KernelImpl* AmoebaCudaKernelFactory::createKernelImpl(std::string name, const Pl ...@@ -113,14 +113,14 @@ KernelImpl* AmoebaCudaKernelFactory::createKernelImpl(std::string name, const Pl
amoebaCudaData = mapIterator->second; amoebaCudaData = mapIterator->second;
} }
if (name == CalcAmoebaHarmonicBondForceKernel::Name()) if (name == CalcAmoebaBondForceKernel::Name())
return new CudaCalcAmoebaHarmonicBondForceKernel(name, platform, *amoebaCudaData, context.getSystem()); return new CudaCalcAmoebaBondForceKernel(name, platform, *amoebaCudaData, context.getSystem());
if (name == CalcAmoebaHarmonicAngleForceKernel::Name()) if (name == CalcAmoebaAngleForceKernel::Name())
return new CudaCalcAmoebaHarmonicAngleForceKernel(name, platform, *amoebaCudaData, context.getSystem()); return new CudaCalcAmoebaAngleForceKernel(name, platform, *amoebaCudaData, context.getSystem());
if (name == CalcAmoebaHarmonicInPlaneAngleForceKernel::Name()) if (name == CalcAmoebaInPlaneAngleForceKernel::Name())
return new CudaCalcAmoebaHarmonicInPlaneAngleForceKernel(name, platform, *amoebaCudaData, context.getSystem()); return new CudaCalcAmoebaInPlaneAngleForceKernel(name, platform, *amoebaCudaData, context.getSystem());
if (name == CalcAmoebaPiTorsionForceKernel::Name()) if (name == CalcAmoebaPiTorsionForceKernel::Name())
return new CudaCalcAmoebaPiTorsionForceKernel(name, platform, *amoebaCudaData, context.getSystem()); return new CudaCalcAmoebaPiTorsionForceKernel(name, platform, *amoebaCudaData, context.getSystem());
......
...@@ -64,12 +64,12 @@ static void computeAmoebaLocalForces( AmoebaCudaData& data ) { ...@@ -64,12 +64,12 @@ static void computeAmoebaLocalForces( AmoebaCudaData& data ) {
} }
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* AmoebaHarmonicBond * * AmoebaBondForce *
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
class CudaCalcAmoebaHarmonicBondForceKernel::ForceInfo : public CudaForceInfo { class CudaCalcAmoebaBondForceKernel::ForceInfo : public CudaForceInfo {
public: public:
ForceInfo(const AmoebaHarmonicBondForce& force) : force(force) { ForceInfo(const AmoebaBondForce& force) : force(force) {
} }
int getNumParticleGroups() { int getNumParticleGroups() {
return force.getNumBonds(); return force.getNumBonds();
...@@ -90,19 +90,19 @@ public: ...@@ -90,19 +90,19 @@ public:
return (length1 == length2 && k1 == k2); return (length1 == length2 && k1 == k2);
} }
private: private:
const AmoebaHarmonicBondForce& force; const AmoebaBondForce& force;
}; };
CudaCalcAmoebaHarmonicBondForceKernel::CudaCalcAmoebaHarmonicBondForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system) : CudaCalcAmoebaBondForceKernel::CudaCalcAmoebaBondForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system) :
CalcAmoebaHarmonicBondForceKernel(name, platform), data(data), system(system) { CalcAmoebaBondForceKernel(name, platform), data(data), system(system) {
data.incrementKernelCount(); data.incrementKernelCount();
} }
CudaCalcAmoebaHarmonicBondForceKernel::~CudaCalcAmoebaHarmonicBondForceKernel() { CudaCalcAmoebaBondForceKernel::~CudaCalcAmoebaBondForceKernel() {
data.decrementKernelCount(); data.decrementKernelCount();
} }
void CudaCalcAmoebaHarmonicBondForceKernel::initialize(const System& system, const AmoebaHarmonicBondForce& force) { void CudaCalcAmoebaBondForceKernel::initialize(const System& system, const AmoebaBondForce& force) {
data.setAmoebaLocalForcesKernel( this ); data.setAmoebaLocalForcesKernel( this );
...@@ -124,12 +124,12 @@ void CudaCalcAmoebaHarmonicBondForceKernel::initialize(const System& system, con ...@@ -124,12 +124,12 @@ void CudaCalcAmoebaHarmonicBondForceKernel::initialize(const System& system, con
quadratic[i] = static_cast<float>( kValue ); quadratic[i] = static_cast<float>( kValue );
} }
gpuSetAmoebaBondParameters( data.getAmoebaGpu(), particle1, particle2, length, quadratic, gpuSetAmoebaBondParameters( data.getAmoebaGpu(), particle1, particle2, length, quadratic,
static_cast<float>(force.getAmoebaGlobalHarmonicBondCubic()), static_cast<float>(force.getAmoebaGlobalBondCubic()),
static_cast<float>(force.getAmoebaGlobalHarmonicBondQuartic()) ); static_cast<float>(force.getAmoebaGlobalBondQuartic()) );
data.getAmoebaGpu()->gpuContext->forces.push_back(new ForceInfo(force)); data.getAmoebaGpu()->gpuContext->forces.push_back(new ForceInfo(force));
} }
double CudaCalcAmoebaHarmonicBondForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) { double CudaCalcAmoebaBondForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) {
if( data.getAmoebaLocalForcesKernel() == this ){ if( data.getAmoebaLocalForcesKernel() == this ){
computeAmoebaLocalForces( data ); computeAmoebaLocalForces( data );
} }
...@@ -137,12 +137,12 @@ double CudaCalcAmoebaHarmonicBondForceKernel::execute(ContextImpl& context, bool ...@@ -137,12 +137,12 @@ double CudaCalcAmoebaHarmonicBondForceKernel::execute(ContextImpl& context, bool
} }
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* AmoebaHarmonicAngle * * AmoebaInPlaneAngleForce *
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
class CudaCalcAmoebaHarmonicAngleForceKernel::ForceInfo : public CudaForceInfo { class CudaCalcAmoebaAngleForceKernel::ForceInfo : public CudaForceInfo {
public: public:
ForceInfo(const AmoebaHarmonicAngleForce& force) : force(force) { ForceInfo(const AmoebaAngleForce& force) : force(force) {
} }
int getNumParticleGroups() { int getNumParticleGroups() {
return force.getNumAngles(); return force.getNumAngles();
...@@ -164,19 +164,19 @@ public: ...@@ -164,19 +164,19 @@ public:
return (angle1 == angle2 && k1 == k2); return (angle1 == angle2 && k1 == k2);
} }
private: private:
const AmoebaHarmonicAngleForce& force; const AmoebaAngleForce& force;
}; };
CudaCalcAmoebaHarmonicAngleForceKernel::CudaCalcAmoebaHarmonicAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system) : CudaCalcAmoebaAngleForceKernel::CudaCalcAmoebaAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system) :
CalcAmoebaHarmonicAngleForceKernel(name, platform), data(data), system(system) { CalcAmoebaAngleForceKernel(name, platform), data(data), system(system) {
data.incrementKernelCount(); data.incrementKernelCount();
} }
CudaCalcAmoebaHarmonicAngleForceKernel::~CudaCalcAmoebaHarmonicAngleForceKernel() { CudaCalcAmoebaAngleForceKernel::~CudaCalcAmoebaAngleForceKernel() {
data.decrementKernelCount(); data.decrementKernelCount();
} }
void CudaCalcAmoebaHarmonicAngleForceKernel::initialize(const System& system, const AmoebaHarmonicAngleForce& force) { void CudaCalcAmoebaAngleForceKernel::initialize(const System& system, const AmoebaAngleForce& force) {
data.setAmoebaLocalForcesKernel( this ); data.setAmoebaLocalForcesKernel( this );
...@@ -194,14 +194,14 @@ void CudaCalcAmoebaHarmonicAngleForceKernel::initialize(const System& system, co ...@@ -194,14 +194,14 @@ void CudaCalcAmoebaHarmonicAngleForceKernel::initialize(const System& system, co
k[i] = static_cast<float>( kQuadratic ); k[i] = static_cast<float>( kQuadratic );
} }
gpuSetAmoebaAngleParameters(data.getAmoebaGpu(), particle1, particle2, particle3, angle, k, gpuSetAmoebaAngleParameters(data.getAmoebaGpu(), particle1, particle2, particle3, angle, k,
static_cast<float>(force.getAmoebaGlobalHarmonicAngleCubic()), static_cast<float>(force.getAmoebaGlobalAngleCubic()),
static_cast<float>(force.getAmoebaGlobalHarmonicAngleQuartic()), static_cast<float>(force.getAmoebaGlobalAngleQuartic()),
static_cast<float>(force.getAmoebaGlobalHarmonicAnglePentic()), static_cast<float>(force.getAmoebaGlobalAnglePentic()),
static_cast<float>(force.getAmoebaGlobalHarmonicAngleSextic()) ); static_cast<float>(force.getAmoebaGlobalAngleSextic()) );
data.getAmoebaGpu()->gpuContext->forces.push_back(new ForceInfo(force)); data.getAmoebaGpu()->gpuContext->forces.push_back(new ForceInfo(force));
} }
double CudaCalcAmoebaHarmonicAngleForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) { double CudaCalcAmoebaAngleForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) {
if( data.getAmoebaLocalForcesKernel() == this ){ if( data.getAmoebaLocalForcesKernel() == this ){
computeAmoebaLocalForces( data ); computeAmoebaLocalForces( data );
} }
...@@ -209,12 +209,12 @@ double CudaCalcAmoebaHarmonicAngleForceKernel::execute(ContextImpl& context, boo ...@@ -209,12 +209,12 @@ double CudaCalcAmoebaHarmonicAngleForceKernel::execute(ContextImpl& context, boo
} }
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* AmoebaHarmonicInPlaneAngle * * AmoebaInPlaneAngleForce *
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
class CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::ForceInfo : public CudaForceInfo { class CudaCalcAmoebaInPlaneAngleForceKernel::ForceInfo : public CudaForceInfo {
public: public:
ForceInfo(const AmoebaHarmonicInPlaneAngleForce& force) : force(force) { ForceInfo(const AmoebaInPlaneAngleForce& force) : force(force) {
} }
int getNumParticleGroups() { int getNumParticleGroups() {
return force.getNumAngles(); return force.getNumAngles();
...@@ -237,19 +237,19 @@ public: ...@@ -237,19 +237,19 @@ public:
return (angle1 == angle2 && k1 == k2); return (angle1 == angle2 && k1 == k2);
} }
private: private:
const AmoebaHarmonicInPlaneAngleForce& force; const AmoebaInPlaneAngleForce& force;
}; };
CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::CudaCalcAmoebaHarmonicInPlaneAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system) : CudaCalcAmoebaInPlaneAngleForceKernel::CudaCalcAmoebaInPlaneAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system) :
CalcAmoebaHarmonicInPlaneAngleForceKernel(name, platform), data(data), system(system) { CalcAmoebaInPlaneAngleForceKernel(name, platform), data(data), system(system) {
data.incrementKernelCount(); data.incrementKernelCount();
} }
CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::~CudaCalcAmoebaHarmonicInPlaneAngleForceKernel() { CudaCalcAmoebaInPlaneAngleForceKernel::~CudaCalcAmoebaInPlaneAngleForceKernel() {
data.decrementKernelCount(); data.decrementKernelCount();
} }
void CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::initialize(const System& system, const AmoebaHarmonicInPlaneAngleForce& force) { void CudaCalcAmoebaInPlaneAngleForceKernel::initialize(const System& system, const AmoebaInPlaneAngleForce& force) {
data.setAmoebaLocalForcesKernel( this ); data.setAmoebaLocalForcesKernel( this );
...@@ -270,14 +270,14 @@ void CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::initialize(const System& sys ...@@ -270,14 +270,14 @@ void CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::initialize(const System& sys
k[i] = static_cast<float>( kQuadratic ); k[i] = static_cast<float>( kQuadratic );
} }
gpuSetAmoebaInPlaneAngleParameters(data.getAmoebaGpu(), particle1, particle2, particle3, particle4, angle, k, gpuSetAmoebaInPlaneAngleParameters(data.getAmoebaGpu(), particle1, particle2, particle3, particle4, angle, k,
static_cast<float>( force.getAmoebaGlobalHarmonicInPlaneAngleCubic()), static_cast<float>( force.getAmoebaGlobalInPlaneAngleCubic()),
static_cast<float>( force.getAmoebaGlobalHarmonicInPlaneAngleQuartic()), static_cast<float>( force.getAmoebaGlobalInPlaneAngleQuartic()),
static_cast<float>( force.getAmoebaGlobalHarmonicInPlaneAnglePentic()), static_cast<float>( force.getAmoebaGlobalInPlaneAnglePentic()),
static_cast<float>( force.getAmoebaGlobalHarmonicInPlaneAngleSextic() ) ); static_cast<float>( force.getAmoebaGlobalInPlaneAngleSextic() ) );
data.getAmoebaGpu()->gpuContext->forces.push_back(new ForceInfo(force)); data.getAmoebaGpu()->gpuContext->forces.push_back(new ForceInfo(force));
} }
double CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) { double CudaCalcAmoebaInPlaneAngleForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) {
if( data.getAmoebaLocalForcesKernel() == this ){ if( data.getAmoebaLocalForcesKernel() == this ){
computeAmoebaLocalForces( data ); computeAmoebaLocalForces( data );
} }
...@@ -285,7 +285,7 @@ double CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::execute(ContextImpl& conte ...@@ -285,7 +285,7 @@ double CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::execute(ContextImpl& conte
} }
/* -------------------------------------------------------------------------- * /* -------------------------------------------------------------------------- *
* AmoebaHarmonicPiTorsion * * AmoebaPiTorsionForce *
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
class CudaCalcAmoebaPiTorsionForceKernel::ForceInfo : public CudaForceInfo { class CudaCalcAmoebaPiTorsionForceKernel::ForceInfo : public CudaForceInfo {
......
...@@ -36,22 +36,22 @@ ...@@ -36,22 +36,22 @@
namespace OpenMM { namespace OpenMM {
/** /**
* This kernel is invoked by AmoebaHarmonicBondForce to calculate the forces acting on the system and the energy of the system. * This kernel is invoked by AmoebaBondForce to calculate the forces acting on the system and the energy of the system.
*/ */
class CudaCalcAmoebaHarmonicBondForceKernel : public CalcAmoebaHarmonicBondForceKernel { class CudaCalcAmoebaBondForceKernel : public CalcAmoebaBondForceKernel {
public: public:
CudaCalcAmoebaHarmonicBondForceKernel(std::string name, CudaCalcAmoebaBondForceKernel(std::string name,
const Platform& platform, const Platform& platform,
AmoebaCudaData& data, AmoebaCudaData& data,
System& system); System& system);
~CudaCalcAmoebaHarmonicBondForceKernel(); ~CudaCalcAmoebaBondForceKernel();
/** /**
* Initialize the kernel. * Initialize the kernel.
* *
* @param system the System this kernel will be applied to * @param system the System this kernel will be applied to
* @param force the AmoebaHarmonicBondForce this kernel will be used for * @param force the AmoebaBondForce this kernel will be used for
*/ */
void initialize(const System& system, const AmoebaHarmonicBondForce& force); void initialize(const System& system, const AmoebaBondForce& force);
/** /**
* Execute the kernel to calculate the forces and/or energy. * Execute the kernel to calculate the forces and/or energy.
* *
...@@ -69,19 +69,19 @@ private: ...@@ -69,19 +69,19 @@ private:
}; };
/** /**
* This kernel is invoked by AmoebaHarmonicAngleForce to calculate the forces acting on the system and the energy of the system. * This kernel is invoked by AmoebaAngleForce to calculate the forces acting on the system and the energy of the system.
*/ */
class CudaCalcAmoebaHarmonicAngleForceKernel : public CalcAmoebaHarmonicAngleForceKernel { class CudaCalcAmoebaAngleForceKernel : public CalcAmoebaAngleForceKernel {
public: public:
CudaCalcAmoebaHarmonicAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system); CudaCalcAmoebaAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system);
~CudaCalcAmoebaHarmonicAngleForceKernel(); ~CudaCalcAmoebaAngleForceKernel();
/** /**
* Initialize the kernel. * Initialize the kernel.
* *
* @param system the System this kernel will be applied to * @param system the System this kernel will be applied to
* @param force the AmoebaHarmonicAngleForce this kernel will be used for * @param force the AmoebaAngleForce this kernel will be used for
*/ */
void initialize(const System& system, const AmoebaHarmonicAngleForce& force); void initialize(const System& system, const AmoebaAngleForce& force);
/** /**
* Execute the kernel to calculate the forces and/or energy. * Execute the kernel to calculate the forces and/or energy.
* *
...@@ -99,19 +99,19 @@ private: ...@@ -99,19 +99,19 @@ private:
}; };
/** /**
* This kernel is invoked by AmoebaHarmonicInPlaneAngleForce to calculate the forces acting on the system and the energy of the system. * This kernel is invoked by AmoebaInPlaneAngleForce to calculate the forces acting on the system and the energy of the system.
*/ */
class CudaCalcAmoebaHarmonicInPlaneAngleForceKernel : public CalcAmoebaHarmonicInPlaneAngleForceKernel { class CudaCalcAmoebaInPlaneAngleForceKernel : public CalcAmoebaInPlaneAngleForceKernel {
public: public:
CudaCalcAmoebaHarmonicInPlaneAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system); CudaCalcAmoebaInPlaneAngleForceKernel(std::string name, const Platform& platform, AmoebaCudaData& data, System& system);
~CudaCalcAmoebaHarmonicInPlaneAngleForceKernel(); ~CudaCalcAmoebaInPlaneAngleForceKernel();
/** /**
* Initialize the kernel. * Initialize the kernel.
* *
* @param system the System this kernel will be applied to * @param system the System this kernel will be applied to
* @param force the AmoebaHarmonicInPlaneAngleForce this kernel will be used for * @param force the AmoebaInPlaneAngleForce this kernel will be used for
*/ */
void initialize(const System& system, const AmoebaHarmonicInPlaneAngleForce& force); void initialize(const System& system, const AmoebaInPlaneAngleForce& force);
/** /**
* Execute the kernel to calculate the forces and/or energy. * Execute the kernel to calculate the forces and/or energy.
* *
......
...@@ -735,7 +735,7 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM ...@@ -735,7 +735,7 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
throwException(__FILE__, __LINE__, buffer ); throwException(__FILE__, __LINE__, buffer );
} }
AmoebaHarmonicBondForce* bondForce = new AmoebaHarmonicBondForce(); AmoebaBondForce* bondForce = new AmoebaBondForce();
MapStringIntI forceActive = forceMap.find( AMOEBA_HARMONIC_BOND_FORCE ); MapStringIntI forceActive = forceMap.find( AMOEBA_HARMONIC_BOND_FORCE );
if( forceActive != forceMap.end() && (*forceActive).second ){ if( forceActive != forceMap.end() && (*forceActive).second ){
system.addForce( bondForce ); system.addForce( bondForce );
...@@ -763,7 +763,7 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM ...@@ -763,7 +763,7 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
bondForce->addBond( particle1, particle2, length, k ); bondForce->addBond( particle1, particle2, length, k );
} else { } else {
char buffer[1024]; char buffer[1024];
(void) sprintf( buffer, "%s AmoebaHarmonicBondForce tokens incomplete at line=%d\n", methodName.c_str(), *lineCount ); (void) sprintf( buffer, "%s AmoebaBondForce tokens incomplete at line=%d\n", methodName.c_str(), *lineCount );
(void) fprintf( log, "%s", buffer ); (void) fprintf( log, "%s", buffer );
throwException(__FILE__, __LINE__, buffer ); throwException(__FILE__, __LINE__, buffer );
} }
...@@ -788,11 +788,11 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM ...@@ -788,11 +788,11 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
} else if( field == "AmoebaHarmonicBondCubic" ){ } else if( field == "AmoebaHarmonicBondCubic" ){
double cubicParameter = atof( tokens[1].c_str() ); double cubicParameter = atof( tokens[1].c_str() );
bondForce->setAmoebaGlobalHarmonicBondCubic( cubicParameter ); bondForce->setAmoebaGlobalBondCubic( cubicParameter );
hits++; hits++;
} else if( field == "AmoebaHarmonicBondQuartic" ){ } else if( field == "AmoebaHarmonicBondQuartic" ){
double quarticParameter = atof( tokens[1].c_str() ); double quarticParameter = atof( tokens[1].c_str() );
bondForce->setAmoebaGlobalHarmonicBondQuartic( quarticParameter ); bondForce->setAmoebaGlobalBondQuartic( quarticParameter );
hits++; hits++;
} }
} }
...@@ -817,8 +817,8 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM ...@@ -817,8 +817,8 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
double cubic = 0.0; double cubic = 0.0;
double quartic = 0.0; double quartic = 0.0;
bondForce->setAmoebaGlobalHarmonicBondCubic( cubic ); bondForce->setAmoebaGlobalBondCubic( cubic );
bondForce->setAmoebaGlobalHarmonicBondQuartic( quartic ); bondForce->setAmoebaGlobalBondQuartic( quartic );
for( int ii = 0; ii < bondForce->getNumBonds(); ii++ ){ for( int ii = 0; ii < bondForce->getNumBonds(); ii++ ){
int particle1, particle2; int particle1, particle2;
...@@ -831,11 +831,11 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM ...@@ -831,11 +831,11 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
if( useOpenMMUnits ){ if( useOpenMMUnits ){
double cubic = bondForce->getAmoebaGlobalHarmonicBondCubic()/AngstromToNm; double cubic = bondForce->getAmoebaGlobalBondCubic()/AngstromToNm;
double quartic = bondForce->getAmoebaGlobalHarmonicBondQuartic()/(AngstromToNm*AngstromToNm); double quartic = bondForce->getAmoebaGlobalBondQuartic()/(AngstromToNm*AngstromToNm);
bondForce->setAmoebaGlobalHarmonicBondCubic( cubic ); bondForce->setAmoebaGlobalBondCubic( cubic );
bondForce->setAmoebaGlobalHarmonicBondQuartic( quartic ); bondForce->setAmoebaGlobalBondQuartic( quartic );
// scale equilibrium bond lengths/force prefactor k // scale equilibrium bond lengths/force prefactor k
...@@ -854,9 +854,9 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM ...@@ -854,9 +854,9 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
if( log ){ if( log ){
static const unsigned int maxPrint = MAX_PRINT; static const unsigned int maxPrint = MAX_PRINT;
unsigned int arraySize = static_cast<unsigned int>(bondForce->getNumBonds()); unsigned int arraySize = static_cast<unsigned int>(bondForce->getNumBonds());
(void) fprintf( log, "%s: %u sample of AmoebaHarmonicBondForce parameters in %s units; cubic=%15.7e quartic=%15.7e\n", (void) fprintf( log, "%s: %u sample of AmoebaBondForce parameters in %s units; cubic=%15.7e quartic=%15.7e\n",
methodName.c_str(), arraySize, (useOpenMMUnits ? "OpenMM" : "Amoeba"), methodName.c_str(), arraySize, (useOpenMMUnits ? "OpenMM" : "Amoeba"),
bondForce->getAmoebaGlobalHarmonicBondCubic(), bondForce->getAmoebaGlobalHarmonicBondQuartic() ); bondForce->getAmoebaGlobalBondCubic(), bondForce->getAmoebaGlobalBondQuartic() );
for( unsigned int ii = 0; ii < arraySize; ii++ ){ for( unsigned int ii = 0; ii < arraySize; ii++ ){
int particle1, particle2; int particle1, particle2;
double length, k; double length, k;
...@@ -906,7 +906,7 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force ...@@ -906,7 +906,7 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
throwException(__FILE__, __LINE__, buffer ); throwException(__FILE__, __LINE__, buffer );
} }
AmoebaHarmonicAngleForce* angleForce = new AmoebaHarmonicAngleForce(); AmoebaAngleForce* angleForce = new AmoebaAngleForce();
MapStringIntI forceActive = forceMap.find( AMOEBA_HARMONIC_ANGLE_FORCE ); MapStringIntI forceActive = forceMap.find( AMOEBA_HARMONIC_ANGLE_FORCE );
if( forceActive != forceMap.end() && (*forceActive).second ){ if( forceActive != forceMap.end() && (*forceActive).second ){
system.addForce( angleForce ); system.addForce( angleForce );
...@@ -936,7 +936,7 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force ...@@ -936,7 +936,7 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
angleForce->addAngle( particle1, particle2, particle3, angle, k ); angleForce->addAngle( particle1, particle2, particle3, angle, k );
} else { } else {
char buffer[1024]; char buffer[1024];
(void) sprintf( buffer, "%s AmoebaHarmonicAngleForce tokens incomplete at line=%d\n", methodName.c_str(), *lineCount ); (void) sprintf( buffer, "%s AmoebaAngleForce tokens incomplete at line=%d\n", methodName.c_str(), *lineCount );
(void) fprintf( log, "%s", buffer ); (void) fprintf( log, "%s", buffer );
throwException(__FILE__, __LINE__, buffer ); throwException(__FILE__, __LINE__, buffer );
} }
...@@ -960,16 +960,16 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force ...@@ -960,16 +960,16 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
} }
} else if( field == "AmoebaHarmonicAngleCubic" ){ } else if( field == "AmoebaHarmonicAngleCubic" ){
angleForce->setAmoebaGlobalHarmonicAngleCubic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalAngleCubic( atof( tokens[1].c_str() ) );
hits++; hits++;
} else if( field == "AmoebaHarmonicAngleQuartic" ){ } else if( field == "AmoebaHarmonicAngleQuartic" ){
angleForce->setAmoebaGlobalHarmonicAngleQuartic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalAngleQuartic( atof( tokens[1].c_str() ) );
hits++; hits++;
} else if( field == "AmoebaHarmonicAnglePentic" ){ } else if( field == "AmoebaHarmonicAnglePentic" ){
angleForce->setAmoebaGlobalHarmonicAnglePentic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalAnglePentic( atof( tokens[1].c_str() ) );
hits++; hits++;
} else if( field == "AmoebaHarmonicAngleSextic" ){ } else if( field == "AmoebaHarmonicAngleSextic" ){
angleForce->setAmoebaGlobalHarmonicAngleSextic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalAngleSextic( atof( tokens[1].c_str() ) );
hits++; hits++;
} }
} }
...@@ -992,11 +992,11 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force ...@@ -992,11 +992,11 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
if( log ){ if( log ){
static const unsigned int maxPrint = MAX_PRINT; static const unsigned int maxPrint = MAX_PRINT;
unsigned int arraySize = static_cast<unsigned int>(angleForce->getNumAngles()); unsigned int arraySize = static_cast<unsigned int>(angleForce->getNumAngles());
(void) fprintf( log, "%s: %u sample of AmoebaHarmonicAngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e\n", (void) fprintf( log, "%s: %u sample of AmoebaAngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e\n",
methodName.c_str(), arraySize, (useOpenMMUnits ? "OpenMM" : "Amoeba"), methodName.c_str(), arraySize, (useOpenMMUnits ? "OpenMM" : "Amoeba"),
angleForce->getAmoebaGlobalHarmonicAngleCubic(), angleForce->getAmoebaGlobalAngleCubic(),
angleForce->getAmoebaGlobalHarmonicAngleQuartic(), angleForce->getAmoebaGlobalHarmonicAnglePentic(), angleForce->getAmoebaGlobalAngleQuartic(), angleForce->getAmoebaGlobalAnglePentic(),
angleForce->getAmoebaGlobalHarmonicAngleSextic() ); angleForce->getAmoebaGlobalAngleSextic() );
for( unsigned int ii = 0; ii < arraySize; ii++ ){ for( unsigned int ii = 0; ii < arraySize; ii++ ){
int particle1, particle2, particle3; int particle1, particle2, particle3;
...@@ -1048,7 +1048,7 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt ...@@ -1048,7 +1048,7 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
throwException(__FILE__, __LINE__, buffer ); throwException(__FILE__, __LINE__, buffer );
} }
AmoebaHarmonicInPlaneAngleForce* angleForce = new AmoebaHarmonicInPlaneAngleForce(); AmoebaInPlaneAngleForce* angleForce = new AmoebaInPlaneAngleForce();
MapStringIntI forceActive = forceMap.find( AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE ); MapStringIntI forceActive = forceMap.find( AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE );
if( forceActive != forceMap.end() && (*forceActive).second ){ if( forceActive != forceMap.end() && (*forceActive).second ){
system.addForce( angleForce ); system.addForce( angleForce );
...@@ -1078,7 +1078,7 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt ...@@ -1078,7 +1078,7 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
angleForce->addAngle( particle1, particle2, particle3, particle4, angle, k ); angleForce->addAngle( particle1, particle2, particle3, particle4, angle, k );
} else { } else {
char buffer[1024]; char buffer[1024];
(void) sprintf( buffer, "%s AmoebaHarmonicInPlaneAngleForce tokens incomplete at line=%d\n", methodName.c_str(), *lineCount ); (void) sprintf( buffer, "%s AmoebaInPlaneAngleForce tokens incomplete at line=%d\n", methodName.c_str(), *lineCount );
(void) fprintf( log, "%s", buffer ); (void) fprintf( log, "%s", buffer );
throwException(__FILE__, __LINE__, buffer ); throwException(__FILE__, __LINE__, buffer );
} }
...@@ -1101,16 +1101,16 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt ...@@ -1101,16 +1101,16 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
} }
} else if( field == "AmoebaHarmonicInPlaneAngleCubic" ){ } else if( field == "AmoebaHarmonicInPlaneAngleCubic" ){
angleForce->setAmoebaGlobalHarmonicInPlaneAngleCubic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalInPlaneAngleCubic( atof( tokens[1].c_str() ) );
hits++; hits++;
} else if( field == "AmoebaHarmonicInPlaneAngleQuartic" ){ } else if( field == "AmoebaHarmonicInPlaneAngleQuartic" ){
angleForce->setAmoebaGlobalHarmonicInPlaneAngleQuartic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalInPlaneAngleQuartic( atof( tokens[1].c_str() ) );
hits++; hits++;
} else if( field == "AmoebaHarmonicInPlaneAnglePentic" ){ } else if( field == "AmoebaHarmonicInPlaneAnglePentic" ){
angleForce->setAmoebaGlobalHarmonicInPlaneAnglePentic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalInPlaneAnglePentic( atof( tokens[1].c_str() ) );
hits++; hits++;
} else if( field == "AmoebaHarmonicInPlaneAngleSextic" ){ } else if( field == "AmoebaHarmonicInPlaneAngleSextic" ){
angleForce->setAmoebaGlobalHarmonicInPlaneAngleSextic( atof( tokens[1].c_str() ) ); angleForce->setAmoebaGlobalInPlaneAngleSextic( atof( tokens[1].c_str() ) );
hits++; hits++;
} }
} }
...@@ -1133,12 +1133,12 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt ...@@ -1133,12 +1133,12 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
if( log ){ if( log ){
static const unsigned int maxPrint = MAX_PRINT; static const unsigned int maxPrint = MAX_PRINT;
unsigned int arraySize = static_cast<unsigned int>(angleForce->getNumAngles()); unsigned int arraySize = static_cast<unsigned int>(angleForce->getNumAngles());
(void) fprintf( log, "%s: %u sample of AmoebaHarmonicInPlaneAngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e\n", (void) fprintf( log, "%s: %u sample of AmoebaInPlaneAngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e\n",
methodName.c_str(), arraySize, (useOpenMMUnits ? "OpenMM" : "Amoeba"), methodName.c_str(), arraySize, (useOpenMMUnits ? "OpenMM" : "Amoeba"),
angleForce->getAmoebaGlobalHarmonicInPlaneAngleCubic(), angleForce->getAmoebaGlobalInPlaneAngleCubic(),
angleForce->getAmoebaGlobalHarmonicInPlaneAngleQuartic(), angleForce->getAmoebaGlobalInPlaneAngleQuartic(),
angleForce->getAmoebaGlobalHarmonicInPlaneAnglePentic(), angleForce->getAmoebaGlobalInPlaneAnglePentic(),
angleForce->getAmoebaGlobalHarmonicInPlaneAngleSextic() ); angleForce->getAmoebaGlobalInPlaneAngleSextic() );
for( unsigned int ii = 0; ii < arraySize; ii++ ){ for( unsigned int ii = 0; ii < arraySize; ii++ ){
int particle1, particle2, particle3, particle4; int particle1, particle2, particle3, particle4;
...@@ -3452,7 +3452,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l ...@@ -3452,7 +3452,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l
if( !hit ){ if( !hit ){
try { try {
AmoebaHarmonicBondForce& harmonicBondForce = dynamic_cast<AmoebaHarmonicBondForce&>(force); AmoebaBondForce& harmonicBondForce = dynamic_cast<AmoebaBondForce&>(force);
forceMap[AMOEBA_HARMONIC_BOND_FORCE] = &force; forceMap[AMOEBA_HARMONIC_BOND_FORCE] = &force;
hit++; hit++;
} catch( std::bad_cast ){ } catch( std::bad_cast ){
...@@ -3570,7 +3570,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l ...@@ -3570,7 +3570,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l
if( !hit ){ if( !hit ){
try { try {
AmoebaHarmonicAngleForce & harmonicAngleForce = dynamic_cast<AmoebaHarmonicAngleForce&>(force); AmoebaAngleForce & harmonicAngleForce = dynamic_cast<AmoebaAngleForce&>(force);
forceMap[AMOEBA_HARMONIC_ANGLE_FORCE] = &force; forceMap[AMOEBA_HARMONIC_ANGLE_FORCE] = &force;
hit++; hit++;
} catch( std::bad_cast ){ } catch( std::bad_cast ){
...@@ -3582,7 +3582,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l ...@@ -3582,7 +3582,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l
if( !hit ){ if( !hit ){
try { try {
AmoebaHarmonicInPlaneAngleForce & harmonicAngleForce = dynamic_cast<AmoebaHarmonicInPlaneAngleForce&>(force); AmoebaInPlaneAngleForce & harmonicAngleForce = dynamic_cast<AmoebaInPlaneAngleForce&>(force);
forceMap[AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE] = &force; forceMap[AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE] = &force;
hit++; hit++;
} catch( std::bad_cast ){ } catch( std::bad_cast ){
...@@ -3737,7 +3737,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS ...@@ -3737,7 +3737,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS
} else if( field == "AmoebaHarmonicBondParameters" ){ } else if( field == "AmoebaHarmonicBondParameters" ){
readAmoebaHarmonicBondParameters( filePtr, forceMap, tokens, system, useOpenMMUnits, inputArgumentMap,&lineCount, log ); readAmoebaHarmonicBondParameters( filePtr, forceMap, tokens, system, useOpenMMUnits, inputArgumentMap,&lineCount, log );
} else if( field == "AmoebaHarmonicBondForce" ){ } else if( field == "AmoebaBondForce" ){
readVec3( filePtr, tokens, forces[AMOEBA_HARMONIC_BOND_FORCE], &lineCount, field, log ); readVec3( filePtr, tokens, forces[AMOEBA_HARMONIC_BOND_FORCE], &lineCount, field, log );
} else if( field == "AmoebaHarmonicBondEnergy" ){ } else if( field == "AmoebaHarmonicBondEnergy" ){
if( tokens.size() > 1 ){ if( tokens.size() > 1 ){
...@@ -3759,7 +3759,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS ...@@ -3759,7 +3759,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS
} else if( field == "AmoebaHarmonicAngleParameters" ){ } else if( field == "AmoebaHarmonicAngleParameters" ){
readAmoebaHarmonicAngleParameters( filePtr, forceMap, tokens, system, useOpenMMUnits, inputArgumentMap, &lineCount, log ); readAmoebaHarmonicAngleParameters( filePtr, forceMap, tokens, system, useOpenMMUnits, inputArgumentMap, &lineCount, log );
} else if( field == "AmoebaHarmonicAngleForce" ){ } else if( field == "AmoebaAngleForce" ){
readVec3( filePtr, tokens, forces[AMOEBA_HARMONIC_ANGLE_FORCE], &lineCount, field, log ); readVec3( filePtr, tokens, forces[AMOEBA_HARMONIC_ANGLE_FORCE], &lineCount, field, log );
} else if( field == "AmoebaHarmonicAngleEnergy" ){ } else if( field == "AmoebaHarmonicAngleEnergy" ){
if( tokens.size() > 1 ){ if( tokens.size() > 1 ){
...@@ -3770,7 +3770,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS ...@@ -3770,7 +3770,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS
} else if( field == "AmoebaHarmonicInPlaneAngleParameters" ){ } else if( field == "AmoebaHarmonicInPlaneAngleParameters" ){
readAmoebaHarmonicInPlaneAngleParameters( filePtr, forceMap, tokens, system, useOpenMMUnits, inputArgumentMap, &lineCount, log ); readAmoebaHarmonicInPlaneAngleParameters( filePtr, forceMap, tokens, system, useOpenMMUnits, inputArgumentMap, &lineCount, log );
} else if( field == "AmoebaHarmonicInPlaneAngleForce" ){ } else if( field == "AmoebaInPlaneAngleForce" ){
readVec3( filePtr, tokens, forces[AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE], &lineCount, field, log ); readVec3( filePtr, tokens, forces[AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE], &lineCount, field, log );
} else if( field == "AmoebaHarmonicInPlaneAngleEnergy" ){ } else if( field == "AmoebaHarmonicInPlaneAngleEnergy" ){
if( tokens.size() > 1 ){ if( tokens.size() > 1 ){
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include "openmm/VariableVerletIntegrator.h" #include "openmm/VariableVerletIntegrator.h"
#include "openmm/BrownianIntegrator.h" #include "openmm/BrownianIntegrator.h"
#include "openmm/AmoebaHarmonicBondForce.h" #include "openmm/AmoebaBondForce.h"
#include "openmm/AmoebaHarmonicAngleForce.h" #include "openmm/AmoebaAngleForce.h"
#include "openmm/AmoebaHarmonicInPlaneAngleForce.h" #include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/AmoebaTorsionForce.h" #include "openmm/AmoebaTorsionForce.h"
#include "openmm/AmoebaPiTorsionForce.h" #include "openmm/AmoebaPiTorsionForce.h"
#include "openmm/AmoebaStretchBendForce.h" #include "openmm/AmoebaStretchBendForce.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment