1 #ifndef OPENMM_CUSTOMANGLEFORCE_H_
2 #define OPENMM_CUSTOMANGLEFORCE_H_
38 #include "internal/windowsExport.h"
91 return parameters.size();
97 return globalParameters.size();
102 const std::string& getEnergyFunction()
const;
106 void setEnergyFunction(
const std::string& energy);
113 int addPerAngleParameter(
const std::string& name);
120 const std::string& getPerAngleParameterName(
int index)
const;
127 void setPerAngleParameterName(
int index,
const std::string& name);
135 int addGlobalParameter(
const std::string& name,
double defaultValue);
142 const std::string& getGlobalParameterName(
int index)
const;
149 void setGlobalParameterName(
int index,
const std::string& name);
156 double getGlobalParameterDefaultValue(
int index)
const;
163 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
173 int addAngle(
int particle1,
int particle2,
int particle3,
const std::vector<double>& parameters);
183 void getAngleParameters(
int index,
int& particle1,
int& particle2,
int& particle3, std::vector<double>& parameters)
const;
193 void setAngleParameters(
int index,
int particle1,
int particle2,
int particle3,
const std::vector<double>& parameters);
204 void updateParametersInContext(
Context& context);
209 class AngleParameterInfo;
210 class GlobalParameterInfo;
211 std::string energyExpression;
212 std::vector<AngleParameterInfo> parameters;
213 std::vector<GlobalParameterInfo> globalParameters;
214 std::vector<AngleInfo> angles;
221 class CustomAngleForce::AngleInfo {
223 int particle1, particle2, particle3;
224 std::vector<double> parameters;
225 AngleInfo() : particle1(-1), particle2(-1), particle3(-1) {
227 AngleInfo(
int particle1,
int particle2,
int particle3,
const std::vector<double>& parameters) :
228 particle1(particle1), particle2(particle2), particle3(particle3), parameters(parameters) {
236 class CustomAngleForce::AngleParameterInfo {
239 AngleParameterInfo() {
241 AngleParameterInfo(
const std::string& name) : name(name) {
249 class CustomAngleForce::GlobalParameterInfo {
253 GlobalParameterInfo() {
255 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
int getNumPerAngleParameters() const
Get the number of per-angle parameters that the interaction depends on.
Definition: CustomAngleForce.h:90
A Context stores the complete state of a simulation.
Definition: Context.h:67
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomAngleForce.h:96
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
int getNumAngles() const
Get the number of angles for which force field parameters have been defined.
Definition: CustomAngleForce.h:84
A ForceImpl provides the internal implementation of a Force.
Definition: ForceImpl.h:57
This class implements interactions between sets of three particles that depend on the angle between t...
Definition: CustomAngleForce.h:72