55#ifndef PRIMITIVES_STUNTDOUBLE_HPP
56#define PRIMITIVES_STUNTDOUBLE_HPP
61#include "brains/Snapshot.hpp"
67#include "visitors/BaseVisitor.hpp"
96 enum ObjectType { otAtom, otDAtom, otRigidBody };
98 virtual ~StuntDouble() =
default;
124 int getGlobalIntegrableObjectIndex() {
125 return globalIntegrableObjectIndex_;
128 void setGlobalIntegrableObjectIndex(
int index) {
129 globalIntegrableObjectIndex_ = index;
142 bool isAtom() {
return objType_ == otAtom || objType_ == otDAtom; }
191 return ((snapshotMan_->getPrevSnapshot())->*storage_)
192 .position[localIndex_];
200 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
201 .position[localIndex_];
210 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
211 .position[localIndex_];
220 ((snapshotMan_->getPrevSnapshot())->*storage_).position[localIndex_] =
229 DataStorage& data = snapshotMan_->getCurrentSnapshot()->*storage_;
230 data.position[localIndex_] = pos;
241 void setPos(
const Vector3d& pos,
int snapshotNo) {
242 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
243 .position[localIndex_] = pos;
251 return ((snapshotMan_->getPrevSnapshot())->*storage_)
252 .velocity[localIndex_];
260 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
261 .velocity[localIndex_];
270 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
271 .velocity[localIndex_];
275 return (snapshot->*storage_).velocity[localIndex_];
284 ((snapshotMan_->getPrevSnapshot())->*storage_).velocity[localIndex_] =
293 ((snapshotMan_->getCurrentSnapshot())->*storage_).velocity[localIndex_] =
303 void setVel(
const Vector3d& vel,
int snapshotNo) {
304 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
305 .velocity[localIndex_] = vel;
313 return ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_];
321 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
331 RotMat3x3d
getA(
int snapshotNo) {
332 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
342 ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_] = a;
349 virtual void setA(
const RotMat3x3d& a) {
350 ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_] = a;
359 virtual void setA(
const RotMat3x3d& a,
int snapshotNo) {
360 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] =
369 return ((snapshotMan_->getPrevSnapshot())->*storage_)
370 .angularMomentum[localIndex_];
378 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
379 .angularMomentum[localIndex_];
388 Vector3d
getJ(
int snapshotNo) {
389 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
390 .angularMomentum[localIndex_];
399 ((snapshotMan_->getPrevSnapshot())->*storage_)
400 .angularMomentum[localIndex_] = angMom;
407 void setJ(
const Vector3d& angMom) {
408 ((snapshotMan_->getCurrentSnapshot())->*storage_)
409 .angularMomentum[localIndex_] = angMom;
419 void setJ(
const Vector3d& angMom,
int snapshotNo) {
420 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
421 .angularMomentum[localIndex_] = angMom;
428 Vector3d
getCOM() {
return (snapshotMan_->getCurrentSnapshot())->getCOM(); }
435 return (snapshotMan_->getCurrentSnapshot())->getCOMvel();
443 return (snapshotMan_->getCurrentSnapshot())->getCOMw();
450 return (snapshotMan_->getSnapshot(snapshotNo))->getCOM();
458 return (snapshotMan_->getSnapshot(snapshotNo))->getCOMvel();
466 return (snapshotMan_->getSnapshot(snapshotNo))->getCOMw();
474 return ((snapshotMan_->getPrevSnapshot())->*storage_)
484 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
495 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
521 void setQ(
const Quat4d& q,
int snapshotNo) {
setA(q, snapshotNo); }
528 return ((snapshotMan_->getPrevSnapshot())->*storage_)
538 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
549 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
561 ((snapshotMan_->getPrevSnapshot())->*storage_)
571 ((snapshotMan_->getCurrentSnapshot())->*storage_)
583 void setEuler(
const Vector3d& euler,
int snapshotNo) {
584 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
594 return ((snapshotMan_->getPrevSnapshot())->*storage_).dipole[localIndex_];
602 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
603 .dipole[localIndex_];
613 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
614 .dipole[localIndex_];
622 return ((snapshotMan_->getPrevSnapshot())->*storage_)
623 .quadrupole[localIndex_];
631 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
632 .quadrupole[localIndex_];
642 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
643 .quadrupole[localIndex_];
651 return ((snapshotMan_->getPrevSnapshot())->*storage_).force[localIndex_];
659 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
670 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
681 ((snapshotMan_->getPrevSnapshot())->*storage_).force[localIndex_] = frc;
689 ((snapshotMan_->getCurrentSnapshot())->*storage_).force[localIndex_] =
700 void setFrc(
const Vector3d& frc,
int snapshotNo) {
701 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).force[localIndex_] =
712 ((snapshotMan_->getPrevSnapshot())->*storage_).force[localIndex_] += frc;
720 ((snapshotMan_->getCurrentSnapshot())->*storage_).force[localIndex_] +=
731 void addFrc(
const Vector3d& frc,
int snapshotNo) {
732 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).force[localIndex_] +=
741 return ((snapshotMan_->getPrevSnapshot())->*storage_).torque[localIndex_];
749 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
750 .torque[localIndex_];
760 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
761 .torque[localIndex_];
771 ((snapshotMan_->getPrevSnapshot())->*storage_).torque[localIndex_] = trq;
779 ((snapshotMan_->getCurrentSnapshot())->*storage_).torque[localIndex_] =
790 void setTrq(
const Vector3d& trq,
int snapshotNo) {
791 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).torque[localIndex_] =
802 ((snapshotMan_->getPrevSnapshot())->*storage_).torque[localIndex_] += trq;
810 ((snapshotMan_->getCurrentSnapshot())->*storage_).torque[localIndex_] +=
821 void addTrq(
const Vector3d& trq,
int snapshotNo) {
822 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
823 .torque[localIndex_] += trq;
831 return ((snapshotMan_->getPrevSnapshot())->*storage_)
832 .particlePot[localIndex_];
840 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
841 .particlePot[localIndex_];
851 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
852 .particlePot[localIndex_];
862 ((snapshotMan_->getPrevSnapshot())->*storage_).particlePot[localIndex_] =
871 ((snapshotMan_->getCurrentSnapshot())->*storage_)
872 .particlePot[localIndex_] = particlePot;
883 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
884 .particlePot[localIndex_] = particlePot;
894 ((snapshotMan_->getPrevSnapshot())->*storage_).particlePot[localIndex_] +=
903 ((snapshotMan_->getCurrentSnapshot())->*storage_)
904 .particlePot[localIndex_] += particlePot;
916 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
917 .particlePot[localIndex_] += particlePot;
925 return ((snapshotMan_->getPrevSnapshot())->*storage_)
926 .flucQPos[localIndex_];
934 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
935 .flucQPos[localIndex_];
944 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
945 .flucQPos[localIndex_];
954 ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] =
963 ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_] =
974 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
975 .flucQPos[localIndex_] = charge;
985 ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] +=
995 ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_] +=
1007 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1008 .flucQPos[localIndex_] += charge;
1016 return ((snapshotMan_->getPrevSnapshot())->*storage_)
1017 .flucQVel[localIndex_];
1025 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
1026 .flucQVel[localIndex_];
1035 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1036 .flucQVel[localIndex_];
1045 ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] =
1054 ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_] =
1065 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1066 .flucQVel[localIndex_] = cvel;
1076 ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] +=
1085 ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_] +=
1097 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1098 .flucQVel[localIndex_] += cvel;
1106 return ((snapshotMan_->getPrevSnapshot())->*storage_)
1107 .flucQFrc[localIndex_];
1115 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
1116 .flucQFrc[localIndex_];
1125 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1126 .flucQFrc[localIndex_];
1135 ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] =
1144 ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] =
1155 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1156 .flucQFrc[localIndex_] = cfrc;
1165 ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] +=
1174 ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] +=
1186 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1187 .flucQFrc[localIndex_] += cfrc;
1195 return ((snapshotMan_->getPrevSnapshot())->*storage_)
1196 .electricField[localIndex_];
1204 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
1205 .electricField[localIndex_];
1214 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1215 .electricField[localIndex_];
1224 ((snapshotMan_->getPrevSnapshot())->*storage_)
1225 .electricField[localIndex_] = eField;
1233 ((snapshotMan_->getCurrentSnapshot())->*storage_)
1234 .electricField[localIndex_] = eField;
1244 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1245 .electricField[localIndex_] = eField;
1256 ((snapshotMan_->getPrevSnapshot())->*storage_)
1257 .electricField[localIndex_] += eField;
1265 ((snapshotMan_->getCurrentSnapshot())->*storage_)
1266 .electricField[localIndex_] += eField;
1278 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1279 .electricField[localIndex_] += eField;
1287 return ((snapshotMan_->getPrevSnapshot())->*storage_)
1288 .sitePotential[localIndex_];
1296 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
1297 .sitePotential[localIndex_];
1306 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1307 .sitePotential[localIndex_];
1316 ((snapshotMan_->getPrevSnapshot())->*storage_)
1317 .sitePotential[localIndex_] = spot;
1325 ((snapshotMan_->getCurrentSnapshot())->*storage_)
1326 .sitePotential[localIndex_] = spot;
1336 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1337 .sitePotential[localIndex_] = spot;
1346 ((snapshotMan_->getPrevSnapshot())->*storage_)
1347 .sitePotential[localIndex_] += spot;
1355 ((snapshotMan_->getCurrentSnapshot())->*storage_)
1356 .sitePotential[localIndex_] += spot;
1367 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1368 .sitePotential[localIndex_] += spot;
1376 return ((snapshotMan_->getPrevSnapshot())->*storage_)
1377 .density[localIndex_];
1385 return ((snapshotMan_->getCurrentSnapshot())->*storage_)
1386 .density[localIndex_];
1395 return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1396 .density[localIndex_];
1405 ((snapshotMan_->getPrevSnapshot())->*storage_).density[localIndex_] =
1414 ((snapshotMan_->getCurrentSnapshot())->*storage_).density[localIndex_] =
1425 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1426 .density[localIndex_] = dens;
1435 ((snapshotMan_->getPrevSnapshot())->*storage_).density[localIndex_] +=
1444 ((snapshotMan_->getCurrentSnapshot())->*storage_).density[localIndex_] +=
1455 ((snapshotMan_->getSnapshot(snapshotNo))->*storage_)
1456 .density[localIndex_] += dens;
1473 RealType multA, RealType multB);
1530 Vector3d
lab2Body(
const Vector3d& v,
int frame) {
return getA(frame) * v; }
1539 Vector3d
body2Lab(
const Vector3d& v,
int frame) {
1540 return getA(frame).transpose() * v;
1562 void addProperty(std::shared_ptr<GenericData> genData);
1591 StuntDouble(ObjectType objType, DataStoragePointer storage);
1593 StuntDouble(
const StuntDouble& sd);
1594 StuntDouble& operator=(
const StuntDouble& sd);
1596 ObjectType objType_;
1597 DataStoragePointer storage_;
1604 int globalIntegrableObjectIndex_;
PropertyMap class maintains a list of GenericData.
The Snapshot class is a repository storing dynamic data during a Simulation.
SnapshotManager class is an abstract class which maintains a series of snapshots.
void setFlucQVel(RealType cvel)
Sets the current charge velocity of this stuntDouble.
Quat4d getQ()
Returns the current quaternion of this stuntDouble.
Mat3x3d getPrevQuadrupole()
Returns the previous quadrupole tensor of this stuntDouble.
void addPrevFlucQFrc(RealType cfrc)
Adds charge force into the previous charge force of this stuntDouble.
RealType getPrevDensity()
Returns the previous density of this stuntDouble.
void combineForcesAndTorques(Snapshot *snapA, Snapshot *snapB, RealType multA, RealType multB)
Linearly combines the properties from two different snapshots.
void setPrevTrq(const Vector3d &trq)
Sets the previous torque of this stuntDouble.
void addPrevFrc(const Vector3d &frc)
Adds force into the previous force of this stuntDouble.
void setPrevEuler(const Vector3d &euler)
Sets the previous euler angles of this stuntDouble.
void zeroForcesAndTorques()
Set the properties of this stuntDouble to zero.
Vector3d getTrq()
Returns the current torque of this stuntDouble.
virtual void setPrevA(const RotMat3x3d &a)
Sets the previous rotation matrix of this stuntDouble.
RotMat3x3d getPrevA()
Returns the previous rotation matrix of this stuntDouble.
void addFlucQFrc(RealType cfrc)
Adds charge force into the current charge force of this stuntDouble.
void setPrevFrc(const Vector3d &frc)
Sets the previous force of this stuntDouble.
Vector3d getPrevVel()
Returns the previous velocity of this stuntDouble.
Vector3d lab2Body(const Vector3d &v)
Converts a lab fixed vector to a body fixed vector.
RealType getSitePotential(int snapshotNo)
Returns the site potential of this stuntDouble in specified snapshot.
void setPrevParticlePot(const RealType &particlePot)
Sets the previous particlePot of this stuntDouble.
RotMat3x3d getA()
Returns the current rotation matrix of this stuntDouble.
void addFlucQPos(RealType charge, int snapshotNo)
Adds fluctuating charge into the fluctuating charge of this stuntDouble in specified snapshot.
Vector3d getVel()
Returns the current velocity of this stuntDouble.
virtual void setA(const RotMat3x3d &a)
Sets the current rotation matrix of this stuntDouble.
void addElectricField(const Vector3d &eField)
Adds electric field into the current electric field of this stuntDouble.
virtual void accept(BaseVisitor *v)=0
void setElectricField(const Vector3d &eField, int snapshotNo)
Sets the electric field of this stuntDouble in specified snapshot.
Vector3d getVel(int snapshotNo)
Returns the velocity of this stuntDouble in specified snapshot.
Vector3d getJ(int snapshotNo)
Returns the angular momentum of this stuntDouble in specified snapshot (body-fixed).
int linearAxis()
Returns the linear axis of the rigidbody, atom and directional atom will always return -1.
Vector3d getEuler(int snapshotNo)
Returns the euler angles of this stuntDouble in specified snapshot.
Vector3d getEuler()
Returns the current euler angles of this stuntDouble.
Vector3d getElectricField(int snapshotNo)
Returns the electric field of this stuntDouble in specified snapshot.
void setPrevElectricField(const Vector3d &eField)
Sets the previous electric field of this stuntDouble.
RealType getFlucQVel(int snapshotNo)
Returns the charge velocity of this stuntDouble in specified snapshot.
Vector3d getPrevJ()
Returns the previous angular momentum of this stuntDouble (body-fixed).
void setDensity(RealType dens, int snapshotNo)
Sets the density of this stuntDouble in specified snapshot.
void addPrevFlucQVel(RealType cvel)
Adds charge velocity into the previous charge velocity of this stuntDouble.
void setParticlePot(const RealType &particlePot, int snapshotNo)
Sets the particlePot of this stuntDouble in specified snapshot.
RealType getMass()
Returns the mass of this stuntDouble.
void setEuler(const Vector3d &euler, int snapshotNo)
Sets the euler angles of this stuntDouble in specified snapshot.
void setPrevVel(const Vector3d &vel)
Sets the previous velocity of this stuntDouble.
Mat3x3d getQuadrupole()
Returns the current quadrupole tensor of this stuntDouble.
void addPrevDensity(RealType dens)
Adds density into the previous charge force of this stuntDouble.
Vector3d getPrevDipole()
Returns the previous dipole vector of this stuntDouble.
void addPrevParticlePot(const RealType &particlePot)
Adds particlePot into the previous particlePot of this stuntDouble.
std::vector< std::shared_ptr< GenericData > > getProperties()
Returns all of the properties in PropertyMap.
Vector3d getPos(int snapshotNo)
Returns the position of this stuntDouble in specified snapshot.
bool isDirectionalAtom()
Tests if this stuntDouble is an directional atom.
Vector3d getCOMvel(int snapshotNo)
Returns system Center of Mass velocity for stuntDouble frame from snapshot.
std::shared_ptr< GenericData > getPropertyByName(const std::string &propName)
Returns property.
virtual Mat3x3d getI()=0
Returns the inertia tensor of this stuntDouble.
void setPos(const Vector3d &pos, int snapshotNo)
Sets the position of this stuntDouble in specified snapshot.
void addProperty(std::shared_ptr< GenericData > genData)
Adds property into property map.
virtual std::string getType()=0
Returns the name of this stuntDouble.
void setQ(const Quat4d &q, int snapshotNo)
Sets the quaternion of this stuntDouble in specified snapshot.
void setFlucQPos(RealType charge)
Sets the current fluctuating charge of this stuntDouble.
Vector3d getCOMvel()
Returns system Center of Mass velocity for stuntDouble frame from snapshot.
bool isLinear()
Tests the if this stuntDouble is a linear rigidbody.
void setFrc(const Vector3d &frc, int snapshotNo)
Sets the force of this stuntDouble in specified snapshot.
void addDensity(RealType dens)
Adds density into the current charge force of this stuntDouble.
void setParticlePot(const RealType &particlePot)
Sets the current particlePot of this stuntDouble.
Vector3d getPos()
Returns the current position of this stuntDouble.
Vector3d body2Lab(const Vector3d &v)
Converts a body fixed vector to a lab fixed vector.
void setPrevFlucQFrc(RealType cfrc)
Sets the previous charge force of this stuntDouble.
RealType getFlucQFrc(int snapshotNo)
Returns the charge force of this stuntDouble in specified snapshot.
RealType getFlucQFrc()
Returns the current charge force of this stuntDouble.
void addPrevElectricField(const Vector3d &eField)
Adds electric field into the previous electric field of this stuntDouble.
RealType getFlucQPos(int snapshotNo)
Returns the fluctuating charge of this stuntDouble in specified snapshot.
void addFlucQVel(RealType cvel)
Adds charge velocity into the current charge velocity of this stuntDouble.
void setSitePotential(RealType spot)
Sets the current site potential of this stuntDouble.
RealType getFlucQPos()
Returns the current fluctuating charge of this stuntDouble.
void setPos(const Vector3d &pos)
Sets the current position of this stuntDouble.
Vector3d getDipole()
Returns the current dipole vector of this stuntDouble.
void addPrevSitePotential(RealType spot)
Adds site potential into the previous charge force of this stuntDouble.
RealType getPrevFlucQFrc()
Returns the previous charge force of this stuntDouble.
Vector3d getElectricField()
Returns the current electric field of this stuntDouble.
Vector3d getFrc(int snapshotNo)
Returns the force of this stuntDouble in specified snapshot.
void setJ(const Vector3d &angMom, int snapshotNo)
Sets the angular momentum of this stuntDouble in specified snapshot(body-fixed).
RealType getParticlePot(int snapshotNo)
Returns the particlePot of this stuntDouble in specified snapshot.
Vector3d getPrevTrq()
Returns the previous torque of this stuntDouble.
void setTrq(const Vector3d &trq)
Sets the current torque of this stuntDouble.
void addPrevTrq(const Vector3d &trq)
Adds torque into the previous torque of this stuntDouble.
Mat3x3d getQuadrupole(int snapshotNo)
Returns the quadrupole tensor of this stuntDouble in specified snapshot.
void setGlobalIndex(int index)
Sets the global index of this stuntDouble.
Vector3d getPrevFrc()
Returns the previous force of this stuntDouble.
Vector3d getCOM()
Returns system Center of Mass for stuntDouble frame from snapshot.
void addPrevFlucQPos(RealType charge)
Adds fluctuating charge into the previous fluctuating charge of this stuntDouble.
Quat4d getPrevQ()
Returns the previous quaternion of this stuntDouble.
void setSnapshotManager(SnapshotManager *sman)
Sets the Snapshot Manager of this stuntDouble.
RealType getParticlePot()
Returns the current particlePot of this stuntDouble.
Vector3d getCOM(int snapshotNo)
Returns system Center of Mass for stuntDouble frame from snapshot.
RealType getSitePotential()
Returns the current site potential of this stuntDouble.
RealType getDensity()
Returns the current density of this stuntDouble.
std::vector< std::string > getPropertyNames()
Returns all names of properties.
void setTrq(const Vector3d &trq, int snapshotNo)
Sets the torque of this stuntDouble in specified snapshot.
void setElectricField(const Vector3d &eField)
Sets the current electric field of this stuntDouble.
void setPrevFlucQPos(RealType charge)
Sets the previous fluctuating charge of this stuntDouble.
void setEuler(const Vector3d &euler)
Sets the current euler angles of this stuntDouble.
void removeProperty(const std::string &propName)
Removes property from PropertyMap by name.
void setVel(const Vector3d &vel)
Sets the current velocity of this stuntDouble.
void addTrq(const Vector3d &trq)
Adds torque into the current torque of this stuntDouble.
RealType getPrevParticlePot()
Returns the previous particlePot of this stuntDouble.
void addDensity(RealType dens, int snapshotNo)
Adds density into the density of this stuntDouble in specified snapshot.
Vector3d getCOMw()
Returns system Center of Mass angular momentum for stuntDouble frame from snapshot.
void setPrevDensity(RealType dens)
Sets the previous density of this stuntDouble.
void addParticlePot(const RealType &particlePot)
Adds particlePot into the current particlePot of this stuntDouble.
RealType getPrevSitePotential()
Returns the previous site potential of this stuntDouble.
bool isRigidBody()
Tests if this stuntDouble is a rigid body.
Vector3d getTrq(int snapshotNo)
Returns the torque of this stuntDouble in specified snapshot.
virtual void setA(const RotMat3x3d &a, int snapshotNo)
Sets the rotation matrix of this stuntDouble in specified snapshot.
Vector3d getJ()
Returns the current angular momentum of this stuntDouble (body -fixed).
Quat4d getQ(int snapshotNo)
Returns the quaternion of this stuntDouble in specified snapshot.
void setFlucQVel(RealType cvel, int snapshotNo)
Sets the charge velocity of this stuntDouble in specified snapshot.
int getGlobalIndex()
Returns the global index of this stuntDouble.
void addSitePotential(RealType spot, int snapshotNo)
Adds site potential into the site potential of this stuntDouble in specified snapshot.
RealType getDensity(int snapshotNo)
Returns the density of this stuntDouble in specified snapshot.
void setPrevSitePotential(RealType spot)
Sets the previous site potential of this stuntDouble.
bool isAtom()
Tests if this stuntDouble is an atom.
RealType getPrevFlucQPos()
Returns the previous fluctuating charge of this stuntDouble.
void addElectricField(const Vector3d &eField, int snapshotNo)
Adds electric field into the electric field of this stuntDouble in specified snapshot.
RotMat3x3d getA(int snapshotNo)
Returns the rotation matrix of this stuntDouble in specified snapshot.
void addParticlePot(const RealType &particlePot, int snapshotNo)
Adds particlePot into the particlePot of this stuntDouble in specified snapshot.
void addTrq(const Vector3d &trq, int snapshotNo)
Adds torque into the torque of this stuntDouble in specified snapshot.
Vector3d getCOMw(int snapshotNo)
Returns system Center of Mass angular momentum for stuntDouble frame from snapshot.
Vector3d getPrevPos()
Returns the previous position of this stuntDouble.
void setPrevFlucQVel(RealType cvel)
Sets the previous charge velocity of this stuntDouble.
void setQ(const Quat4d &q)
Sets the current quaternion of this stuntDouble.
Vector3d getPrevEuler()
Returns the previous euler angles of this stuntDouble.
bool isDirectional()
Tests if this stuntDouble is a directional one.
Vector3d getDipole(int snapshotNo)
Returns the dipole vector of this stuntDouble in specified snapshot.
int freeze()
Freezes out all velocity, angular velocity, forces and torques on this StuntDouble.
void addFlucQVel(RealType cvel, int snapshotNo)
Adds charge velocity into the charge velocity of this stuntDouble in specified snapshot.
RealType getPrevFlucQVel()
Returns the previous charge velocity of this stuntDouble.
Vector3d getFrc()
Returns the current force of this stuntDouble.
int getLocalIndex()
Returns the local index of this stuntDouble.
void setMass(RealType mass)
Sets the mass of this stuntdoulbe.
Vector3d getPrevElectricField()
Returns the previous electric field of this stuntDouble.
virtual void setType(const std::string &)
Sets the name of this stuntDouble.
void addSitePotential(RealType spot)
Adds site potential into the current charge force of this stuntDouble.
void setFrc(const Vector3d &frc)
Sets the current force of this stuntDouble.
void setJ(const Vector3d &angMom)
Sets the current angular momentum of this stuntDouble (body-fixed).
void setVel(const Vector3d &vel, int snapshotNo)
Sets the velocity of this stuntDouble in specified snapshot.
void setFlucQFrc(RealType cfrc)
Sets the current charge force of this stuntDouble.
virtual std::vector< RealType > getGrad()=0
Returns the gradient of this stuntDouble.
void setPrevJ(const Vector3d &angMom)
Sets the previous angular momentum of this stuntDouble (body-fixed).
void addFlucQPos(RealType charge)
Adds fluctuating charge into the current fluctuating charge of this stuntDouble.
RealType getFlucQVel()
Returns the current charge velocity of this stuntDouble.
void setFlucQFrc(RealType cfrc, int snapshotNo)
Sets the charge force of this stuntDouble in specified snapshot.
void setSitePotential(RealType spot, int snapshotNo)
Sets the site potential of this stuntDouble in specified snapshot.
void setLocalIndex(int index)
Sets the local index of this stuntDouble.
void setFlucQPos(RealType charge, int snapshotNo)
Sets the fluctuating charge of this stuntDouble in specified snapshot.
void setDensity(RealType dens)
Sets the current density of this stuntDouble.
void setPrevPos(const Vector3d &pos)
Sets the previous position of this stuntDouble.
void addFrc(const Vector3d &frc)
Adds force into the current force of this stuntDouble.
void addFlucQFrc(RealType cfrc, int snapshotNo)
Adds charge force into the charge force of this stuntDouble in specified snapshot.
void addFrc(const Vector3d &frc, int snapshotNo)
Adds force into the force of this stuntDouble in specified snapshot.
void setPrevQ(const Quat4d &q)
Sets the previous quaternion of this stuntDouble.
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.