45#ifndef BRAINS_SNAPSHOT_HPP
46#define BRAINS_SNAPSHOT_HPP
50#include "brains/DataStorage.hpp"
51#include "brains/Stats.hpp"
52#include "nonbonded/NonBondedInteraction.hpp"
59 RealType lambda {0.0};
119 pair<RealType, RealType>
149 Snapshot(
int nAtoms,
int nRigidbodies,
int nCutoffGroups,
bool usePBC);
150 Snapshot(
int nAtoms,
int nRigidbodies,
int nCutoffGroups,
151 int atomStorageLayout,
int rigidBodyStorageLayout,
152 int cutoffGroupStorageLayout,
bool usePBC);
185 RealType getVolume();
186 RealType getXYarea();
187 RealType getXZarea();
188 RealType getYZarea();
189 void setVolume(
const RealType vol);
198 void setCOMvel(
const Vector3d& comVel);
206 void increaseTime(
const RealType dt);
207 void setTime(
const RealType time);
209 void setBondPotential(
const RealType bp);
210 void setBendPotential(
const RealType bp);
211 void setTorsionPotential(
const RealType tp);
212 void setInversionPotential(
const RealType ip);
213 RealType getBondPotential();
214 RealType getBendPotential();
215 RealType getTorsionPotential();
216 RealType getInversionPotential();
218 RealType getShortRangePotential();
220 void setLongRangePotentials(
const potVec lrPot);
221 RealType getLongRangePotential();
222 potVec getLongRangePotentials();
224 void setReciprocalPotential(
const RealType rp);
225 RealType getReciprocalPotential();
227 void setSurfacePotential(
const RealType sp);
228 RealType getSurfacePotential();
230 void setSelfPotentials(
const potVec sp);
231 RealType getSelfPotential();
232 potVec getSelfPotentials();
234 void setExcludedPotentials(
const potVec exPot);
235 potVec getExcludedPotentials();
236 RealType getExcludedPotential();
238 void setRestraintPotential(
const RealType rp);
239 RealType getRestraintPotential();
241 void setRawPotential(
const RealType rp);
242 RealType getRawPotential();
244 void setSelectionPotentials(
const potVec selPot);
245 potVec getSelectionPotentials();
247 RealType getPotentialEnergy();
248 void setPotentialEnergy(
const RealType pe);
249 RealType getKineticEnergy();
250 RealType getTranslationalKineticEnergy();
251 RealType getRotationalKineticEnergy();
252 RealType getElectronicKineticEnergy();
253 void setKineticEnergy(
const RealType ke);
254 void setTranslationalKineticEnergy(
const RealType tke);
255 void setRotationalKineticEnergy(
const RealType rke);
256 void setElectronicKineticEnergy(
const RealType eke);
257 RealType getTotalEnergy();
258 void setTotalEnergy(
const RealType te);
259 RealType getConservedQuantity();
260 void setConservedQuantity(
const RealType cq);
261 RealType getTemperature();
262 void setTemperature(
const RealType temp);
263 RealType getElectronicTemperature();
264 void setElectronicTemperature(
const RealType eTemp);
265 RealType getNetCharge();
266 void setNetCharge(
const RealType nChg);
267 RealType getChargeMomentum();
268 void setChargeMomentum(
const RealType cMom);
270 RealType getPressure();
271 void setPressure(
const RealType pressure);
274 void setPressureTensor(
const Mat3x3d& pressureTensor);
277 void setVirialTensor(
const Mat3x3d& virialTensor);
280 void setConductiveHeatFlux(
const Vector3d& chf);
283 void setConvectiveHeatFlux(
const Vector3d& chf);
288 void setSystemDipole(
const Vector3d& bd);
291 void setSystemQuadrupole(
const Mat3x3d& bq);
293 pair<RealType, RealType> getThermostat();
294 void setThermostat(
const pair<RealType, RealType>& thermostat);
296 pair<RealType, RealType> getElectronicThermostat();
297 void setElectronicThermostat(
const pair<RealType, RealType>& eThermostat);
300 void setBarostat(
const Mat3x3d& barostat);
302 std::shared_ptr<SPFData> getSPFData();
303 void setSPFData(std::shared_ptr<SPFData> data);
306 void setInertiaTensor(
const Mat3x3d& inertiaTensor);
308 RealType getGyrationalVolume();
309 void setGyrationalVolume(
const RealType gv);
311 RealType getHullVolume();
312 void setHullVolume(
const RealType hv);
314 void setOrthoTolerance(RealType orthoTolerance);
322 bool hasTranslationalKineticEnergy;
323 bool hasRotationalKineticEnergy;
324 bool hasElectronicKineticEnergy;
325 bool hasKineticEnergy;
326 bool hasShortRangePotential;
327 bool hasLongRangePotential;
328 bool hasExcludedPotential;
329 bool hasSelfPotential;
330 bool hasPotentialEnergy;
337 bool hasElectronicTemperature;
339 bool hasChargeMomentum;
343 bool hasPressureTensor;
344 bool hasSystemDipole;
345 bool hasSystemQuadrupole;
346 bool hasConvectiveHeatFlux;
347 bool hasInertiaTensor;
348 bool hasGyrationalVolume;
353 RealType orthoTolerance_;
The Snapshot class is a repository storing dynamic data during a Simulation.
Vector3d scaleVector(Vector3d &v)
Scaling a vector to multiples of the periodic box.
Mat3x3d getHmat()
Returns the H-Matrix.
Mat3x3d getInvHmat()
Returns the inverse H-Matrix.
void clearDerivedProperties()
sets the state of the computed properties to false
void setHmat(const Mat3x3d &m)
Sets the H-Matrix.
Mat3x3d getBoundingBox()
Returns the Bounding Box.
int getNumberOfAtoms()
Returns the number of atoms.
int getNumberOfRigidBodies()
Returns the number of rigid bodies.
void setID(int id)
Sets the id of this Snapshot.
Mat3x3d getInvBoundingBox()
Returns the inverse Bounding Box.
void setBoundingBox(const Mat3x3d &m)
Sets the Bounding Box.
static int getFrameDataSize()
Returns the number of bytes in a FrameData structure.
void wrapVector(Vector3d &v)
Wrapping the vector according to periodic boundary condition.
int getNumberOfCutoffGroups()
Returns the number of rigid bodies.
int getID()
Returns the id of this Snapshot.
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.
FrameData is a structure for holding system-wide dynamic data about the simulation.
RealType xyArea
XY area of this frame.
RealType totalEnergy
total energy of this frame
pair< RealType, RealType > electronicThermostat
thermostat variables for electronic degrees of freedom
RealType yzArea
YZ area of this frame.
RealType excludedPotential
potential energy excluded from atomic forces
Vector3d COMvel
system center of mass velocity
bool orthoRhombic
is this an orthorhombic periodic box?
int id
identification number of the snapshot
Mat3x3d systemQuadrupole
total system quadrupole moment
Mat3x3d invHmat
the inverse of the Hmat matrix
Vector3d COM
location of system center of mass
Mat3x3d inertiaTensor
inertia tensor for entire system
RealType reciprocalPotential
reciprocal-space contributions to the potential
RealType temperature
temperature of this frame
potVec lrPotentials
breakdown of long-range potentials by family
RealType conservedQuantity
anything conserved by the integrator
Vector3d systemDipole
total system dipole moment
RealType chargeMomentum
total charge momentum in the system
Vector3d COMw
system center of mass angular velocity
Mat3x3d bBox
axes of a bounding box in matrix form
RealType xzArea
XZ area of this frame.
RealType rotationalKinetic
rotational kinetic energy of this frame
RealType electronicKinetic
electronic kinetic energy of this frame
RealType bondPotential
bonded contribution to the potential
RealType rawPotential
unrestrained potential energy (when restraints are applied)
RealType kineticEnergy
kinetic energy of this frame
RealType volume
total volume of this frame
RealType electronicTemperature
temperature of the electronic degrees of freedom
RealType gyrationalVolume
gyrational volume for entire system
RealType shortRangePotential
short-range contributions to the potential
RealType restraintPotential
potential energy of restraints
Vector3d convectiveHeatFlux
heat flux vector (convective only)
Mat3x3d barostat
barostat matrix
RealType netCharge
total net charge in the system
RealType translationalKinetic
translational kinetic energy of this frame
RealType potentialEnergy
potential energy of this frame
bool usePBC
are we using a periodic box?
potVec selfPotentials
breakdown of self interactions by family
RealType bendPotential
angle-bending contribution to the potential
potVec excludedPotentials
breakdown of excluded potentials by family
RealType torsionPotential
dihedral (torsion angle) contribution to the potential
RealType pressure
pressure of this frame
Mat3x3d virialTensor
virial tensor
RealType hullVolume
hull volume for entire system
RealType surfacePotential
surface-term contributions to the potential
Mat3x3d hmat
axes of the periodic box in matrix form
pair< RealType, RealType > thermostat
thermostat variables
RealType inversionPotential
inversion (planarity) contribution to the potential
potVec selectionPotentials
potential of selected stuntDoubles
RealType selfPotential
potential energy of self interactions
std::shared_ptr< SPFData > spfData
parameters for restarting an SPF simulation
Mat3x3d pressureTensor
pressure tensor
RealType longRangePotential
long-range contributions to the potential
Mat3x3d invBbox
the inverse of the bounding box
RealType currentTime
current time
Vector3d conductiveHeatFlux
heat flux vector (conductive only)