29 #ifndef CDPL_CONFGEN_TORSIONCATEGORY_HPP
30 #define CDPL_CONFGEN_TORSIONCATEGORY_HPP
35 #include <boost/ptr_container/ptr_vector.hpp>
56 typedef boost::ptr_vector<TorsionCategory> CategoryList;
57 typedef boost::ptr_vector<TorsionRule> RuleList;
297 void checkCategoryIndex(std::size_t idx,
bool it)
const;
299 void checkRuleIndex(std::size_t idx,
bool it)
const;
302 std::string matchPatternStr;
304 unsigned int bondAtom1Type;
305 unsigned int bondAtom2Type;
307 CategoryList categories;
Definition of the preprocessor macro CDPL_CONFGEN_API.
#define CDPL_CONFGEN_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of class CDPL::Chem::MolecularGraph.
Definition of class CDPL::ConfGen::TorsionRule.
std::shared_ptr< MolecularGraph > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MolecularGraph instances.
Definition: MolecularGraph.hpp:63
Represents a node of a hierarchical torsion library.
Definition: TorsionCategory.hpp:54
TorsionCategory & addCategory()
Creates and appends a new empty child category.
void removeCategory(const CategoryIterator &it)
Removes the child category referenced by it.
RuleIterator getRulesBegin()
Returns a mutable iterator pointing to the first contained rule.
void setBondAtom1Type(unsigned int type)
Sets the atom type of the first central bond atom required by this category.
void clear()
Removes all child categories and contained rules and resets the pattern/atom-type data.
ConstCategoryIterator getCategoriesBegin() const
Returns a constant iterator pointing to the first child category.
const Chem::MolecularGraph::SharedPointer & getMatchPattern() const
Returns the molecular graph pattern used to perceive bonds belonging to this category.
TorsionCategory()
Constructs an empty TorsionCategory instance.
void removeRule(std::size_t idx)
Removes the torsion rule at index idx.
unsigned int getBondAtom1Type() const
Returns the atom type of the first central bond atom required by this category.
std::size_t getNumCategories(bool recursive=false) const
Returns the number of child categories.
const std::string & getName() const
Returns the category name.
TorsionCategory & addCategory(const TorsionCategory &cat)
Appends a copy of cat as a child category.
const std::string & getMatchPatternString() const
Returns the SMARTS string used to perceive bonds belonging to this category.
void removeCategory(std::size_t idx)
Removes the child category at index idx.
const TorsionRule & getRule(std::size_t idx) const
Returns the torsion rule at index idx.
RuleList::const_iterator ConstRuleIterator
A constant iterator over the contained rules.
Definition: TorsionCategory.hpp:67
unsigned int getBondAtom2Type() const
Returns the atom type of the second central bond atom required by this category.
virtual ~TorsionCategory()
Virtual destructor.
Definition: TorsionCategory.hpp:77
TorsionRule & addRule()
Creates and appends a new empty torsion rule.
ConstRuleIterator getRulesBegin() const
Returns a constant iterator pointing to the first contained rule.
CategoryIterator getCategoriesBegin()
Returns a mutable iterator pointing to the first child category.
ConstRuleIterator getRulesEnd() const
Returns a constant iterator pointing one past the last contained rule.
void setMatchPatternString(const std::string &ptn_str)
Sets the SMARTS string used to perceive bonds belonging to this category.
void removeRule(const RuleIterator &it)
Removes the torsion rule referenced by it.
CategoryList::iterator CategoryIterator
A mutable iterator over the child categories.
Definition: TorsionCategory.hpp:61
void setMatchPattern(const Chem::MolecularGraph::SharedPointer &ptn)
Sets the molecular graph pattern used to perceive bonds belonging to this category.
const TorsionCategory & getCategory(std::size_t idx) const
Returns the child category at index idx.
TorsionRule & addRule(const TorsionRule &rule)
Appends a copy of rule as a contained torsion rule.
void setBondAtom2Type(unsigned int type)
Sets the atom type of the second central bond atom required by this category.
TorsionCategory & getCategory(std::size_t idx)
Returns the child category at index idx.
TorsionRule & getRule(std::size_t idx)
Returns the torsion rule at index idx.
CategoryIterator getCategoriesEnd()
Returns a mutable iterator pointing one past the last child category.
std::size_t getNumRules(bool recursive=false) const
Returns the number of contained torsion rules.
RuleList::iterator RuleIterator
A mutable iterator over the contained rules.
Definition: TorsionCategory.hpp:65
ConstCategoryIterator getCategoriesEnd() const
Returns a constant iterator pointing one past the last child category.
RuleIterator getRulesEnd()
Returns a mutable iterator pointing one past the last contained rule.
void setName(const std::string &name)
Sets the category name.
void swap(TorsionCategory &cat)
Swaps the contents of this category with cat.
CategoryList::const_iterator ConstCategoryIterator
A constant iterator over the child categories.
Definition: TorsionCategory.hpp:63
Data structure for the representation of single torsion library rules.
Definition: TorsionRule.hpp:53
The namespace of the Chemical Data Processing Library.