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

#include <Atom.hpp>

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

Public Member Functions

 Atom (AtomType *at)
virtual std::string getType ()
virtual Mat3x3d getI ()
virtual std::vector< RealType > getGrad ()
virtual void accept (BaseVisitor *v)
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)
virtual void setPrevA (const RotMat3x3d &a)
virtual void setA (const RotMat3x3d &a)
virtual void setA (const RotMat3x3d &a, 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)

Protected Attributes

RealType chargeMass_
- Protected Attributes inherited from OpenMD::StuntDouble
ObjectType objType_
DataStoragePointer storage_
bool linear_
int linearAxis_
int globalIndex_
int globalIntegrableObjectIndex_
int localIndex_
RealType mass_

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)

Detailed Description

Definition at line 57 of file Atom.hpp.

Constructor & Destructor Documentation

◆ Atom()

Member Function Documentation

◆ accept()

void OpenMD::Atom::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


Implements OpenMD::StuntDouble.

Reimplemented in OpenMD::DirectionalAtom.

Definition at line 76 of file Atom.cpp.

References OpenMD::BaseVisitor::visit().

Referenced by getType(), and OpenMD::CompositeVisitor::visit().

◆ getAtomType()

◆ getChargeMass()

◆ getGrad()

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

Returns the gradient of this stuntdouble

the inertia tensor of this stuntdouble

Implements OpenMD::StuntDouble.

Reimplemented in OpenMD::DirectionalAtom.

Definition at line 63 of file Atom.cpp.

References OpenMD::StuntDouble::getFrc().

Referenced by getType().

◆ getI()

Mat3x3d OpenMD::Atom::getI ( )

Returns the inertia tensor of this stuntdouble

the inertia tensor of this stuntdouble

Implements OpenMD::StuntDouble.

Reimplemented in OpenMD::DirectionalAtom.

Definition at line 59 of file Atom.cpp.

References OpenMD::SquareMatrix< RealType, 3 >::identity().

Referenced by getType().

◆ getIdent()

int OpenMD::Atom::getIdent ( )

Definition at line 122 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::getIdent().

Referenced by OpenMD::SimInfo::prepareTopology().

◆ getType()

◆ isCharge()

bool OpenMD::Atom::isCharge ( )

Definition at line 86 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::isCharge().

◆ isDipole()

bool OpenMD::Atom::isDipole ( )

◆ isDirectional()

bool OpenMD::Atom::isDirectional ( )

Definition at line 90 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::isDirectional().

Referenced by OpenMD::RigidBody::addAtom().

◆ isFluctuatingCharge()

bool OpenMD::Atom::isFluctuatingCharge ( )

◆ isGayBerne()

bool OpenMD::Atom::isGayBerne ( )

Definition at line 102 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::isGayBerne().

◆ isMetal()

bool OpenMD::Atom::isMetal ( )

Definition at line 114 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::isMetal().

◆ isMultipole()

bool OpenMD::Atom::isMultipole ( )

Definition at line 98 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::isMultipole().

◆ isShape()

bool OpenMD::Atom::isShape ( )

Definition at line 110 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::isShape().

◆ isSticky()

bool OpenMD::Atom::isSticky ( )

Definition at line 106 of file Atom.hpp.

References atomType_, and OpenMD::AtomType::isSticky().

◆ setChargeMass()

void OpenMD::Atom::setChargeMass ( RealType  cm)

Definition at line 130 of file Atom.hpp.

References chargeMass_.

Member Data Documentation

◆ atomType_

◆ chargeMass_

RealType OpenMD::Atom::chargeMass_

Definition at line 136 of file Atom.hpp.

Referenced by Atom(), getChargeMass(), and setChargeMass().

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