1 #ifndef OPENMM_STATE_H_
2 #define OPENMM_STATE_H_
38 #include "internal/windowsExport.h"
60 enum DataType {Positions=1, Velocities=2, Forces=4, Energy=8, Parameters=16};
68 double getTime()
const;
72 const std::vector<Vec3>& getPositions()
const;
76 const std::vector<Vec3>& getVelocities()
const;
80 const std::vector<Vec3>& getForces()
const;
89 double getKineticEnergy()
const;
93 double getPotentialEnergy()
const;
101 void getPeriodicBoxVectors(
Vec3& a,
Vec3& b,
Vec3& c)
const;
105 double getPeriodicBoxVolume()
const;
109 const std::map<std::string, double>& getParameters()
const;
112 void setPositions(
const std::vector<Vec3>& pos);
113 void setVelocities(
const std::vector<Vec3>& vel);
114 void setForces(
const std::vector<Vec3>& force);
115 void setParameters(
const std::map<std::string, double>& params);
116 void setEnergy(
double ke,
double pe);
117 void setPeriodicBoxVectors(
const Vec3& a,
const Vec3& b,
const Vec3& c);
120 std::vector<Vec3> positions;
121 std::vector<Vec3> velocities;
122 std::vector<Vec3> forces;
123 Vec3 periodicBoxVectors[3];
124 std::map<std::string, double> parameters;
132 class OPENMM_EXPORT State::StateBuilder {
134 StateBuilder(
double time);
136 void setPositions(
const std::vector<Vec3>& pos);
137 void setVelocities(
const std::vector<Vec3>& vel);
138 void setForces(
const std::vector<Vec3>& force);
139 void setParameters(
const std::map<std::string, double>& params);
140 void setEnergy(
double ke,
double pe);
141 void setPeriodicBoxVectors(
const Vec3& a,
const Vec3& b,
const Vec3& c);