1 #ifndef OPENMM_SYSTEM_H_
2 #define OPENMM_SYSTEM_H_
37 #include "internal/windowsExport.h"
89 masses.push_back(mass);
90 return masses.size()-1;
100 double getParticleMass(
int index)
const;
110 void setParticleMass(
int index,
double mass);
120 void setVirtualSite(
int index,
VirtualSite* virtualSite);
127 return (index < (
int) virtualSites.size() && virtualSites[index] != NULL);
135 const VirtualSite& getVirtualSite(
int index)
const;
140 return constraints.size();
151 int addConstraint(
int particle1,
int particle2,
double distance);
160 void getConstraintParameters(
int index,
int& particle1,
int& particle2,
double& distance)
const;
170 void setConstraintParameters(
int index,
int particle1,
int particle2,
double distance);
180 forces.push_back(force);
181 return forces.size()-1;
187 return forces.size();
194 const Force& getForce(
int index)
const;
200 Force& getForce(
int index);
213 void getDefaultPeriodicBoxVectors(
Vec3& a,
Vec3& b,
Vec3& c)
const;
226 void setDefaultPeriodicBoxVectors(
const Vec3& a,
const Vec3& b,
const Vec3& c);
228 class ConstraintInfo;
229 Vec3 periodicBoxVectors[3];
230 std::vector<double> masses;
231 std::vector<ConstraintInfo> constraints;
232 std::vector<Force*> forces;
233 std::vector<VirtualSite*> virtualSites;
240 class System::ConstraintInfo {
242 int particle1, particle2;
245 particle1 = particle2 = -1;
248 ConstraintInfo(
int particle1,
int particle2,
double distance) :
249 particle1(particle1), particle2(particle2), distance(distance) {