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);
176 void removeConstraint(
int index);
186 forces.push_back(force);
187 return forces.size()-1;
193 return forces.size();
200 const Force& getForce(
int index)
const;
206 Force& getForce(
int index);
213 void removeForce(
int index);
223 void getDefaultPeriodicBoxVectors(
Vec3& a,
Vec3& b,
Vec3& c)
const;
237 void setDefaultPeriodicBoxVectors(
const Vec3& a,
const Vec3& b,
const Vec3& c);
246 bool usesPeriodicBoundaryConditions();
248 class ConstraintInfo;
249 Vec3 periodicBoxVectors[3];
250 std::vector<double> masses;
251 std::vector<ConstraintInfo> constraints;
252 std::vector<Force*> forces;
253 std::vector<VirtualSite*> virtualSites;
260 class System::ConstraintInfo {
262 int particle1, particle2;
265 particle1 = particle2 = -1;
268 ConstraintInfo(
int particle1,
int particle2,
double distance) :
269 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:48
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:192
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:185
int addParticle(double mass)
Add a particle to the System.
Definition: System.h:88
Definition: AndersenThermostat.h:40
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