![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Enumerates the stereoisomers of a molecular graph by flipping the configurations of selected atom and bond stereocenters. More...
#include <StereoisomerGenerator.hpp>
Public Types | |
| typedef std::shared_ptr< StereoisomerGenerator > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated StereoisomerGenerator instances. More... | |
| typedef Util::Array< StereoDescriptor > | StereoDescriptorArray |
| Array of StereoDescriptor values (one per atom or one per bond of the input molecular graph). More... | |
Public Member Functions | |
| void | setAtomPredicate (const AtomPredicate &pred) |
| Sets the predicate used to filter atom stereocenters considered during enumeration. More... | |
| const AtomPredicate & | getAtomPredicate () const |
| Returns the currently configured atom predicate. More... | |
| void | setBondPredicate (const BondPredicate &pred) |
| Sets the predicate used to filter bond stereocenters considered during enumeration. More... | |
| const BondPredicate & | getBondPredicate () const |
| Returns the currently configured bond predicate. More... | |
| void | enumerateAtomConfig (bool enumerate) |
| Specifies whether atom-stereocenter configurations shall be enumerated. More... | |
| bool | atomConfigEnumerated () const |
| Tells whether atom-stereocenter configurations are enumerated. More... | |
| void | enumerateBondConfig (bool enumerate) |
| Specifies whether bond-stereocenter configurations shall be enumerated. More... | |
| bool | bondConfigEnumerated () const |
| Tells whether bond-stereocenter configurations are enumerated. More... | |
| void | includeSpecifiedCenters (bool include) |
| Specifies whether stereocenters with explicitly specified configurations shall be enumerated. More... | |
| bool | specifiedCentersIncluded () const |
| Tells whether specified stereocenters are enumerated. More... | |
| void | includeSymmetricCenters (bool include) |
| Specifies whether topologically-symmetric stereocenters shall be enumerated. More... | |
| bool | symmetricCentersIncluded () const |
| Tells whether topologically-symmetric stereocenters are enumerated. More... | |
| void | includeBridgeheadAtoms (bool include) |
| Specifies whether bridgehead atoms in fused ring systems shall be enumerated as stereocenters. More... | |
| bool | bridgeheadAtomsIncluded () const |
| Tells whether bridgehead atoms are enumerated. More... | |
| void | includeInvertibleNitrogens (bool include) |
| Specifies whether invertible (pyramidal) nitrogen stereocenters shall be enumerated. More... | |
| bool | invertibleNitrogensIncluded () const |
| Tells whether invertible nitrogen stereocenters are enumerated. More... | |
| void | includeRingBonds (bool include) |
| Specifies whether ring bonds (large enough to allow cis/trans isomerism) shall be enumerated. More... | |
| bool | ringBondsIncluded () const |
| Tells whether ring bonds are enumerated. More... | |
| void | setMinRingSize (std::size_t min_size) |
| Sets the minimum ring size for a ring bond to be eligible as a stereocenter. More... | |
| std::size_t | getMinRingSize () const |
| Returns the minimum ring size for a ring bond to be eligible as a stereocenter. More... | |
| void | setup (const MolecularGraph &molgraph) |
| Prepares the generator for enumerating the stereoisomers of molgraph. More... | |
| bool | generate () |
| Advances the enumeration by one step and updates the per-atom/per-bond stereo-descriptor arrays. More... | |
| const StereoDescriptorArray & | getAtomDescriptors () |
| Returns the per-atom stereo descriptors for the current stereoisomer. More... | |
| const StereoDescriptorArray & | getBondDescriptors () |
| Returns the per-bond stereo descriptors for the current stereoisomer. More... | |
Enumerates the stereoisomers of a molecular graph by flipping the configurations of selected atom and bond stereocenters.
After calling setup() for an input molecular graph, each call to generate() yields the next stereoisomer (encoded as per-atom and per-bond StereoDescriptor arrays accessible via getAtomDescriptors() / getBondDescriptors()); generate() returns false when the enumeration is exhausted. Atom and bond predicates plus a number of inclusion flags control which stereocenters are enumerated.
| typedef std::shared_ptr<StereoisomerGenerator> CDPL::Chem::StereoisomerGenerator::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated StereoisomerGenerator instances.
Array of StereoDescriptor values (one per atom or one per bond of the input molecular graph).
| void CDPL::Chem::StereoisomerGenerator::setAtomPredicate | ( | const AtomPredicate & | pred | ) |
Sets the predicate used to filter atom stereocenters considered during enumeration.
| pred | The new atom predicate. |
| const AtomPredicate& CDPL::Chem::StereoisomerGenerator::getAtomPredicate | ( | ) | const |
Returns the currently configured atom predicate.
const reference to the atom predicate. | void CDPL::Chem::StereoisomerGenerator::setBondPredicate | ( | const BondPredicate & | pred | ) |
Sets the predicate used to filter bond stereocenters considered during enumeration.
| pred | The new bond predicate. |
| const BondPredicate& CDPL::Chem::StereoisomerGenerator::getBondPredicate | ( | ) | const |
Returns the currently configured bond predicate.
const reference to the bond predicate. | void CDPL::Chem::StereoisomerGenerator::enumerateAtomConfig | ( | bool | enumerate | ) |
Specifies whether atom-stereocenter configurations shall be enumerated.
| enumerate | If true, atom configurations are flipped during enumeration. |
| bool CDPL::Chem::StereoisomerGenerator::atomConfigEnumerated | ( | ) | const |
Tells whether atom-stereocenter configurations are enumerated.
true if atom configurations are enumerated, and false otherwise. | void CDPL::Chem::StereoisomerGenerator::enumerateBondConfig | ( | bool | enumerate | ) |
Specifies whether bond-stereocenter configurations shall be enumerated.
| enumerate | If true, bond configurations are flipped during enumeration. |
| bool CDPL::Chem::StereoisomerGenerator::bondConfigEnumerated | ( | ) | const |
Tells whether bond-stereocenter configurations are enumerated.
true if bond configurations are enumerated, and false otherwise. | void CDPL::Chem::StereoisomerGenerator::includeSpecifiedCenters | ( | bool | include | ) |
Specifies whether stereocenters with explicitly specified configurations shall be enumerated.
| include | If true, specified stereocenters are also flipped. |
| bool CDPL::Chem::StereoisomerGenerator::specifiedCentersIncluded | ( | ) | const |
Tells whether specified stereocenters are enumerated.
true if specified stereocenters are included, and false otherwise. | void CDPL::Chem::StereoisomerGenerator::includeSymmetricCenters | ( | bool | include | ) |
Specifies whether topologically-symmetric stereocenters shall be enumerated.
| include | If true, symmetric stereocenters are also flipped. |
| bool CDPL::Chem::StereoisomerGenerator::symmetricCentersIncluded | ( | ) | const |
Tells whether topologically-symmetric stereocenters are enumerated.
true if symmetric stereocenters are included, and false otherwise. | void CDPL::Chem::StereoisomerGenerator::includeBridgeheadAtoms | ( | bool | include | ) |
Specifies whether bridgehead atoms in fused ring systems shall be enumerated as stereocenters.
| include | If true, bridgehead atoms are included. |
| bool CDPL::Chem::StereoisomerGenerator::bridgeheadAtomsIncluded | ( | ) | const |
Tells whether bridgehead atoms are enumerated.
true if bridgehead atoms are included, and false otherwise. | void CDPL::Chem::StereoisomerGenerator::includeInvertibleNitrogens | ( | bool | include | ) |
Specifies whether invertible (pyramidal) nitrogen stereocenters shall be enumerated.
| include | If true, invertible nitrogens are included. |
| bool CDPL::Chem::StereoisomerGenerator::invertibleNitrogensIncluded | ( | ) | const |
Tells whether invertible nitrogen stereocenters are enumerated.
true if invertible nitrogens are included, and false otherwise. | void CDPL::Chem::StereoisomerGenerator::includeRingBonds | ( | bool | include | ) |
Specifies whether ring bonds (large enough to allow cis/trans isomerism) shall be enumerated.
| include | If true, ring bonds whose ring is at least getMinRingSize() atoms in size are included. |
| bool CDPL::Chem::StereoisomerGenerator::ringBondsIncluded | ( | ) | const |
Tells whether ring bonds are enumerated.
true if ring bonds are included, and false otherwise. | void CDPL::Chem::StereoisomerGenerator::setMinRingSize | ( | std::size_t | min_size | ) |
Sets the minimum ring size for a ring bond to be eligible as a stereocenter.
| min_size | The new minimum ring size (in atoms). |
| std::size_t CDPL::Chem::StereoisomerGenerator::getMinRingSize | ( | ) | const |
Returns the minimum ring size for a ring bond to be eligible as a stereocenter.
| void CDPL::Chem::StereoisomerGenerator::setup | ( | const MolecularGraph & | molgraph | ) |
Prepares the generator for enumerating the stereoisomers of molgraph.
| molgraph | The input molecular graph. |
| bool CDPL::Chem::StereoisomerGenerator::generate | ( | ) |
Advances the enumeration by one step and updates the per-atom/per-bond stereo-descriptor arrays.
true if a new stereoisomer was generated, and false if the enumeration is exhausted. | const StereoDescriptorArray& CDPL::Chem::StereoisomerGenerator::getAtomDescriptors | ( | ) |
Returns the per-atom stereo descriptors for the current stereoisomer.
const reference to the atom-stereo-descriptor array. | const StereoDescriptorArray& CDPL::Chem::StereoisomerGenerator::getBondDescriptors | ( | ) |
Returns the per-bond stereo descriptors for the current stereoisomer.
const reference to the bond-stereo-descriptor array.