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

#include <NameFinder.hpp>

Public Member Functions

 NameFinder (SimInfo *info)
 
 ~NameFinder ()
 
SelectionSet match (const std::string &name)
 

Private Member Functions

void loadNames ()
 
void matchMolecule (const std::string &molName, SelectionSet &bs)
 
void matchStuntDouble (const std::string &molName, const std::string &sdName, SelectionSet &bs)
 
void matchRigidAtoms (const std::string &molName, const std::string &rbName, const std::string &rbAtomName, SelectionSet &bs)
 
void matchBond (const std::string &molName, const std::string &bondName, SelectionSet &bs)
 
void matchBend (const std::string &molName, const std::string &bendName, SelectionSet &bs)
 
void matchTorsion (const std::string &molName, const std::string &torsionName, SelectionSet &bs)
 
void matchInversion (const std::string &molName, const std::string &inversionName, SelectionSet &bs)
 
void matchInternalIndex (const std::string &name, int internalIndex, SelectionSet &bs)
 
TreeNodecreateNode (TreeNode *parent, const std::string &name)
 
std::vector< TreeNode * > getAllChildren (TreeNode *node)
 
std::vector< TreeNode * > getMatchedChildren (TreeNode *node, const std::string &name)
 
bool isMatched (const std::string &str, const std::string &wildcard)
 
bool isInteger (const std::string &str)
 

Private Attributes

SimInfoinfo_
 
vector< int > nObjects_
 
TreeNoderoot_
 

Detailed Description

Definition at line 59 of file NameFinder.hpp.

Constructor & Destructor Documentation

◆ NameFinder()

◆ ~NameFinder()

OpenMD::NameFinder::~NameFinder ( )

Definition at line 70 of file NameFinder.cpp.

References root_.

Member Function Documentation

◆ createNode()

TreeNode * OpenMD::NameFinder::createNode ( TreeNode parent,
const std::string &  name 
)
private

◆ getAllChildren()

std::vector< TreeNode * > OpenMD::NameFinder::getAllChildren ( TreeNode node)
private

Definition at line 385 of file NameFinder.cpp.

References OpenMD::TreeNode::children.

Referenced by matchBend(), matchBond(), matchInversion(), and matchTorsion().

◆ getMatchedChildren()

std::vector< TreeNode * > OpenMD::NameFinder::getMatchedChildren ( TreeNode node,
const std::string &  name 
)
private

◆ isInteger()

bool OpenMD::NameFinder::isInteger ( const std::string &  str)
private

Definition at line 434 of file NameFinder.cpp.

Referenced by match().

◆ isMatched()

bool OpenMD::NameFinder::isMatched ( const std::string &  str,
const std::string &  wildcard 
)
private

Definition at line 406 of file NameFinder.cpp.

References Wildcard::wildcardfit().

Referenced by getMatchedChildren(), and matchInternalIndex().

◆ loadNames()

◆ match()

◆ matchBend()

void OpenMD::NameFinder::matchBend ( const std::string &  molName,
const std::string &  bendName,
SelectionSet bs 
)
private

Definition at line 322 of file NameFinder.cpp.

References getAllChildren(), getMatchedChildren(), and root_.

Referenced by match().

◆ matchBond()

void OpenMD::NameFinder::matchBond ( const std::string &  molName,
const std::string &  bondName,
SelectionSet bs 
)
private

Definition at line 304 of file NameFinder.cpp.

References getAllChildren(), getMatchedChildren(), and root_.

Referenced by match().

◆ matchInternalIndex()

◆ matchInversion()

void OpenMD::NameFinder::matchInversion ( const std::string &  molName,
const std::string &  inversionName,
SelectionSet bs 
)
private

Definition at line 352 of file NameFinder.cpp.

References getAllChildren(), getMatchedChildren(), and root_.

Referenced by match().

◆ matchMolecule()

void OpenMD::NameFinder::matchMolecule ( const std::string &  molName,
SelectionSet bs 
)
private

Definition at line 283 of file NameFinder.cpp.

References getMatchedChildren(), and root_.

Referenced by match().

◆ matchRigidAtoms()

void OpenMD::NameFinder::matchRigidAtoms ( const std::string &  molName,
const std::string &  rbName,
const std::string &  rbAtomName,
SelectionSet bs 
)
private

Definition at line 368 of file NameFinder.cpp.

References getMatchedChildren(), and root_.

Referenced by match().

◆ matchStuntDouble()

void OpenMD::NameFinder::matchStuntDouble ( const std::string &  molName,
const std::string &  sdName,
SelectionSet bs 
)
private

Definition at line 291 of file NameFinder.cpp.

References getMatchedChildren(), and root_.

Referenced by match().

◆ matchTorsion()

void OpenMD::NameFinder::matchTorsion ( const std::string &  molName,
const std::string &  torsionName,
SelectionSet bs 
)
private

Definition at line 337 of file NameFinder.cpp.

References getAllChildren(), getMatchedChildren(), and root_.

Referenced by match().

Member Data Documentation

◆ info_

SimInfo* OpenMD::NameFinder::info_
private

Definition at line 84 of file NameFinder.hpp.

Referenced by loadNames(), matchInternalIndex(), and NameFinder().

◆ nObjects_

vector<int> OpenMD::NameFinder::nObjects_
private

Definition at line 85 of file NameFinder.hpp.

Referenced by createNode(), loadNames(), match(), and NameFinder().

◆ root_

TreeNode* OpenMD::NameFinder::root_
private

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