29 #ifndef CDPL_CHEM_TAUTOMERGENERATOR_HPP
30 #define CDPL_CHEM_TAUTOMERGENERATOR_HPP
35 #include <unordered_set>
133 void initHashCalculator();
141 bool addNewTautomer(
const MoleculePtr& mol_ptr);
142 bool outputTautomer(
const MoleculePtr& mol_ptr);
144 std::uint64_t calcConTabHashCode(
const MolecularGraph& molgraph,
bool arom_bonds);
150 typedef std::array<std::size_t, 3> BondDescriptor;
151 typedef std::vector<MoleculePtr> MoleculeList;
152 typedef std::vector<TautomerizationRule::SharedPointer> TautRuleList;
153 typedef std::vector<BondDescriptor> BondDescrArray;
154 typedef std::vector<std::size_t> SizeTArray;
155 typedef std::unordered_set<std::uint64_t> HashCodeSet;
156 typedef std::array<std::size_t, 6> StereoCenter;
157 typedef std::vector<StereoCenter> StereoCenterList;
164 bool remResDuplicates;
166 TautRuleList tautRules;
167 MoleculeList currGeneration;
168 MoleculeList nextGeneration;
169 StereoCenterList atomStereoCenters;
170 StereoCenterList bondStereoCenters;
171 HashCodeSet intermTautHashCodes;
172 HashCodeSet outputTautHashCodes;
176 BondDescrArray tautomerBonds;
Definition of the class CDPL::Chem::AromaticSubstructure.
Definition of the class CDPL::Chem::BasicMolecule.
Definition of the class CDPL::Chem::CIPConfigurationLabeler.
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 class CDPL::Chem::HashCodeCalculator.
Definition of the class CDPL::Util::ObjectPool.
Definition of the class CDPL::Chem::TautomerizationRule.
Implements the perception of aromatic atoms and bonds in a molecular graph.
Definition: AromaticSubstructure.hpp:52
CIPConfigurationLabeler.
Definition: CIPConfigurationLabeler.hpp:55
HashCodeCalculator.
Definition: HashCodeCalculator.hpp:57
MolecularGraph.
Definition: MolecularGraph.hpp:52
TautomerGenerator.
Definition: TautomerGenerator.hpp:59
std::shared_ptr< TautomerGenerator > SharedPointer
Definition: TautomerGenerator.hpp:70
bool resonanceDuplicatesRemoved() const
void setCallbackFunction(const CallbackFunction &func)
TautomerGenerator()
Constructs the TautomerGenerator instance.
bool isotopesRegarded() const
std::size_t getNumTautomerizationRules() const
virtual ~TautomerGenerator()
Definition: TautomerGenerator.hpp:82
bool stereochemistryRegarded() const
void regardStereochemistry(bool regard)
TautomerGenerator(const TautomerGenerator &gen)
std::function< bool(MolecularGraph &)> CallbackFunction
Definition: TautomerGenerator.hpp:72
const TautomerizationRule::SharedPointer & getTautomerizationRule(std::size_t idx) const
void generate(const MolecularGraph &molgraph)
Generates all unique tautomers of the molecular graph molgraph.
void removeResonanceDuplicates(bool remove)
void removeTautomerizationRule(std::size_t idx)
Mode
Definition: TautomerGenerator.hpp:63
@ TOPOLOGICALLY_UNIQUE
Definition: TautomerGenerator.hpp:65
@ GEOMETRICALLY_UNIQUE
Definition: TautomerGenerator.hpp:66
void addTautomerizationRule(const TautomerizationRule::SharedPointer &rule)
void setCustomSetupFunction(const CustomSetupFunction &func)
void regardIsotopes(bool regard)
const CallbackFunction & getCallbackFunction() const
std::function< void(MolecularGraph &)> CustomSetupFunction
Definition: TautomerGenerator.hpp:73
TautomerGenerator & operator=(const TautomerGenerator &gen)
std::shared_ptr< TautomerizationRule > SharedPointer
Definition: TautomerizationRule.hpp:53
std::shared_ptr< ObjectType > SharedObjectPointer
Definition: ObjectPool.hpp:65
CDPL_CHEM_API void setAromaticityFlags(MolecularGraph &molgraph, bool overwrite)
The namespace of the Chemical Data Processing Library.