48#ifndef BRAINS_SNAPSHOT_HPP
49#define BRAINS_SNAPSHOT_HPP
53#include "brains/DataStorage.hpp"
54#include "brains/Stats.hpp"
55#include "nonbonded/NonBondedInteraction.hpp"
67 Vector3d
pos {V3Zero};
138 pair<RealType, RealType>
168 Snapshot(
int nAtoms,
int nRigidbodies,
int nCutoffGroups,
bool usePBC);
169 Snapshot(
int nAtoms,
int nRigidbodies,
int nCutoffGroups,
170 int atomStorageLayout,
int rigidBodyStorageLayout,
171 int cutoffGroupStorageLayout,
bool usePBC);
193 void setHmat(
const Mat3x3d& m);
204 RealType getVolume();
205 RealType getXYarea();
206 RealType getXZarea();
207 RealType getYZarea();
208 void setVolume(
const RealType vol);
216 void setCOM(
const Vector3d& com);
217 void setCOMvel(
const Vector3d& comVel);
218 void setCOMw(
const Vector3d& comw);
221 Vector3d getCOMvel();
225 void increaseTime(
const RealType dt);
226 void setTime(
const RealType time);
228 void setBondPotential(
const RealType bp);
229 void setBendPotential(
const RealType bp);
230 void setTorsionPotential(
const RealType tp);
231 void setInversionPotential(
const RealType ip);
232 RealType getBondPotential();
233 RealType getBendPotential();
234 RealType getTorsionPotential();
235 RealType getInversionPotential();
237 RealType getShortRangePotential();
239 void setLongRangePotentials(
const potVec lrPot);
240 RealType getLongRangePotential();
241 potVec getLongRangePotentials();
243 void setReciprocalPotential(
const RealType rp);
244 RealType getReciprocalPotential();
246 void setSurfacePotential(
const RealType sp);
247 RealType getSurfacePotential();
249 void setSelfPotentials(
const potVec sp);
250 RealType getSelfPotential();
251 potVec getSelfPotentials();
253 void setExcludedPotentials(
const potVec exPot);
254 potVec getExcludedPotentials();
255 RealType getExcludedPotential();
257 void setRestraintPotential(
const RealType rp);
258 RealType getRestraintPotential();
260 void setRawPotential(
const RealType rp);
261 RealType getRawPotential();
263 void setSelectionPotentials(
const potVec selPot);
264 potVec getSelectionPotentials();
266 RealType getPotentialEnergy();
267 void setPotentialEnergy(
const RealType pe);
268 RealType getKineticEnergy();
269 RealType getTranslationalKineticEnergy();
270 RealType getRotationalKineticEnergy();
271 RealType getElectronicKineticEnergy();
272 void setKineticEnergy(
const RealType ke);
273 void setTranslationalKineticEnergy(
const RealType tke);
274 void setRotationalKineticEnergy(
const RealType rke);
275 void setElectronicKineticEnergy(
const RealType eke);
276 RealType getTotalEnergy();
277 void setTotalEnergy(
const RealType te);
278 RealType getConservedQuantity();
279 void setConservedQuantity(
const RealType cq);
280 RealType getTemperature();
281 void setTemperature(
const RealType temp);
282 RealType getElectronicTemperature();
283 void setElectronicTemperature(
const RealType eTemp);
284 RealType getNetCharge();
285 void setNetCharge(
const RealType nChg);
286 RealType getChargeMomentum();
287 void setChargeMomentum(
const RealType cMom);
289 RealType getPressure();
290 void setPressure(
const RealType pressure);
292 Mat3x3d getPressureTensor();
293 void setPressureTensor(
const Mat3x3d& pressureTensor);
295 Mat3x3d getVirialTensor();
296 void setVirialTensor(
const Mat3x3d& virialTensor);
298 Vector3d getConductiveHeatFlux();
299 void setConductiveHeatFlux(
const Vector3d& chf);
301 Vector3d getConvectiveHeatFlux();
302 void setConvectiveHeatFlux(
const Vector3d& chf);
304 Vector3d getHeatFlux();
306 Vector3d getSystemDipole();
307 void setSystemDipole(
const Vector3d& bd);
309 Mat3x3d getSystemQuadrupole();
310 void setSystemQuadrupole(
const Mat3x3d& bq);
312 pair<RealType, RealType> getThermostat();
313 void setThermostat(
const pair<RealType, RealType>& thermostat);
315 pair<RealType, RealType> getElectronicThermostat();
316 void setElectronicThermostat(
const pair<RealType, RealType>& eThermostat);
318 Mat3x3d getBarostat();
319 void setBarostat(
const Mat3x3d& barostat);
321 std::shared_ptr<SPFData> getSPFData();
322 void setSPFData(std::shared_ptr<SPFData> data);
324 Mat3x3d getInertiaTensor();
325 void setInertiaTensor(
const Mat3x3d& inertiaTensor);
327 RealType getGyrationalVolume();
328 void setGyrationalVolume(
const RealType gv);
330 RealType getHullVolume();
331 void setHullVolume(
const RealType hv);
333 void setOrthoTolerance(RealType orthoTolerance);
341 bool hasTranslationalKineticEnergy;
342 bool hasRotationalKineticEnergy;
343 bool hasElectronicKineticEnergy;
344 bool hasKineticEnergy;
345 bool hasShortRangePotential;
346 bool hasLongRangePotential;
347 bool hasExcludedPotential;
348 bool hasSelfPotential;
349 bool hasPotentialEnergy;
356 bool hasElectronicTemperature;
358 bool hasChargeMomentum;
362 bool hasPressureTensor;
363 bool hasSystemDipole;
364 bool hasSystemQuadrupole;
365 bool hasConvectiveHeatFlux;
366 bool hasInertiaTensor;
367 bool hasGyrationalVolume;
372 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)
Storage specific to the SPF-RNEMD method that allows for a new simulation to pick up where an old one...
RealType lambda
how much of the molecule has been transferred
void clear()
Reset member variables to their defaults.
Vector3d pos
location to place a selected molecule
int globalID
which molecule have we selected