OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::DirectionalAtom Class Reference

#include <DirectionalAtom.hpp>

Inheritance diagram for OpenMD::DirectionalAtom:
OpenMD::Atom OpenMD::StuntDouble

Public Member Functions

 DirectionalAtom (AtomType *dAtomType)
virtual Mat3x3d getI ()
virtual void setPrevA (const RotMat3x3d &a)
virtual void setA (const RotMat3x3d &a)
virtual void setA (const RotMat3x3d &a, int snapshotNo)
void rotateBy (const RotMat3x3d &m)
virtual std::vector< RealType > getGrad ()
virtual void accept (BaseVisitor *v)
- Public Member Functions inherited from OpenMD::Atom
 Atom (AtomType *at)
virtual std::string getType ()
AtomTypegetAtomType ()
bool isCharge ()
bool isDirectional ()
bool isDipole ()
bool isMultipole ()
bool isGayBerne ()
bool isSticky ()
bool isShape ()
bool isMetal ()
bool isFluctuatingCharge ()
int getIdent ()
RealType getChargeMass ()
void setChargeMass (RealType cm)
- Public Member Functions inherited from OpenMD::StuntDouble
virtual ~StuntDouble ()
int getGlobalIndex ()
void setGlobalIndex (int index)
int getLocalIndex ()
void setLocalIndex (int index)
int getGlobalIntegrableObjectIndex ()
void setGlobalIntegrableObjectIndex (int index)
void setSnapshotManager (SnapshotManager *sman)
bool isAtom ()
bool isDirectionalAtom ()
bool isRigidBody ()
bool isDirectional ()
int freeze ()
Vector3d getPrevPos ()
Vector3d getPos ()
Vector3d getPos (int snapshotNo)
void setPrevPos (const Vector3d &pos)
void setPos (const Vector3d &pos)
void setPos (const Vector3d &pos, int snapshotNo)
Vector3d getPrevVel ()
Vector3d getVel ()
Vector3d getVel (int snapshotNo)
void setPrevVel (const Vector3d &vel)
void setVel (const Vector3d &vel)
void setVel (const Vector3d &vel, int snapshotNo)
RotMat3x3d getPrevA ()
RotMat3x3d getA ()
RotMat3x3d getA (int snapshotNo)
Vector3d getPrevJ ()
Vector3d getJ ()
Vector3d getJ (int snapshotNo)
void setPrevJ (const Vector3d &angMom)
void setJ (const Vector3d &angMom)
void setJ (const Vector3d &angMom, int snapshotNo)
Vector3d getCOM ()
Vector3d getCOMvel ()
Vector3d getCOMw ()
Vector3d getCOM (int snapshotNo)
Vector3d getCOMvel (int snapshotNo)
Vector3d getCOMw (int snapshotNo)
Quat4d getPrevQ ()
Quat4d getQ ()
Quat4d getQ (int snapshotNo)
void setPrevQ (const Quat4d &q)
void setQ (const Quat4d &q)
void setQ (const Quat4d &q, int snapshotNo)
Vector3d getPrevEuler ()
Vector3d getEuler ()
Vector3d getEuler (int snapshotNo)
void setPrevEuler (const Vector3d &euler)
void setEuler (const Vector3d &euler)
void setEuler (const Vector3d &euler, int snapshotNo)
Vector3d getPrevDipole ()
Vector3d getDipole ()
Vector3d getDipole (int snapshotNo)
Mat3x3d getPrevQuadrupole ()
Mat3x3d getQuadrupole ()
Mat3x3d getQuadrupole (int snapshotNo)
Vector3d getPrevFrc ()
Vector3d getFrc ()
Vector3d getFrc (int snapshotNo)
void setPrevFrc (const Vector3d &frc)
void setFrc (const Vector3d &frc)
void setFrc (const Vector3d &frc, int snapshotNo)
void addPrevFrc (const Vector3d &frc)
void addFrc (const Vector3d &frc)
void addFrc (const Vector3d &frc, int snapshotNo)
Vector3d getPrevTrq ()
Vector3d getTrq ()
Vector3d getTrq (int snapshotNo)
void setPrevTrq (const Vector3d &trq)
void setTrq (const Vector3d &trq)
void setTrq (const Vector3d &trq, int snapshotNo)
void addPrevTrq (const Vector3d &trq)
void addTrq (const Vector3d &trq)
void addTrq (const Vector3d &trq, int snapshotNo)
RealType getPrevParticlePot ()
RealType getParticlePot ()
RealType getParticlePot (int snapshotNo)
void setPrevParticlePot (const RealType &particlePot)
void setParticlePot (const RealType &particlePot)
void setParticlePot (const RealType &particlePot, int snapshotNo)
void addPrevParticlePot (const RealType &particlePot)
void addParticlePot (const RealType &particlePot)
void addParticlePot (const RealType &particlePot, int snapshotNo)
RealType getPrevFlucQPos ()
RealType getFlucQPos ()
RealType getFlucQPos (int snapshotNo)
void setPrevFlucQPos (RealType charge)
void setFlucQPos (RealType charge)
void setFlucQPos (RealType charge, int snapshotNo)
void addPrevFlucQPos (RealType charge)
void addFlucQPos (RealType charge)
void addFlucQPos (RealType charge, int snapshotNo)
RealType getPrevFlucQVel ()
RealType getFlucQVel ()
RealType getFlucQVel (int snapshotNo)
void setPrevFlucQVel (RealType cvel)
void setFlucQVel (RealType cvel)
void setFlucQVel (RealType cvel, int snapshotNo)
void addPrevFlucQVel (RealType cvel)
void addFlucQVel (RealType cvel)
void addFlucQVel (RealType cvel, int snapshotNo)
RealType getPrevFlucQFrc ()
RealType getFlucQFrc ()
RealType getFlucQFrc (int snapshotNo)
void setPrevFlucQFrc (RealType cfrc)
void setFlucQFrc (RealType cfrc)
void setFlucQFrc (RealType cfrc, int snapshotNo)
void addPrevFlucQFrc (RealType cfrc)
void addFlucQFrc (RealType cfrc)
void addFlucQFrc (RealType cfrc, int snapshotNo)
Vector3d getPrevElectricField ()
Vector3d getElectricField ()
Vector3d getElectricField (int snapshotNo)
void setPrevElectricField (const Vector3d &eField)
void setElectricField (const Vector3d &eField)
void setElectricField (const Vector3d &eField, int snapshotNo)
void addPrevEelectricField (const Vector3d &eField)
void addElectricField (const Vector3d &eField)
void addElectricField (const Vector3d &eField, int snapshotNo)
RealType getPrevSitePotential ()
RealType getSitePotential ()
RealType getSitePotential (int snapshotNo)
void setPrevSitePotential (RealType spot)
void setSitePotential (RealType spot)
void setSitePotential (RealType spot, int snapshotNo)
void addPrevSitePotential (RealType spot)
void addSitePotential (RealType spot)
void addSitePotential (RealType spot, int snapshotNo)
RealType getPrevDensity ()
RealType getDensity ()
RealType getDensity (int snapshotNo)
void setPrevDensity (RealType dens)
void setDensity (RealType dens)
void setDensity (RealType dens, int snapshotNo)
void addPrevDensity (RealType dens)
void addDensity (RealType dens)
void addDensity (RealType dens, int snapshotNo)
void zeroForcesAndTorques ()
bool isLinear ()
int linearAxis ()
RealType getMass ()
void setMass (RealType mass)
virtual void setType (const std::string &name)
Vector3d lab2Body (const Vector3d &v)
Vector3d lab2Body (const Vector3d &v, int frame)
Vector3d body2Lab (const Vector3d &v)
Vector3d body2Lab (const Vector3d &v, int frame)
void addProperty (GenericData *genData)
void removeProperty (const std::string &propName)
void clearProperties ()
std::vector< std::string > getPropertyNames ()
std::vector< GenericData * > getProperties ()
GenericDatagetPropertyByName (const std::string &propName)

Private Attributes

Mat3x3d I_
Vector3d dipole_
Mat3x3d quadrupole_

Additional Inherited Members

- Public Types inherited from OpenMD::StuntDouble
enum  ObjectType { otAtom, otDAtom, otRigidBody }
- Protected Member Functions inherited from OpenMD::StuntDouble
 StuntDouble (ObjectType objType, DataStoragePointer storage)
 StuntDouble (const StuntDouble &sd)
StuntDoubleoperator= (const StuntDouble &sd)
- Protected Attributes inherited from OpenMD::Atom
RealType chargeMass_
- Protected Attributes inherited from OpenMD::StuntDouble
ObjectType objType_
DataStoragePointer storage_
bool linear_
int linearAxis_
int globalIndex_
int globalIntegrableObjectIndex_
int localIndex_
RealType mass_

Detailed Description

Definition at line 56 of file DirectionalAtom.hpp.

Constructor & Destructor Documentation

◆ DirectionalAtom()

Member Function Documentation

◆ accept()

void OpenMD::DirectionalAtom::accept ( BaseVisitor v)

The purpose of the Visitor Pattern is to encapsulate an operation that you want to perform on the elements of a data structure. In this way, you can change the operation being performed on a structure without the need of changing the classes of the elements that you are operating on. Using a Visitor pattern allows you to decouple the classes for the data structure and the algorithms used upon them


Reimplemented from OpenMD::Atom.

Definition at line 202 of file DirectionalAtom.cpp.

References OpenMD::BaseVisitor::visit().

Referenced by OpenMD::CompositeVisitor::visit().

◆ getGrad()

std::vector< RealType > OpenMD::DirectionalAtom::getGrad ( )

Returns the gradient of this stuntdouble

the gradient of this stuntdouble

Reimplemented from OpenMD::Atom.

Definition at line 145 of file DirectionalAtom.cpp.

References OpenMD::StuntDouble::getA(), OpenMD::StuntDouble::getFrc(), OpenMD::StuntDouble::getTrq(), and OpenMD::SquareMatrix3< Real >::toEulerAngles().

◆ getI()

Mat3x3d OpenMD::DirectionalAtom::getI ( )

Returns the inertia tensor of this stuntdouble

the inertia tensor of this stuntdouble

Reimplemented from OpenMD::Atom.

Definition at line 86 of file DirectionalAtom.cpp.

References I_.

Referenced by DirectionalAtom(), and OpenMD::ReplacementVisitor::visit().

◆ rotateBy()

void OpenMD::DirectionalAtom::rotateBy ( const RotMat3x3d m)

Left multiple rotation matrix by another rotation matrix

ma rotation matrix

Definition at line 141 of file DirectionalAtom.cpp.

References OpenMD::StuntDouble::getA(), and setA().

◆ setA() [1/2]

◆ setA() [2/2]

void OpenMD::DirectionalAtom::setA ( const RotMat3x3d a,
int  snapshotNo 

◆ setPrevA()

Member Data Documentation

◆ dipole_

Vector3d OpenMD::DirectionalAtom::dipole_

Definition at line 101 of file DirectionalAtom.hpp.

Referenced by DirectionalAtom(), setA(), and setPrevA().

◆ I_

Mat3x3d OpenMD::DirectionalAtom::I_

Definition at line 100 of file DirectionalAtom.hpp.

Referenced by DirectionalAtom(), and getI().

◆ quadrupole_

Mat3x3d OpenMD::DirectionalAtom::quadrupole_

Definition at line 102 of file DirectionalAtom.hpp.

Referenced by DirectionalAtom(), setA(), and setPrevA().

The documentation for this class was generated from the following files: