![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Data structure representing a hierarchical library of torsion rules organized into categories. More...
#include <TorsionLibrary.hpp>
Inheritance diagram for CDPL::ConfGen::TorsionLibrary:Public Types | |
| typedef std::shared_ptr< TorsionLibrary > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated TorsionLibrary instances. More... | |
Public Types inherited from CDPL::ConfGen::TorsionCategory | |
| typedef CategoryList::iterator | CategoryIterator |
| A mutable iterator over the child categories. More... | |
| typedef CategoryList::const_iterator | ConstCategoryIterator |
| A constant iterator over the child categories. More... | |
| typedef RuleList::iterator | RuleIterator |
| A mutable iterator over the contained rules. More... | |
| typedef RuleList::const_iterator | ConstRuleIterator |
| A constant iterator over the contained rules. More... | |
Public Member Functions | |
| void | load (std::istream &is) |
| Reads the library content from the input stream is in the XML-based CDPL torsion library format. More... | |
| void | save (std::ostream &os) const |
| Writes the library content to the output stream os in the XML-based CDPL torsion library format. More... | |
| void | loadDefaults () |
| Loads the built-in CDPL default torsion library. More... | |
Public Member Functions inherited from CDPL::ConfGen::TorsionCategory | |
| TorsionCategory () | |
Constructs an empty TorsionCategory instance. More... | |
| virtual | ~TorsionCategory () |
| Virtual destructor. More... | |
| const std::string & | getName () const |
| Returns the category name. More... | |
| void | setName (const std::string &name) |
| Sets the category name. More... | |
| const std::string & | getMatchPatternString () const |
| Returns the SMARTS string used to perceive bonds belonging to this category. More... | |
| void | setMatchPatternString (const std::string &ptn_str) |
| Sets the SMARTS string used to perceive bonds belonging to this category. More... | |
| const Chem::MolecularGraph::SharedPointer & | getMatchPattern () const |
| Returns the molecular graph pattern used to perceive bonds belonging to this category. More... | |
| void | setMatchPattern (const Chem::MolecularGraph::SharedPointer &ptn) |
| Sets the molecular graph pattern used to perceive bonds belonging to this category. More... | |
| unsigned int | getBondAtom1Type () const |
| Returns the atom type of the first central bond atom required by this category. More... | |
| void | setBondAtom1Type (unsigned int type) |
| Sets the atom type of the first central bond atom required by this category. More... | |
| unsigned int | getBondAtom2Type () const |
| Returns the atom type of the second central bond atom required by this category. More... | |
| void | setBondAtom2Type (unsigned int type) |
| Sets the atom type of the second central bond atom required by this category. More... | |
| TorsionCategory & | addCategory () |
| Creates and appends a new empty child category. More... | |
| TorsionCategory & | addCategory (const TorsionCategory &cat) |
| Appends a copy of cat as a child category. More... | |
| TorsionRule & | addRule () |
| Creates and appends a new empty torsion rule. More... | |
| TorsionRule & | addRule (const TorsionRule &rule) |
| Appends a copy of rule as a contained torsion rule. More... | |
| std::size_t | getNumCategories (bool recursive=false) const |
| Returns the number of child categories. More... | |
| std::size_t | getNumRules (bool recursive=false) const |
| Returns the number of contained torsion rules. More... | |
| TorsionCategory & | getCategory (std::size_t idx) |
| Returns the child category at index idx. More... | |
| const TorsionCategory & | getCategory (std::size_t idx) const |
| Returns the child category at index idx. More... | |
| TorsionRule & | getRule (std::size_t idx) |
| Returns the torsion rule at index idx. More... | |
| const TorsionRule & | getRule (std::size_t idx) const |
| Returns the torsion rule at index idx. More... | |
| void | removeCategory (std::size_t idx) |
| Removes the child category at index idx. More... | |
| void | removeRule (std::size_t idx) |
| Removes the torsion rule at index idx. More... | |
| void | removeCategory (const CategoryIterator &it) |
| Removes the child category referenced by it. More... | |
| void | removeRule (const RuleIterator &it) |
| Removes the torsion rule referenced by it. More... | |
| CategoryIterator | getCategoriesBegin () |
| Returns a mutable iterator pointing to the first child category. More... | |
| CategoryIterator | getCategoriesEnd () |
| Returns a mutable iterator pointing one past the last child category. More... | |
| ConstCategoryIterator | getCategoriesBegin () const |
| Returns a constant iterator pointing to the first child category. More... | |
| ConstCategoryIterator | getCategoriesEnd () const |
| Returns a constant iterator pointing one past the last child category. More... | |
| RuleIterator | getRulesBegin () |
| Returns a mutable iterator pointing to the first contained rule. More... | |
| RuleIterator | getRulesEnd () |
| Returns a mutable iterator pointing one past the last contained rule. More... | |
| ConstRuleIterator | getRulesBegin () const |
| Returns a constant iterator pointing to the first contained rule. More... | |
| ConstRuleIterator | getRulesEnd () const |
| Returns a constant iterator pointing one past the last contained rule. More... | |
| void | swap (TorsionCategory &cat) |
| Swaps the contents of this category with cat. More... | |
| void | clear () |
| Removes all child categories and contained rules and resets the pattern/atom-type data. More... | |
Static Public Member Functions | |
| static void | set (const SharedPointer &lib) |
| Sets the globally accessible default torsion library. More... | |
| static const SharedPointer & | get () |
| Returns the globally accessible default torsion library (created on first access). More... | |
Data structure representing a hierarchical library of torsion rules organized into categories.
TorsionLibrary extends ConfGen::TorsionCategory with XML load/save methods and provides static set()/get() accessors for a process-wide default torsion library.
| typedef std::shared_ptr<TorsionLibrary> CDPL::ConfGen::TorsionLibrary::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated TorsionLibrary instances.
| void CDPL::ConfGen::TorsionLibrary::load | ( | std::istream & | is | ) |
Reads the library content from the input stream is in the XML-based CDPL torsion library format.
| is | The input stream to read from. |
| void CDPL::ConfGen::TorsionLibrary::save | ( | std::ostream & | os | ) | const |
Writes the library content to the output stream os in the XML-based CDPL torsion library format.
| os | The output stream to write to. |
| void CDPL::ConfGen::TorsionLibrary::loadDefaults | ( | ) |
Loads the built-in CDPL default torsion library.
|
static |
Sets the globally accessible default torsion library.
| lib | The new default library. |
|
static |
Returns the globally accessible default torsion library (created on first access).
const reference to the default torsion library shared pointer.