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

#include "types/Torsion.hpp"

Inheritance diagram for OpenMD::Torsion:
OpenMD::ShortRangeInteraction OpenMD::GhostTorsion

Public Member Functions

 Torsion (Atom *atom1, Atom *atom2, Atom *atom3, Atom *atom4, TorsionType *tt)
 
virtual ~Torsion ()
 
virtual void calcForce (RealType &angle, bool doParticlePot)
 
RealType getValue (int snapshotNo)
 
RealType getPotential ()
 
AtomgetAtomA ()
 
AtomgetAtomB ()
 
AtomgetAtomC ()
 
AtomgetAtomD ()
 
TorsionTypegetTorsionType ()
 
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)
 

Protected Attributes

TorsionTypetorsionType_
 
std::string name_
 
RealType potential_
 
- 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 ()
 
 ShortRangeInteraction (const ShortRangeInteraction &sri)
 
ShortRangeInteractionoperator= (const ShortRangeInteraction &sri)
 

Detailed Description

Definition at line 73 of file Torsion.hpp.

Constructor & Destructor Documentation

◆ Torsion()

OpenMD::Torsion::Torsion ( Atom atom1,
Atom atom2,
Atom atom3,
Atom atom4,
TorsionType tt 
)

Definition at line 51 of file Torsion.cpp.

References OpenMD::ShortRangeInteraction::atoms_.

◆ ~Torsion()

virtual OpenMD::Torsion::~Torsion ( )
inlinevirtual

Definition at line 80 of file Torsion.hpp.

References OpenMD::TorsionData::angle.

Member Function Documentation

◆ accept()

void OpenMD::Torsion::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 149 of file Torsion.hpp.

References OpenMD::BaseVisitor::visit().

◆ calcForce()

◆ getAtomA()

◆ getAtomB()

◆ getAtomC()

◆ getAtomD()

◆ getName()

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

Returns the name of this ShortRangeInteraction

Implements OpenMD::ShortRangeInteraction.

Definition at line 145 of file Torsion.hpp.

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

◆ getPotential()

RealType OpenMD::Torsion::getPotential ( )
inline

◆ getTorsionType()

TorsionType* OpenMD::Torsion::getTorsionType ( )
inline

Definition at line 141 of file Torsion.hpp.

◆ getValue()

RealType OpenMD::Torsion::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 83 of file Torsion.hpp.

References OpenMD::cross(), OpenMD::dot(), OpenMD::epsilon, OpenMD::Vector< Real, Dim >::length(), and OpenMD::Vector< Real, Dim >::normalize().

◆ setName()

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

Sets the name of this torsion for selections

Reimplemented from OpenMD::ShortRangeInteraction.

Definition at line 147 of file Torsion.hpp.

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

Member Data Documentation

◆ name_

std::string OpenMD::Torsion::name_
protected

Definition at line 156 of file Torsion.hpp.

◆ potential_

RealType OpenMD::Torsion::potential_
protected

Definition at line 158 of file Torsion.hpp.

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

◆ torsionType_

TorsionType* OpenMD::Torsion::torsionType_
protected

Definition at line 155 of file Torsion.hpp.

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


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