Finds torsion rules from a TorsionLibrary that apply to a given rotatable bond.
More...
#include <TorsionRuleMatcher.hpp>
Finds torsion rules from a TorsionLibrary that apply to a given rotatable bond.
For a queried bond in a molecular graph the matcher iterates the configured TorsionLibrary (top-down through torsion categories) and reports every rule whose central bond SMARTS pattern matches at the queried bond. Each match is stored as a TorsionRuleMatch object providing the four matching atoms, the matched rule and the underlying atom/bond mapping.
◆ ConstMatchIterator
A constant iterator over the stored torsion rule matches.
◆ TorsionRuleMatcher() [1/2]
| CDPL::ConfGen::TorsionRuleMatcher::TorsionRuleMatcher |
( |
| ) |
|
Constructs the TorsionRuleMatcher instance without an associated torsion library.
◆ TorsionRuleMatcher() [2/2]
Constructs the TorsionRuleMatcher instance and associates it with lib.
- Parameters
-
| lib | The torsion library to query. |
◆ findUniqueMappingsOnly() [1/2]
| void CDPL::ConfGen::TorsionRuleMatcher::findUniqueMappingsOnly |
( |
bool |
unique | ) |
|
Specifies whether only unique substructure mappings shall be reported during matching.
- Parameters
-
| unique | If true, only one of multiple equivalent mappings is reported per rule. |
◆ findUniqueMappingsOnly() [2/2]
| bool CDPL::ConfGen::TorsionRuleMatcher::findUniqueMappingsOnly |
( |
| ) |
const |
Tells whether only unique substructure mappings are reported during matching.
- Returns
true if only unique mappings are reported, and false otherwise.
◆ findAllRuleMappings() [1/2]
| void CDPL::ConfGen::TorsionRuleMatcher::findAllRuleMappings |
( |
bool |
all | ) |
|
Specifies whether all matching rules shall be reported (instead of just the most-specific one).
- Parameters
-
| all | If true, every matching rule across all categories is reported. |
◆ findAllRuleMappings() [2/2]
| bool CDPL::ConfGen::TorsionRuleMatcher::findAllRuleMappings |
( |
| ) |
const |
Tells whether all matching rules are reported during matching.
- Returns
true if all matching rules are reported, and false otherwise.
◆ stopAtFirstMatchingRule() [1/2]
| void CDPL::ConfGen::TorsionRuleMatcher::stopAtFirstMatchingRule |
( |
bool |
stop | ) |
|
Specifies whether the matching process shall stop at the first rule that produces matches.
- Parameters
-
| stop | If true, matching stops as soon as a rule yields at least one match. |
◆ stopAtFirstMatchingRule() [2/2]
| bool CDPL::ConfGen::TorsionRuleMatcher::stopAtFirstMatchingRule |
( |
| ) |
const |
Tells whether matching stops at the first rule that produces matches.
- Returns
true if matching stops at the first matching rule, and false otherwise.
◆ setTorsionLibrary()
Sets the torsion library to query.
- Parameters
-
| lib | The new torsion library. |
◆ getTorsionLibrary()
Returns the currently associated torsion library.
- Returns
- A
const reference to the torsion library smart pointer.
◆ getNumMatches()
| std::size_t CDPL::ConfGen::TorsionRuleMatcher::getNumMatches |
( |
| ) |
const |
Returns the number of stored torsion rule matches found by calls to findMatches().
- Returns
- The number of stored torsion rule matches.
◆ getMatch()
| const TorsionRuleMatch& CDPL::ConfGen::TorsionRuleMatcher::getMatch |
( |
std::size_t |
idx | ) |
const |
Returns a const reference to the stored torsion rule match object at index idx.
- Parameters
-
| idx | The zero-based index of the torsion rule match object to return. |
- Returns
- A
const reference to the torsion rule match object at index idx.
- Exceptions
-
◆ getMatchesBegin()
Returns a constant iterator pointing to the beginning of the stored torsion rule matches.
- Returns
- A constant iterator pointing to the beginning of the stored torsion rule matches.
◆ getMatchesEnd()
Returns a constant iterator pointing to the end of the stored torsion rule matches.
- Returns
- A constant iterator pointing to the end of the stored torsion rule matches.
◆ begin()
Returns a constant iterator pointing to the beginning of the stored torsion rule matches.
- Returns
- A constant iterator pointing to the beginning of the stored torsion rule matches.
◆ end()
Returns a constant iterator pointing to the end of the stored torsion rule matches.
- Returns
- A constant iterator pointing to the end of the stored torsion rule matches.
◆ findMatches()
Searches the associated TorsionLibrary for rules that apply to the bond bond of molgraph.
- Parameters
-
| bond | The rotatable bond for which matching torsion rules are sought. |
| molgraph | The molecular graph the bond belongs to. |
| append | If true, new matches are appended to the previously stored ones; otherwise stored matches are cleared first. |
- Returns
true if at least one matching rule was found, and false otherwise.
The documentation for this class was generated from the following file: