29 #ifndef CDPL_CHEM_REACTIONFUNCTIONS_HPP
30 #define CDPL_CHEM_REACTIONFUNCTIONS_HPP
333 bool ord_h_deplete =
true);
Definition of the type CDPL::Chem::AtomMapping.
Definition of constants in namespace CDPL::Chem::BondPropertyFlag.
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 constants in namespace CDPL::Chem::AtomPropertyFlag.
Definition of class CDPL::Chem::FragmentList.
Definition of class CDPL::Chem::MatchConstraintList.
Definition of class CDPL::Chem::MatchExpression.
Definition of class CDPL::Chem::Molecule.
Definition of constants in namespace CDPL::Chem::ReactionRole.
Definition of class CDPL::Chem::StringDataBlockItem and the type CDPL::Chem::StringDataBlock.
std::shared_ptr< AtomMapping > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated AtomMapping instances.
Definition: AtomMapping.hpp:58
std::shared_ptr< FragmentList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FragmentList instances.
Definition: FragmentList.hpp:53
std::shared_ptr< MatchConstraintList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MatchConstraintList instances.
Definition: MatchConstraintList.hpp:211
Generic boolean expression interface for the implementation of query/target object equivalence tests ...
Definition: MatchExpression.hpp:75
std::shared_ptr< Molecule > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Molecule instances.
Definition: Molecule.hpp:59
Abstract base class for chemical reactions composed of role-tagged Chem::Molecule components.
Definition: Reaction.hpp:59
std::shared_ptr< StringDataBlock > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated StringDataBlock instances.
Definition: StringDataBlock.hpp:153
constexpr unsigned int DEFAULT
Represents the default set of atom properties.
Definition: Chem/AtomPropertyFlag.hpp:53
constexpr unsigned int DEFAULT
Represents the default set of bond properties.
Definition: BondPropertyFlag.hpp:53
constexpr unsigned int ALL
Specifies reactants, agents and products of a reaction.
Definition: ReactionRole.hpp:74
CDPL_CHEM_API const Molecule::SharedPointer & getMDLMoleculeRecord(const Reaction &rxn)
Returns the value of the Chem::ReactionProperty::MDL_MOLECULE_RECORD property of rxn.
CDPL_CHEM_API void setMDLUserInitials(MolecularGraph &molgraph, const std::string &initials)
Sets the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of molgraph to initials.
CDPL_CHEM_API AtomMapping::SharedPointer perceiveAtomMapping(const Reaction &rxn)
Derives the reactant-to-product atom mapping from the atom mapping IDs of rxn without modifying it.
CDPL_CHEM_API const std::string & getComment(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::COMMENT property of molgraph.
CDPL_CHEM_API void clearMDLExternalRegistryNumber(Reaction &rxn)
Removes the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property from rxn.
CDPL_CHEM_API void clearMatchExpression(Atom &atom)
Removes the Chem::AtomProperty::MATCH_EXPRESSION property from atom.
CDPL_CHEM_API bool hasTimestamp(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::TIMESTAMP property.
CDPL_CHEM_API const StringDataBlock::SharedPointer & getReactionData(const Reaction &rxn)
Returns the value of the Chem::ReactionProperty::REACTION_DATA property of rxn.
CDPL_CHEM_API void setTimestamp(MolecularGraph &molgraph, std::time_t time)
Sets the Chem::MolecularGraphProperty::TIMESTAMP property of molgraph to time.
CDPL_CHEM_API bool hasMDLUserInitials(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_USER_INITIALS property.
CDPL_CHEM_API void initSubstructureSearchQuery(MolecularGraph &molgraph, bool overwrite)
Prepares molgraph for use as a substructure search query (precomputes match expressions and required ...
CDPL_CHEM_API const MatchConstraintList::SharedPointer & getMatchConstraints(const Atom &atom)
Returns the Chem::AtomProperty::MATCH_CONSTRAINTS property of atom.
CDPL_CHEM_API void generateMatchExpressions(MolecularGraph &molgraph, bool overwrite)
Generates and stores match expressions for every atom, bond and the molecular graph itself.
CDPL_CHEM_API void setReactionData(Reaction &rxn, const StringDataBlock::SharedPointer &data)
Sets the Chem::ReactionProperty::REACTION_DATA property of rxn to data.
CDPL_CHEM_API bool hasReactionData(const Reaction &rxn)
Tells whether rxn carries the Chem::ReactionProperty::REACTION_DATA property.
CDPL_CHEM_API bool hasName(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::NAME property.
CDPL_CHEM_API const std::string & getMDLUserInitials(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of molgraph.
CDPL_CHEM_API void clearMDLRegistryNumber(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property from molgraph.
CDPL_CHEM_API const std::string & getName(const Atom &atom)
Returns the Chem::AtomProperty::NAME property of atom.
CDPL_CHEM_API void clearMDLRXNFileVersion(Reaction &rxn)
Removes the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property from rxn.
CDPL_CHEM_API const AtomMapping::SharedPointer & getAtomMapping(const Reaction &rxn)
Returns the value of the Chem::ReactionProperty::ATOM_MAPPING property of rxn.
CDPL_CHEM_API bool hasMDLInternalRegistryNumber(const Reaction &rxn)
Tells whether rxn carries the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property.
CDPL_CHEM_API bool hasMDLRXNFileVersion(const Reaction &rxn)
Tells whether rxn carries the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property.
CDPL_CHEM_API void setMatchExpression(Atom &atom, const MatchExpression< Atom, MolecularGraph >::SharedPointer &expr)
Sets the Chem::AtomProperty::MATCH_EXPRESSION property of atom to expr.
CDPL_CHEM_API void clearTimestamp(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::TIMESTAMP property from molgraph.
CDPL_CHEM_API bool hasMDLRegistryNumber(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property.
CDPL_CHEM_API void setMDLInternalRegistryNumber(Reaction &rxn, const std::string ®_no)
Sets the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property of rxn to reg_no.
CDPL_CHEM_API MatchExpression< Atom, MolecularGraph >::SharedPointer generateMatchExpression(const Atom &atom, const MolecularGraph &molgraph)
Builds an atom-level match expression from the match-constraint list attached to atom.
CDPL_CHEM_API const MatchExpression< Atom, MolecularGraph >::SharedPointer & getMatchExpression(const Atom &atom)
Returns the Chem::AtomProperty::MATCH_EXPRESSION property of atom.
CDPL_CHEM_API void setComment(MolecularGraph &molgraph, const std::string &comment)
Sets the Chem::MolecularGraphProperty::COMMENT property of molgraph to comment.
CDPL_CHEM_API const std::string & getMDLInternalRegistryNumber(const Reaction &rxn)
Returns the value of the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property of rxn.
CDPL_CHEM_API bool hasMDLExternalRegistryNumber(const Reaction &rxn)
Tells whether rxn carries the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property.
CDPL_CHEM_API const std::string & getMDLExternalRegistryNumber(const Reaction &rxn)
Returns the value of the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property of rxn.
CDPL_CHEM_API void setAtomMapping(Reaction &rxn, const AtomMapping::SharedPointer &mapping)
Sets the Chem::ReactionProperty::ATOM_MAPPING property of rxn to mapping.
CDPL_CHEM_API void setComponentGroups(MolecularGraph &molgraph, const FragmentList::SharedPointer &comp_groups)
Sets the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of molgraph to comp_groups.
CDPL_CHEM_API void clearMDLProgramName(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property from molgraph.
CDPL_CHEM_API void clearReactionData(Reaction &rxn)
Removes the Chem::ReactionProperty::REACTION_DATA property from rxn.
CDPL_CHEM_API void setMDLExternalRegistryNumber(Reaction &rxn, const std::string ®_no)
Sets the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property of rxn to reg_no.
CDPL_CHEM_API const FragmentList::SharedPointer & getComponentGroups(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of molgraph.
CDPL_CHEM_API void initSubstructureSearchTarget(MolecularGraph &molgraph, bool overwrite)
Prepares molgraph for use as a substructure search target (precomputes required cached properties).
CDPL_CHEM_API FragmentList::SharedPointer perceiveComponentGroups(const MolecularGraph &molgraph)
Perceives the component groups of molgraph (from atom-level Chem::AtomProperty::COMPONENT_GROUP_ID va...
CDPL_CHEM_API void setMDLRXNFileVersion(Reaction &rxn, unsigned int version)
Sets the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property of rxn to version.
CDPL_CHEM_API void setMatchConstraints(Atom &atom, const MatchConstraintList::SharedPointer &constr)
Sets the Chem::AtomProperty::MATCH_CONSTRAINTS property of atom to constr.
CDPL_CHEM_API std::time_t getTimestamp(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::TIMESTAMP property of molgraph.
CDPL_CHEM_API std::uint64_t calcHashCode(const MolecularGraph &molgraph, unsigned int atom_flags=AtomPropertyFlag::DEFAULT, unsigned int bond_flags=BondPropertyFlag::DEFAULT, bool ord_h_deplete=true)
Computes a 64-bit hash code for molgraph taking into account the specified atom and bond properties.
CDPL_CHEM_API std::size_t getMaxComponentGroupID(const AtomContainer &cntnr)
Returns the largest component-group ID assigned to any atom of cntnr.
CDPL_CHEM_API void clearMDLMoleculeRecord(Reaction &rxn)
Removes the Chem::ReactionProperty::MDL_MOLECULE_RECORD property from rxn.
CDPL_CHEM_API bool hasMatchExpression(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MATCH_EXPRESSION property.
CDPL_CHEM_API void setComponentMatchConstraints(Reaction &rxn, const MatchConstraintList::SharedPointer &constr, bool overwrite)
Sets the molecular graph-level match-constraint list constr on every component of rxn.
CDPL_CHEM_API void clearComment(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::COMMENT property from molgraph.
CDPL_CHEM_API void clearComponentGroups(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::COMPONENT_GROUPS property from molgraph.
CDPL_CHEM_API const std::string & getMDLProgramName(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of molgraph.
CDPL_CHEM_API void clearName(Atom &atom)
Removes the Chem::AtomProperty::NAME property from atom.
CDPL_CHEM_API bool hasComponentGroups(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::COMPONENT_GROUPS property.
CDPL_CHEM_API void setAtomMatchConstraints(MolecularGraph &molgraph, const MatchConstraintList::SharedPointer &constr, bool overwrite)
Sets the atom-level match-constraint list constr on every atom of molgraph.
CDPL_CHEM_API void setMDLRegistryNumber(MolecularGraph &molgraph, std::size_t reg_no)
Sets the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of molgraph to reg_no.
CDPL_CHEM_API void clearAtomMapping(Reaction &rxn)
Removes the Chem::ReactionProperty::ATOM_MAPPING property from rxn.
CDPL_CHEM_API std::size_t getMDLRegistryNumber(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of molgraph.
CDPL_CHEM_API std::size_t getMaxAtomMappingID(const AtomContainer &cntnr)
Returns the largest atom-mapping ID assigned to any atom of cntnr.
CDPL_CHEM_API void clearMatchConstraints(Atom &atom)
Removes the Chem::AtomProperty::MATCH_CONSTRAINTS property from atom.
CDPL_CHEM_API void clearMDLUserInitials(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_USER_INITIALS property from molgraph.
CDPL_CHEM_API bool hasAtomMapping(const Reaction &rxn)
Tells whether rxn carries the Chem::ReactionProperty::ATOM_MAPPING property.
CDPL_CHEM_API bool hasMatchConstraints(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MATCH_CONSTRAINTS property.
CDPL_CHEM_API void calcBasicProperties(MolecularGraph &molgraph, bool overwrite)
Computes the basic per-atom/per-bond properties (aromaticity, ring info, etc.) of molgraph.
CDPL_CHEM_API void setMDLMoleculeRecord(Reaction &rxn, const Molecule::SharedPointer &mol_rec)
Sets the Chem::ReactionProperty::MDL_MOLECULE_RECORD property of rxn to mol_rec.
CDPL_CHEM_API bool hasComment(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::COMMENT property.
CDPL_CHEM_API void setMDLProgramName(MolecularGraph &molgraph, const std::string &name)
Sets the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of molgraph to name.
CDPL_CHEM_API bool hasMDLMoleculeRecord(const Reaction &rxn)
Tells whether rxn carries the Chem::ReactionProperty::MDL_MOLECULE_RECORD property.
CDPL_CHEM_API void setBondMatchConstraints(MolecularGraph &molgraph, const MatchConstraintList::SharedPointer &constr, bool overwrite)
Sets the bond-level match-constraint list constr on every bond of molgraph.
CDPL_CHEM_API void clearMDLInternalRegistryNumber(Reaction &rxn)
Removes the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property from rxn.
CDPL_CHEM_API bool generateSMILES(const MolecularGraph &molgraph, std::string &smiles, bool canonical=false, bool ord_h_deplete=true, unsigned int atom_flags=AtomPropertyFlag::DEFAULT, unsigned int bond_flags=BondPropertyFlag::DEFAULT)
Generates a SMILES string for molgraph.
CDPL_CHEM_API unsigned int getMDLRXNFileVersion(const Reaction &rxn)
Returns the value of the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property of rxn.
CDPL_CHEM_API bool hasMDLProgramName(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property.
CDPL_CHEM_API void setName(Atom &atom, const std::string &name)
Sets the Chem::AtomProperty::NAME property of atom to name.
The namespace of the Chemical Data Processing Library.