OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::Bend Class Reference
+ Inheritance diagram for OpenMD::Bend:

Public Member Functions

 Bend (Atom *atom1, Atom *atom2, Atom *atom3, BendType *bt)
 
virtual void calcForce (RealType &angle, bool doParticlePot)
 
RealType getValue (int snapshotNo)
 Returns the value of this ShortRangeInteraction in specified snapshot.
 
RealType getPotential ()
 
AtomgetAtomA ()
 
AtomgetAtomB ()
 
AtomgetAtomC ()
 
BendTypegetBendType ()
 
virtual std::string getName ()
 Returns the name of this ShortRangeInteraction.
 
virtual void setName (const std::string &name)
 Sets the name of this bend for selections.
 
void accept (BaseVisitor *v)
 
 Bend (Atom *atom1, Atom *atom2, Atom *atom3, BendType *bt)
 
virtual void calcForce (RealType &angle, bool doParticlePot)
 
RealType getValue (int snapshotNo)
 Returns the value of this ShortRangeInteraction in specified snapshot.
 
RealType getPotential ()
 
AtomgetAtomA ()
 
AtomgetAtomB ()
 
AtomgetAtomC ()
 
BendTypegetBendType ()
 
virtual std::string getName ()
 Returns the name of this ShortRangeInteraction.
 
virtual void setName (const std::string &name)
 Sets the name of this bend for selections.
 
void accept (BaseVisitor *v)
 
virtual RealType getPrevValue ()
 Returns the previous value of this ShortRangeInteraction.
 
virtual RealType getValue ()
 Returns the current value of this ShortRangeInteraction.
 
- Public Member Functions inherited from OpenMD::ShortRangeInteraction
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::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 Attributes

RealType potential_ {}
 
BendTypebendType_
 bend type
 
std::string name_
 
- Protected Attributes inherited from OpenMD::ShortRangeInteraction
SnapshotManagersnapshotMan_
 
std::vector< Atom * > atoms_
 
int globalIndex_
 
int localIndex_
 

Additional Inherited Members

- Protected Member Functions inherited from OpenMD::ShortRangeInteraction
 ShortRangeInteraction (const ShortRangeInteraction &sri)
 
ShortRangeInteractionoperator= (const ShortRangeInteraction &sri)
 

Detailed Description

Definition at line 63 of file StretchBend.hpp.

Constructor & Destructor Documentation

◆ Bend() [1/2]

OpenMD::Bend::Bend ( Atom * atom1,
Atom * atom2,
Atom * atom3,
BendType * bt )
inline

Definition at line 75 of file Bend.hpp.

◆ ~Bend() [1/2]

virtual OpenMD::Bend::~Bend ( )
inlinevirtual

Definition at line 83 of file Bend.hpp.

◆ Bend() [2/2]

OpenMD::Bend::Bend ( Atom * atom1,
Atom * atom2,
Atom * atom3,
BendType * bt )
inline

Definition at line 67 of file StretchBend.hpp.

◆ ~Bend() [2/2]

virtual OpenMD::Bend::~Bend ( )
inlinevirtual

Definition at line 75 of file StretchBend.hpp.

Member Function Documentation

◆ accept() [1/2]

void OpenMD::Bend::accept ( BaseVisitor * v)
inlinevirtual

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

Implements OpenMD::ShortRangeInteraction.

Definition at line 125 of file Bend.hpp.

◆ accept() [2/2]

void OpenMD::Bend::accept ( BaseVisitor * v)
inlinevirtual

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

Implements OpenMD::ShortRangeInteraction.

Definition at line 128 of file StretchBend.hpp.

◆ calcForce() [1/2]

void OpenMD::Bend::calcForce ( RealType & angle,
bool doParticlePot )
virtual

◆ calcForce() [2/2]

virtual void OpenMD::Bend::calcForce ( RealType & angle,
bool doParticlePot )
virtual

◆ getAtomA() [1/2]

Atom * OpenMD::Bend::getAtomA ( )
inline

Definition at line 113 of file Bend.hpp.

◆ getAtomA() [2/2]

Atom * OpenMD::Bend::getAtomA ( )
inline

Definition at line 108 of file StretchBend.hpp.

◆ getAtomB() [1/2]

Atom * OpenMD::Bend::getAtomB ( )
inline

Definition at line 115 of file Bend.hpp.

◆ getAtomB() [2/2]

Atom * OpenMD::Bend::getAtomB ( )
inline

Definition at line 112 of file StretchBend.hpp.

◆ getAtomC() [1/2]

Atom * OpenMD::Bend::getAtomC ( )
inline

Definition at line 117 of file Bend.hpp.

◆ getAtomC() [2/2]

Atom * OpenMD::Bend::getAtomC ( )
inline

Definition at line 116 of file StretchBend.hpp.

◆ getBendType() [1/2]

BendType * OpenMD::Bend::getBendType ( )
inline

Definition at line 119 of file Bend.hpp.

◆ getBendType() [2/2]

BendType * OpenMD::Bend::getBendType ( )
inline

Definition at line 120 of file StretchBend.hpp.

◆ getName() [1/2]

virtual std::string OpenMD::Bend::getName ( )
inlinevirtual

Returns the name of this ShortRangeInteraction.

Implements OpenMD::ShortRangeInteraction.

Definition at line 121 of file Bend.hpp.

◆ getName() [2/2]

virtual std::string OpenMD::Bend::getName ( )
inlinevirtual

Returns the name of this ShortRangeInteraction.

Implements OpenMD::ShortRangeInteraction.

Definition at line 124 of file StretchBend.hpp.

◆ getPotential() [1/2]

RealType OpenMD::Bend::getPotential ( )
inline

Definition at line 111 of file Bend.hpp.

◆ getPotential() [2/2]

RealType OpenMD::Bend::getPotential ( )
inline

Definition at line 104 of file StretchBend.hpp.

◆ getPrevValue()

RealType OpenMD::ShortRangeInteraction::getPrevValue ( )
virtual

Returns the previous value of this ShortRangeInteraction.

Returns
the value of this ShortRangeInteraction

Reimplemented from OpenMD::ShortRangeInteraction.

Definition at line 123 of file ShortRangeInteraction.cpp.

◆ getValue() [1/3]

RealType OpenMD::ShortRangeInteraction::getValue ( )
virtual

Returns the current value of this ShortRangeInteraction.

Returns
the current value of this ShortRangeInteraction

Reimplemented from OpenMD::ShortRangeInteraction.

Definition at line 129 of file ShortRangeInteraction.cpp.

◆ getValue() [2/3]

RealType OpenMD::Bend::getValue ( int snapshotNo)
inlinevirtual

Returns the value of this ShortRangeInteraction in specified snapshot.

Returns
the value of this ShortRangeInteraction
Parameters
snapshotNo

Implements OpenMD::ShortRangeInteraction.

Definition at line 86 of file Bend.hpp.

References OpenMD::dot(), OpenMD::Vector< Real, Dim >::length(), and OpenMD::Snapshot::wrapVector().

◆ getValue() [3/3]

RealType OpenMD::Bend::getValue ( int snapshotNo)
inlinevirtual

Returns the value of this ShortRangeInteraction in specified snapshot.

Returns
the value of this ShortRangeInteraction
Parameters
snapshotNo

Implements OpenMD::ShortRangeInteraction.

Definition at line 78 of file StretchBend.hpp.

References OpenMD::dot(), OpenMD::Vector< Real, Dim >::length(), and OpenMD::Snapshot::wrapVector().

◆ setName() [1/2]

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

Sets the name of this bend for selections.

Reimplemented from OpenMD::ShortRangeInteraction.

Definition at line 123 of file Bend.hpp.

◆ setName() [2/2]

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

Sets the name of this bend for selections.

Reimplemented from OpenMD::ShortRangeInteraction.

Definition at line 126 of file StretchBend.hpp.

Member Data Documentation

◆ bendType_

BendType * OpenMD::Bend::bendType_
protected

bend type

Definition at line 129 of file Bend.hpp.

Referenced by calcForce(), and OpenMD::GhostBend::calcForce().

◆ name_

std::string OpenMD::Bend::name_
protected

Definition at line 130 of file Bend.hpp.

◆ potential_

RealType OpenMD::Bend::potential_ {}
protected

Definition at line 128 of file Bend.hpp.


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