29 #ifndef CDPL_CHEM_STEREOISOMERGENERATOR_HPP
30 #define CDPL_CHEM_STEREOISOMERGENERATOR_HPP
220 typedef std::pair<bool, std::size_t> StereoCenterID;
223 bool isExcluded(
const Bond& bond,
const MolecularGraph& molgraph,
bool has_config)
const;
227 void flipConfiguration(
const StereoCenterID& ctr_id);
229 typedef std::vector<StereoCenterID> StereoCenterIDList;
233 bool enumAtomConfig{
true};
234 bool enumBondConfig{
true};
235 bool incSpecifiedCtrs{
false};
236 bool incSymmetricCtrs{
false};
237 bool incBridgeheads{
false};
238 bool incInvNitrogens{
false};
239 bool incRingBonds{
false};
240 std::size_t minRingSize{8};
241 StereoDescriptorArray atomDescrs;
242 StereoDescriptorArray bondDescrs;
243 StereoCenterIDList procCtrs;
Definition of class CDPL::Util::Array.
Type declaration of a generic wrapper class for storing user-defined Chem::Atom predicates.
Declaration of type CDPL::Util::BitSet.
Type declaration of a generic wrapper class for storing user-defined Chem::Bond predicates.
Definition of the preprocessor macro CDPL_CHEM_API.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the type CDPL::Chem::StereoDescriptor.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
Enumerates the stereoisomers of a molecular graph by flipping the configurations of selected atom and...
Definition: StereoisomerGenerator.hpp:66
std::size_t getMinRingSize() const
Returns the minimum ring size for a ring bond to be eligible as a stereocenter.
const StereoDescriptorArray & getBondDescriptors()
Returns the per-bond stereo descriptors for the current stereoisomer.
void setBondPredicate(const BondPredicate &pred)
Sets the predicate used to filter bond stereocenters considered during enumeration.
void enumerateAtomConfig(bool enumerate)
Specifies whether atom-stereocenter configurations shall be enumerated.
void includeSymmetricCenters(bool include)
Specifies whether topologically-symmetric stereocenters shall be enumerated.
void setMinRingSize(std::size_t min_size)
Sets the minimum ring size for a ring bond to be eligible as a stereocenter.
void includeSpecifiedCenters(bool include)
Specifies whether stereocenters with explicitly specified configurations shall be enumerated.
bool ringBondsIncluded() const
Tells whether ring bonds are enumerated.
bool symmetricCentersIncluded() const
Tells whether topologically-symmetric stereocenters are enumerated.
void setAtomPredicate(const AtomPredicate &pred)
Sets the predicate used to filter atom stereocenters considered during enumeration.
void includeBridgeheadAtoms(bool include)
Specifies whether bridgehead atoms in fused ring systems shall be enumerated as stereocenters.
bool generate()
Advances the enumeration by one step and updates the per-atom/per-bond stereo-descriptor arrays.
bool specifiedCentersIncluded() const
Tells whether specified stereocenters are enumerated.
void enumerateBondConfig(bool enumerate)
Specifies whether bond-stereocenter configurations shall be enumerated.
bool invertibleNitrogensIncluded() const
Tells whether invertible nitrogen stereocenters are enumerated.
void setup(const MolecularGraph &molgraph)
Prepares the generator for enumerating the stereoisomers of molgraph.
Util::Array< StereoDescriptor > StereoDescriptorArray
Array of StereoDescriptor values (one per atom or one per bond of the input molecular graph).
Definition: StereoisomerGenerator.hpp:73
const BondPredicate & getBondPredicate() const
Returns the currently configured bond predicate.
void includeInvertibleNitrogens(bool include)
Specifies whether invertible (pyramidal) nitrogen stereocenters shall be enumerated.
bool bondConfigEnumerated() const
Tells whether bond-stereocenter configurations are enumerated.
bool atomConfigEnumerated() const
Tells whether atom-stereocenter configurations are enumerated.
const StereoDescriptorArray & getAtomDescriptors()
Returns the per-atom stereo descriptors for the current stereoisomer.
std::shared_ptr< StereoisomerGenerator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated StereoisomerGenerator instances.
Definition: StereoisomerGenerator.hpp:70
void includeRingBonds(bool include)
Specifies whether ring bonds (large enough to allow cis/trans isomerism) shall be enumerated.
bool bridgeheadAtomsIncluded() const
Tells whether bridgehead atoms are enumerated.
const AtomPredicate & getAtomPredicate() const
Returns the currently configured atom predicate.
std::function< bool(const Chem::Atom &)> AtomPredicate
Generic wrapper class used to store a user-defined atom predicate.
Definition: AtomPredicate.hpp:41
std::function< bool(const Chem::Bond &)> BondPredicate
Generic wrapper class used to store a user-defined bond predicate.
Definition: BondPredicate.hpp:41
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.