1 #ifndef OPENMM_STATE_H_
2 #define OPENMM_STATE_H_
39 #include "internal/windowsExport.h"
61 enum DataType {Positions=1, Velocities=2, Forces=4, Energy=8, Parameters=16};
69 double getTime()
const;
73 const std::vector<Vec3>& getPositions()
const;
77 const std::vector<Vec3>& getVelocities()
const;
81 const std::vector<Vec3>& getForces()
const;
90 double getKineticEnergy()
const;
94 double getPotentialEnergy()
const;
102 void getPeriodicBoxVectors(
Vec3& a,
Vec3& b,
Vec3& c)
const;
106 double getPeriodicBoxVolume()
const;
110 const std::map<std::string, double>& getParameters()
const;
113 void setPositions(
const std::vector<Vec3>& pos);
114 void setVelocities(
const std::vector<Vec3>& vel);
115 void setForces(
const std::vector<Vec3>& force);
116 void setParameters(
const std::map<std::string, double>& params);
117 void setEnergy(
double ke,
double pe);
118 void setPeriodicBoxVectors(
const Vec3& a,
const Vec3& b,
const Vec3& c);
121 std::vector<Vec3> positions;
122 std::vector<Vec3> velocities;
123 std::vector<Vec3> forces;
124 Vec3 periodicBoxVectors[3];
125 std::map<std::string, double> parameters;
133 class OPENMM_EXPORT State::StateBuilder {
135 StateBuilder(
double time);
137 void setPositions(
const std::vector<Vec3>& pos);
138 void setVelocities(
const std::vector<Vec3>& vel);
139 void setForces(
const std::vector<Vec3>& force);
140 void setParameters(
const std::map<std::string, double>& params);
141 void setEnergy(
double ke,
double pe);
142 void setPeriodicBoxVectors(
const Vec3& a,
const Vec3& b,
const Vec3& c);
A State object records a snapshot of the current state of a simulation at a point in time...
Definition: State.h:54
This class represents a three component vector.
Definition: Vec3.h:45
DataType
This is an enumeration of the types of data which may be stored in a State.
Definition: State.h:61