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

#include <Bond.hpp>

Inheritance diagram for OpenMD::Bond:

Public Member Functions

 Bond (Atom *atom1, Atom *atom2, BondType *bt)
virtual ~Bond ()
void calcForce (bool doParticlePot)
RealType getValue (int snap)
RealType getPotential ()
AtomgetAtomA ()
AtomgetAtomB ()
BondTypegetBondType ()
virtual std::string getName ()
virtual void setName (const std::string &name)
void accept (BaseVisitor *v)
- Public Member Functions inherited from OpenMD::ShortRangeInteraction
virtual ~ShortRangeInteraction ()
int getGlobalIndex ()
void setGlobalIndex (int index)
int getLocalIndex ()
void setLocalIndex (int index)
void setSnapshotManager (SnapshotManager *sman)
virtual RealType getPrevValue ()
virtual RealType getValue ()
virtual std::vector< Atom * > getAtoms ()
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

RealType potential_
std::string name_

Additional Inherited Members

- Protected Member Functions inherited from OpenMD::ShortRangeInteraction
 ShortRangeInteraction ()
 ShortRangeInteraction (const ShortRangeInteraction &sri)
ShortRangeInteractionoperator= (const ShortRangeInteraction &sri)
- Protected Attributes inherited from OpenMD::ShortRangeInteraction
std::vector< Atom * > atoms_
int globalIndex_
int localIndex_

Detailed Description

Definition at line 60 of file Bond.hpp.

Constructor & Destructor Documentation

◆ Bond()

OpenMD::Bond::Bond ( Atom atom1,
Atom atom2,
BondType bt 

Definition at line 64 of file Bond.hpp.

References OpenMD::ShortRangeInteraction::atoms_.

◆ ~Bond()

virtual OpenMD::Bond::~Bond ( )

Definition at line 70 of file Bond.hpp.

Member Function Documentation

◆ accept()

void OpenMD::Bond::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::ShortRangeInteraction.

Definition at line 118 of file Bond.hpp.

References OpenMD::BaseVisitor::visit().

◆ calcForce()

◆ getAtomA()

◆ getAtomB()

◆ getBondType()

BondType* OpenMD::Bond::getBondType ( )

◆ getName()

virtual std::string OpenMD::Bond::getName ( )

Returns the name of this ShortRangeInteraction

Implements OpenMD::ShortRangeInteraction.

Definition at line 114 of file Bond.hpp.

References name_.

Referenced by OpenMD::NameFinder::loadNames().

◆ getPotential()

RealType OpenMD::Bond::getPotential ( )

◆ getValue()

RealType OpenMD::Bond::getValue ( int  snapshotNo)

◆ setName()

virtual void OpenMD::Bond::setName ( const std::string &  name)

Sets the name of this bond for selections

Reimplemented from OpenMD::ShortRangeInteraction.

Definition at line 116 of file Bond.hpp.

References name_.

Referenced by OpenMD::MoleculeCreator::createBond().

Member Data Documentation

◆ bondType_

BondType* OpenMD::Bond::bondType_

bond type

Definition at line 124 of file Bond.hpp.

Referenced by calcForce(), and getBondType().

◆ name_

std::string OpenMD::Bond::name_

Definition at line 125 of file Bond.hpp.

Referenced by getName(), and setName().

◆ potential_

RealType OpenMD::Bond::potential_

Definition at line 123 of file Bond.hpp.

Referenced by calcForce(), and getPotential().

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