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) {
int getNumConstraints() const
Get the number of distance constraints in this System.
Definition: System.h:139
A VirtualSite describes the rules for computing a particle's position based on other particles...
Definition: VirtualSite.h:47
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
int getNumForces() const
Get the number of Force objects that have been added to the System.
Definition: System.h:186
This class represents a molecular system.
Definition: System.h:66
This class represents a three component vector.
Definition: Vec3.h:45
int addForce(Force *force)
Add a Force to the System.
Definition: System.h:179
int addParticle(double mass)
Add a particle to the System.
Definition: System.h:88
bool isVirtualSite(int index) const
Get whether a particle is a VirtualSite.
Definition: System.h:126
int getNumParticles() const
Get the number of particles in this System.
Definition: System.h:76