OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::ShortRangeInteraction Class Referenceabstract

A ShortRangeInteraction holds some bookeeping data for bonded interactions (e.g. More...

#include <ShortRangeInteraction.hpp>

+ Inheritance diagram for OpenMD::ShortRangeInteraction:

Public Member Functions

int getGlobalIndex ()
 Returns the global index of this ShortRangeInteraction.
 
void setGlobalIndex (int index)
 Sets the global index of this ShortRangeInteraction.
 
int getLocalIndex ()
 Returns the local index of this ShortRangeInteraction.
 
void setLocalIndex (int index)
 Sets the local index of this ShortRangeInteraction.
 
void setSnapshotManager (SnapshotManager *sman)
 Sets the Snapshot Manager of this ShortRangeInteraction.
 
virtual std::string getName ()=0
 Returns the name of this ShortRangeInteraction.
 
virtual void setName (const std::string &)
 Sets the name of this ShortRangeInteraction.
 
virtual void accept (BaseVisitor *v)=0
 
virtual RealType getPrevValue ()
 Returns the previous value of this ShortRangeInteraction.
 
virtual RealType getValue ()
 Returns the current value of this ShortRangeInteraction.
 
virtual RealType getValue (int snapshotNo)=0
 Returns the value of this ShortRangeInteraction in specified snapshot.
 
virtual std::vector< Atom * > getAtoms ()
 
void addProperty (std::shared_ptr< GenericData > genData)
 Adds property into property map.
 
void removeProperty (const std::string &propName)
 Removes property from PropertyMap by name.
 
std::vector< std::string > getPropertyNames ()
 Returns all names of properties.
 
std::vector< std::shared_ptr< GenericData > > getProperties ()
 Returns all of the properties in PropertyMap.
 
std::shared_ptr< GenericDatagetPropertyByName (const std::string &propName)
 Returns property.
 

Protected Member Functions

 ShortRangeInteraction (const ShortRangeInteraction &sri)
 
ShortRangeInteractionoperator= (const ShortRangeInteraction &sri)
 

Protected Attributes

SnapshotManagersnapshotMan_
 
std::vector< Atom * > atoms_
 
int globalIndex_
 
int localIndex_
 

Detailed Description

A ShortRangeInteraction holds some bookeeping data for bonded interactions (e.g.

Bonds, Bends, Torsions, Inversions).

Definition at line 66 of file ShortRangeInteraction.hpp.

Constructor & Destructor Documentation

◆ ~ShortRangeInteraction()

OpenMD::ShortRangeInteraction::~ShortRangeInteraction ( )
virtual

Definition at line 54 of file ShortRangeInteraction.cpp.

◆ ShortRangeInteraction()

OpenMD::ShortRangeInteraction::ShortRangeInteraction ( )
protected

Definition at line 51 of file ShortRangeInteraction.cpp.

Member Function Documentation

◆ accept()

virtual void OpenMD::ShortRangeInteraction::accept ( BaseVisitor * v)
pure virtual

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

Parameters
vvisitor

Implemented in OpenMD::Bend, OpenMD::Bend, OpenMD::Bond, OpenMD::Inversion, and OpenMD::Torsion.

◆ addProperty()

void OpenMD::ShortRangeInteraction::addProperty ( std::shared_ptr< GenericData > genData)

Adds property into property map.

Parameters
genDataGenericData to be added into PropertyMap

Definition at line 66 of file ShortRangeInteraction.cpp.

◆ getAtoms()

virtual std::vector< Atom * > OpenMD::ShortRangeInteraction::getAtoms ( )
inlinevirtual

Definition at line 138 of file ShortRangeInteraction.hpp.

◆ getGlobalIndex()

int OpenMD::ShortRangeInteraction::getGlobalIndex ( )
inline

Returns the global index of this ShortRangeInteraction.

Returns
the global index of this ShortRangeInteraction

Definition at line 74 of file ShortRangeInteraction.hpp.

◆ getLocalIndex()

int OpenMD::ShortRangeInteraction::getLocalIndex ( )
inline

Returns the local index of this ShortRangeInteraction.

Returns
the local index of this ShortRangeInteraction

Definition at line 86 of file ShortRangeInteraction.hpp.

◆ getName()

virtual std::string OpenMD::ShortRangeInteraction::getName ( )
pure virtual

◆ getPrevValue()

RealType OpenMD::ShortRangeInteraction::getPrevValue ( )
virtual

Returns the previous value of this ShortRangeInteraction.

Returns
the value of this ShortRangeInteraction

Reimplemented in OpenMD::Bend, OpenMD::Bond, OpenMD::Inversion, and OpenMD::Torsion.

Definition at line 61 of file ShortRangeInteraction.cpp.

◆ getProperties()

std::vector< std::shared_ptr< GenericData > > OpenMD::ShortRangeInteraction::getProperties ( )

Returns all of the properties in PropertyMap.

Returns
all of the properties in PropertyMap

Definition at line 80 of file ShortRangeInteraction.cpp.

◆ getPropertyByName()

std::shared_ptr< GenericData > OpenMD::ShortRangeInteraction::getPropertyByName ( const std::string & propName)

Returns property.

Parameters
propNamename of property
Returns
a pointer point to property with propName. If no property named propName exists, return NULL

Definition at line 84 of file ShortRangeInteraction.cpp.

◆ getPropertyNames()

std::vector< std::string > OpenMD::ShortRangeInteraction::getPropertyNames ( )

Returns all names of properties.

Returns
all names of properties

Definition at line 75 of file ShortRangeInteraction.cpp.

◆ getValue() [1/2]

RealType OpenMD::ShortRangeInteraction::getValue ( )
virtual

Returns the current value of this ShortRangeInteraction.

Returns
the current value of this ShortRangeInteraction

Reimplemented in OpenMD::Bend, OpenMD::Bond, OpenMD::Inversion, and OpenMD::Torsion.

Definition at line 56 of file ShortRangeInteraction.cpp.

◆ getValue() [2/2]

virtual RealType OpenMD::ShortRangeInteraction::getValue ( int snapshotNo)
pure virtual

Returns the value of this ShortRangeInteraction in specified snapshot.

Returns
the value of this ShortRangeInteraction
Parameters
snapshotNo

Implemented in OpenMD::Bend, OpenMD::Bend, OpenMD::Bond, OpenMD::Inversion, and OpenMD::Torsion.

◆ removeProperty()

void OpenMD::ShortRangeInteraction::removeProperty ( const std::string & propName)

Removes property from PropertyMap by name.

Parameters
propNamethe name of property to be removed

Definition at line 71 of file ShortRangeInteraction.cpp.

◆ setGlobalIndex()

void OpenMD::ShortRangeInteraction::setGlobalIndex ( int index)
inline

Sets the global index of this ShortRangeInteraction.

Parameters
indexnew global index to be set

Definition at line 80 of file ShortRangeInteraction.hpp.

◆ setLocalIndex()

void OpenMD::ShortRangeInteraction::setLocalIndex ( int index)
inline

Sets the local index of this ShortRangeInteraction.

Parameters
indexnew index to be set

Definition at line 92 of file ShortRangeInteraction.hpp.

◆ setName()

virtual void OpenMD::ShortRangeInteraction::setName ( const std::string & )
inlinevirtual

Sets the name of this ShortRangeInteraction.

Reimplemented in OpenMD::Bend, OpenMD::Bend, OpenMD::Bond, OpenMD::Inversion, and OpenMD::Torsion.

Definition at line 103 of file ShortRangeInteraction.hpp.

◆ setSnapshotManager()

void OpenMD::ShortRangeInteraction::setSnapshotManager ( SnapshotManager * sman)
inline

Sets the Snapshot Manager of this ShortRangeInteraction.

Definition at line 97 of file ShortRangeInteraction.hpp.

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

Member Data Documentation

◆ atoms_

std::vector<Atom*> OpenMD::ShortRangeInteraction::atoms_
protected

Definition at line 178 of file ShortRangeInteraction.hpp.

◆ globalIndex_

int OpenMD::ShortRangeInteraction::globalIndex_
protected

Definition at line 180 of file ShortRangeInteraction.hpp.

◆ localIndex_

int OpenMD::ShortRangeInteraction::localIndex_
protected

Definition at line 181 of file ShortRangeInteraction.hpp.

◆ snapshotMan_

SnapshotManager* OpenMD::ShortRangeInteraction::snapshotMan_
protected

Definition at line 177 of file ShortRangeInteraction.hpp.


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