1 #ifndef OPENMM_CUSTOMTORSIONFORCE_H_
2 #define OPENMM_CUSTOMTORSIONFORCE_H_
38 #include "internal/windowsExport.h"
86 return torsions.size();
92 return parameters.size();
98 return globalParameters.size();
103 const std::string& getEnergyFunction()
const;
107 void setEnergyFunction(
const std::string& energy);
114 int addPerTorsionParameter(
const std::string& name);
121 const std::string& getPerTorsionParameterName(
int index)
const;
128 void setPerTorsionParameterName(
int index,
const std::string& name);
136 int addGlobalParameter(
const std::string& name,
double defaultValue);
143 const std::string& getGlobalParameterName(
int index)
const;
150 void setGlobalParameterName(
int index,
const std::string& name);
157 double getGlobalParameterDefaultValue(
int index)
const;
164 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
175 int addTorsion(
int particle1,
int particle2,
int particle3,
int particle4,
const std::vector<double>& parameters);
186 void getTorsionParameters(
int index,
int& particle1,
int& particle2,
int& particle3,
int& particle4, std::vector<double>& parameters)
const;
197 void setTorsionParameters(
int index,
int particle1,
int particle2,
int particle3,
int particle4,
const std::vector<double>& parameters);
208 void updateParametersInContext(
Context& context);
219 ForceImpl* createImpl()
const;
222 class TorsionParameterInfo;
223 class GlobalParameterInfo;
224 std::string energyExpression;
225 std::vector<TorsionParameterInfo> parameters;
226 std::vector<GlobalParameterInfo> globalParameters;
227 std::vector<TorsionInfo> torsions;
234 class CustomTorsionForce::TorsionInfo {
236 int particle1, particle2, particle3, particle4;
237 std::vector<double> parameters;
238 TorsionInfo() : particle1(-1), particle2(-1), particle3(-1), particle4(-1) {
240 TorsionInfo(
int particle1,
int particle2,
int particle3,
int particle4,
const std::vector<double>& parameters) :
241 particle1(particle1), particle2(particle2), particle3(particle3), particle4(particle4), parameters(parameters) {
249 class CustomTorsionForce::TorsionParameterInfo {
252 TorsionParameterInfo() {
254 TorsionParameterInfo(
const std::string& name) : name(name) {
262 class CustomTorsionForce::GlobalParameterInfo {
266 GlobalParameterInfo() {
268 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
This class implements interactions between sets of four particles that depend on the torsion angle be...
Definition: CustomTorsionForce.h:73
int getNumPerTorsionParameters() const
Get the number of per-torsion parameters that the interaction depends on.
Definition: CustomTorsionForce.h:91
A Context stores the complete state of a simulation.
Definition: Context.h:67
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomTorsionForce.h:97
int getNumTorsions() const
Get the number of torsions for which force field parameters have been defined.
Definition: CustomTorsionForce.h:85
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: CustomTorsionForce.h:215
Definition: AndersenThermostat.h:40