Chemical Data Processing Library C++ API - Version 1.4.0
Namespaces | Functions
Chem/ReactionFunctions.hpp File Reference

Declaration of functions that operate on Chem::Reaction instances. More...

#include <cstddef>
#include <cstdint>
#include <ctime>
#include <string>
#include "CDPL/Chem/APIPrefix.hpp"
#include "CDPL/Chem/Molecule.hpp"
#include "CDPL/Chem/MatchExpression.hpp"
#include "CDPL/Chem/MatchConstraintList.hpp"
#include "CDPL/Chem/FragmentList.hpp"
#include "CDPL/Chem/AtomMapping.hpp"
#include "CDPL/Chem/StringDataBlock.hpp"
#include "CDPL/Chem/ReactionRole.hpp"
#include "CDPL/Chem/AtomPropertyFlag.hpp"
#include "CDPL/Chem/BondPropertyFlag.hpp"

Go to the source code of this file.

Namespaces

 CDPL
 The namespace of the Chemical Data Processing Library.
 
 CDPL::Chem
 Contains classes and functions related to chemistry.
 

Functions

CDPL_CHEM_API const std::string & CDPL::Chem::getName (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::NAME property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setName (Reaction &rxn, const std::string &name)
 Sets the value of the Chem::ReactionProperty::NAME property of the reaction rxn to name. More...
 
CDPL_CHEM_API void CDPL::Chem::clearName (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::NAME property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasName (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::NAME property of the reaction rxn is set. More...
 
CDPL_CHEM_API std::time_t CDPL::Chem::getTimestamp (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::TIMESTAMP property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setTimestamp (Reaction &rxn, std::time_t time)
 Sets the value of the Chem::ReactionProperty::TIMESTAMP property of the reaction rxn to time. More...
 
CDPL_CHEM_API void CDPL::Chem::clearTimestamp (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::TIMESTAMP property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasTimestamp (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::TIMESTAMP property of the reaction rxn is set. More...
 
CDPL_CHEM_API const std::string & CDPL::Chem::getComment (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::COMMENT property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setComment (Reaction &rxn, const std::string &comment)
 Sets the value of the Chem::ReactionProperty::COMMENT property of the reaction rxn to comment. More...
 
CDPL_CHEM_API void CDPL::Chem::clearComment (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::COMMENT property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasComment (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::COMMENT property of the reaction rxn is set. More...
 
CDPL_CHEM_API const MatchExpression< Reaction >::SharedPointer & CDPL::Chem::getMatchExpression (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MATCH_EXPRESSION property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMatchExpression (Reaction &rxn, const MatchExpression< Reaction >::SharedPointer &expr)
 Sets the value of the Chem::ReactionProperty::MATCH_EXPRESSION property of the reaction rxn to expr. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMatchExpression (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MATCH_EXPRESSION property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMatchExpression (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MATCH_EXPRESSION property of the reaction rxn is set. More...
 
CDPL_CHEM_API MatchExpression< Reaction >::SharedPointer CDPL::Chem::generateMatchExpression (const Reaction &rxn)
 Builds a reaction-level match expression from the match constraints currently attached to the reaction rxn. More...
 
CDPL_CHEM_API MatchExpression< Reaction >::SharedPointer CDPL::Chem::generateMatchExpression (Reaction &rxn, bool overwrite)
 Builds and (optionally) stores the reaction-level match expression of the reaction rxn. More...
 
CDPL_CHEM_API const MatchConstraintList::SharedPointer & CDPL::Chem::getMatchConstraints (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MATCH_CONSTRAINTS property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMatchConstraints (Reaction &rxn, const MatchConstraintList::SharedPointer &constr)
 Sets the value of the Chem::ReactionProperty::MATCH_CONSTRAINTS property of the reaction rxn to constr. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMatchConstraints (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MATCH_CONSTRAINTS property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMatchConstraints (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MATCH_CONSTRAINTS property of the reaction rxn is set. More...
 
CDPL_CHEM_API const FragmentList::SharedPointer & CDPL::Chem::getComponentGroups (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::COMPONENT_GROUPS property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setComponentGroups (Reaction &rxn, const FragmentList::SharedPointer &comp_groups)
 Sets the value of the Chem::ReactionProperty::COMPONENT_GROUPS property of the reaction rxn to comp_groups. More...
 
CDPL_CHEM_API void CDPL::Chem::clearComponentGroups (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::COMPONENT_GROUPS property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasComponentGroups (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::COMPONENT_GROUPS property of the reaction rxn is set. More...
 
CDPL_CHEM_API FragmentList::SharedPointer CDPL::Chem::perceiveComponentGroups (const Reaction &rxn)
 Perceives the component groups of the reaction rxn. More...
 
CDPL_CHEM_API FragmentList::SharedPointer CDPL::Chem::perceiveComponentGroups (Reaction &rxn, bool overwrite)
 Perceives and (optionally) stores the component groups of the reaction rxn. More...
 
CDPL_CHEM_API const AtomMapping::SharedPointer & CDPL::Chem::getAtomMapping (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::ATOM_MAPPING property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setAtomMapping (Reaction &rxn, const AtomMapping::SharedPointer &mapping)
 Sets the value of the Chem::ReactionProperty::ATOM_MAPPING property of the reaction rxn to mapping. More...
 
CDPL_CHEM_API void CDPL::Chem::clearAtomMapping (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::ATOM_MAPPING property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasAtomMapping (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::ATOM_MAPPING property of the reaction rxn is set. More...
 
CDPL_CHEM_API AtomMapping::SharedPointer CDPL::Chem::perceiveAtomMapping (const Reaction &rxn)
 Derives the reactant-to-product atom mapping from the atom mapping IDs of the reaction rxn. More...
 
CDPL_CHEM_API AtomMapping::SharedPointer CDPL::Chem::perceiveAtomMapping (Reaction &rxn, bool overwrite)
 Derives and (optionally) stores the reactant-to-product atom mapping of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::generateSMILES (const Reaction &rxn, 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 reaction SMILES string for the reaction rxn. More...
 
CDPL_CHEM_API std::uint64_t CDPL::Chem::calcHashCode (const Reaction &rxn, unsigned int role_mask=ReactionRole::ALL, unsigned int atom_flags=AtomPropertyFlag::DEFAULT, unsigned int bond_flags=BondPropertyFlag::DEFAULT, bool ord_h_deplete=true)
 Computes a 64-bit hash code for the reaction rxn taking into account the specified reaction roles and atom/bond properties. More...
 
CDPL_CHEM_API const std::string & CDPL::Chem::getMDLUserInitials (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MDL_USER_INITIALS property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMDLUserInitials (Reaction &rxn, const std::string &initials)
 Sets the value of the Chem::ReactionProperty::MDL_USER_INITIALS property of the reaction rxn to initials. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMDLUserInitials (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MDL_USER_INITIALS property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMDLUserInitials (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MDL_USER_INITIALS property of the reaction rxn is set. More...
 
CDPL_CHEM_API const std::string & CDPL::Chem::getMDLProgramName (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MDL_PROGRAM_NAME property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMDLProgramName (Reaction &rxn, const std::string &name)
 Sets the value of the Chem::ReactionProperty::MDL_PROGRAM_NAME property of the reaction rxn to name. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMDLProgramName (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MDL_PROGRAM_NAME property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMDLProgramName (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MDL_PROGRAM_NAME property of the reaction rxn is set. More...
 
CDPL_CHEM_API std::size_t CDPL::Chem::getMDLRegistryNumber (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MDL_REGISTRY_NUMBER property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMDLRegistryNumber (Reaction &rxn, std::size_t reg_no)
 Sets the value of the Chem::ReactionProperty::MDL_REGISTRY_NUMBER property of the reaction rxn to reg_no. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMDLRegistryNumber (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MDL_REGISTRY_NUMBER property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMDLRegistryNumber (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MDL_REGISTRY_NUMBER property of the reaction rxn is set. More...
 
CDPL_CHEM_API const StringDataBlock::SharedPointer & CDPL::Chem::getReactionData (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::REACTION_DATA property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setReactionData (Reaction &rxn, const StringDataBlock::SharedPointer &data)
 Sets the value of the Chem::ReactionProperty::REACTION_DATA property of the reaction rxn to data. More...
 
CDPL_CHEM_API void CDPL::Chem::clearReactionData (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::REACTION_DATA property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasReactionData (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::REACTION_DATA property of the reaction rxn is set. More...
 
CDPL_CHEM_API const Molecule::SharedPointer & CDPL::Chem::getMDLMoleculeRecord (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MDL_MOLECULE_RECORD property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMDLMoleculeRecord (Reaction &rxn, const Molecule::SharedPointer &mol_rec)
 Sets the value of the Chem::ReactionProperty::MDL_MOLECULE_RECORD property of the reaction rxn to mol_rec. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMDLMoleculeRecord (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MDL_MOLECULE_RECORD property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMDLMoleculeRecord (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MDL_MOLECULE_RECORD property of the reaction rxn is set. More...
 
CDPL_CHEM_API const std::string & CDPL::Chem::getMDLInternalRegistryNumber (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMDLInternalRegistryNumber (Reaction &rxn, const std::string &reg_no)
 Sets the value of the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property of the reaction rxn to reg_no. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMDLInternalRegistryNumber (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMDLInternalRegistryNumber (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MDL_INTERNAL_REGISTRY_NUMBER property of the reaction rxn is set. More...
 
CDPL_CHEM_API const std::string & CDPL::Chem::getMDLExternalRegistryNumber (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMDLExternalRegistryNumber (Reaction &rxn, const std::string &reg_no)
 Sets the value of the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property of the reaction rxn to reg_no. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMDLExternalRegistryNumber (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMDLExternalRegistryNumber (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MDL_EXTERNAL_REGISTRY_NUMBER property of the reaction rxn is set. More...
 
CDPL_CHEM_API unsigned int CDPL::Chem::getMDLRXNFileVersion (const Reaction &rxn)
 Returns the value of the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setMDLRXNFileVersion (Reaction &rxn, unsigned int version)
 Sets the value of the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property of the reaction rxn to version. More...
 
CDPL_CHEM_API void CDPL::Chem::clearMDLRXNFileVersion (Reaction &rxn)
 Clears the value of the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property of the reaction rxn. More...
 
CDPL_CHEM_API bool CDPL::Chem::hasMDLRXNFileVersion (const Reaction &rxn)
 Tells whether the Chem::ReactionProperty::MDL_RXN_FILE_VERSION property of the reaction rxn is set. More...
 
CDPL_CHEM_API std::size_t CDPL::Chem::getMaxComponentGroupID (const Reaction &rxn)
 Returns the largest component group ID found for any of the atoms of the components of the reaction rxn. More...
 
CDPL_CHEM_API std::size_t CDPL::Chem::getMaxAtomMappingID (const Reaction &rxn)
 Returns the largest atom mapping ID found for any of the atoms of the components of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setAtomMatchConstraints (Reaction &rxn, const MatchConstraintList::SharedPointer &constr, bool overwrite)
 Sets the atom-level match constraint list constr on every atom of every component of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setBondMatchConstraints (Reaction &rxn, const MatchConstraintList::SharedPointer &constr, bool overwrite)
 Sets the bond-level match constraint list constr on every bond of every component of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::setComponentMatchConstraints (Reaction &rxn, const MatchConstraintList::SharedPointer &constr, bool overwrite)
 Sets the molecular graph-level match constraint list constr on every component of the reaction rxn. More...
 
CDPL_CHEM_API void CDPL::Chem::generateMatchExpressions (Reaction &rxn, bool overwrite)
 Generates and stores match expressions for the atoms, bonds, components, and the reaction rxn itself. More...
 
CDPL_CHEM_API void CDPL::Chem::initSubstructureSearchQuery (Reaction &rxn, bool overwrite)
 Prepares the reaction rxn for use as a reaction substructure search query. More...
 
CDPL_CHEM_API void CDPL::Chem::initSubstructureSearchTarget (Reaction &rxn, bool overwrite)
 Prepares the reaction rxn for use as a reaction substructure search target. More...
 
CDPL_CHEM_API void CDPL::Chem::calcBasicProperties (Reaction &rxn, bool overwrite)
 Computes basic atom/bond/molecular graph properties (aromaticity, ring info, etc.) for every component of the reaction rxn. More...
 

Detailed Description

Declaration of functions that operate on Chem::Reaction instances.