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;
114 int getDataTypes()
const;
117 void setPositions(
const std::vector<Vec3>& pos);
118 void setVelocities(
const std::vector<Vec3>& vel);
119 void setForces(
const std::vector<Vec3>& force);
120 void setParameters(
const std::map<std::string, double>& params);
121 void setEnergy(
double ke,
double pe);
122 void setPeriodicBoxVectors(
const Vec3& a,
const Vec3& b,
const Vec3& c);
125 std::vector<Vec3> positions;
126 std::vector<Vec3> velocities;
127 std::vector<Vec3> forces;
128 Vec3 periodicBoxVectors[3];
129 std::map<std::string, double> parameters;
137 class OPENMM_EXPORT State::StateBuilder {
139 StateBuilder(
double time);
141 void setPositions(
const std::vector<Vec3>& pos);
142 void setVelocities(
const std::vector<Vec3>& vel);
143 void setForces(
const std::vector<Vec3>& force);
144 void setParameters(
const std::map<std::string, double>& params);
145 void setEnergy(
double ke,
double pe);
146 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
Definition: AndersenThermostat.h:40