29 #ifndef CDPL_CONFGEN_TORSIONRULE_HPP
30 #define CDPL_CONFGEN_TORSIONRULE_HPP
59 typedef std::vector<AngleEntry> AngleEntryList;
76 AngleEntry(
double ang,
double tol1 = 0.0,
double tol2 = 0.0,
double score = 0.0):
77 angle(ang), tolerance1(tol1), tolerance2(tol2), score(score) {}
164 void addAngle(
double angle,
double tol1 = 0.0,
double tol2 = 0.0,
double score = 0.0);
254 void checkAngleIndex(std::size_t idx,
bool it)
const;
256 std::string matchPatternStr;
258 AngleEntryList angles;
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.
std::shared_ptr< MolecularGraph > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MolecularGraph instances.
Definition: MolecularGraph.hpp:63
One preferred torsion angle for a rule, characterized by its value, the two tolerance bands and a sco...
Definition: TorsionRule.hpp:66
double getTolerance2() const
Returns the second (relaxed) tolerance band.
Definition: TorsionRule.hpp:101
double getTolerance1() const
Returns the first (preferred) tolerance band.
Definition: TorsionRule.hpp:92
double getScore() const
Returns the score (higher values mark more strongly preferred angles).
Definition: TorsionRule.hpp:110
double getAngle() const
Returns the angle value.
Definition: TorsionRule.hpp:83
AngleEntry(double ang, double tol1=0.0, double tol2=0.0, double score=0.0)
Constructs the AngleEntry with the given angle value, tolerances and score.
Definition: TorsionRule.hpp:76
Data structure for the representation of single torsion library rules.
Definition: TorsionRule.hpp:53
AngleEntryList::iterator AngleEntryIterator
A mutable iterator over the angle entries.
Definition: TorsionRule.hpp:123
AngleEntryIterator begin()
Returns a mutable iterator pointing to the first angle entry (range-based for support).
void setMatchPatternString(const std::string &ptn_str)
Sets the SMARTS-like match pattern in textual form.
void setMatchPattern(const Chem::MolecularGraph::SharedPointer &ptn)
Sets the compiled match-pattern molecular graph.
ConstAngleEntryIterator getAnglesBegin() const
Returns a constant iterator pointing to the first angle entry.
const std::string & getMatchPatternString() const
Returns the SMARTS-like match pattern in textual form.
ConstAngleEntryIterator end() const
Returns a constant iterator pointing one past the last angle entry (range-based for support).
ConstAngleEntryIterator begin() const
Returns a constant iterator pointing to the first angle entry (range-based for support).
AngleEntryList::const_iterator ConstAngleEntryIterator
A constant iterator over the angle entries.
Definition: TorsionRule.hpp:125
const Chem::MolecularGraph::SharedPointer & getMatchPattern() const
Returns the compiled match-pattern molecular graph.
const AngleEntry & getAngle(std::size_t idx) const
Returns the angle entry at index idx.
void clear()
Clears the match pattern and removes all angle entries.
AngleEntryIterator end()
Returns a mutable iterator pointing one past the last angle entry (range-based for support).
AngleEntryIterator getAnglesBegin()
Returns a mutable iterator pointing to the first angle entry.
void removeAngle(const AngleEntryIterator &it)
Removes the angle entry referenced by iterator it.
void addAngle(double angle, double tol1=0.0, double tol2=0.0, double score=0.0)
Constructs and appends a new angle entry.
void addAngle(const AngleEntry &ang_entry)
Appends the angle entry ang_entry to the rule.
void removeAngle(std::size_t idx)
Removes the angle entry at index idx.
ConstAngleEntryIterator getAnglesEnd() const
Returns a constant iterator pointing one past the last angle entry.
void swap(TorsionRule &rule)
Swaps the contents of this rule with rule.
std::size_t getNumAngles() const
Returns the number of stored angle entries.
AngleEntryIterator getAnglesEnd()
Returns a mutable iterator pointing one past the last angle entry.
The namespace of the Chemical Data Processing Library.