29 #ifndef CDPL_CONFGEN_CANONICALFRAGMENT_HPP
30 #define CDPL_CONFGEN_CANONICALFRAGMENT_HPP
292 bool modify =
true,
bool strip_aro_subst =
true);
307 bool modify,
bool strip_aro_subst);
317 typedef std::vector<std::uint32_t> HashInputData;
321 std::uint64_t hashCode;
323 SmallestSetOfSmallestRingsPtr sssr;
325 HashInputData hashInputData;
Definition of class CDPL::Util::Array.
Definition of class CDPL::Chem::BasicMolecule.
Definition of class CDPL::Chem::CanonicalNumberingCalculator.
Definition of the preprocessor macro CDPL_CONFGEN_API.
#define CDPL_CONFGEN_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of class CDPL::Chem::SmallestSetOfSmallestRings.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Concrete Chem::Molecule implementation that owns Chem::BasicAtom and Chem::BasicBond instances.
Definition: BasicMolecule.hpp:60
boost::indirect_iterator< AtomList::const_iterator, const BasicAtom > ConstAtomIterator
Constant random-access iterator over the atoms of the molecule.
Definition: BasicMolecule.hpp:78
boost::indirect_iterator< BondList::iterator, BasicBond > BondIterator
Mutable random-access iterator over the bonds of the molecule.
Definition: BasicMolecule.hpp:80
boost::indirect_iterator< BondList::const_iterator, const BasicBond > ConstBondIterator
Constant random-access iterator over the bonds of the molecule.
Definition: BasicMolecule.hpp:82
boost::indirect_iterator< AtomList::iterator, BasicAtom > AtomIterator
Mutable random-access iterator over the atoms of the molecule.
Definition: BasicMolecule.hpp:76
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Calculation of canonical atom numberings for molecular graphs using McKay's algorithm.
Definition: CanonicalNumberingCalculator.hpp:72
Base class for objects that have a position in 3D space (e.g. Chem::Atom and Chem::Feature).
Definition: Entity3D.hpp:46
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
std::shared_ptr< MolecularGraph > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MolecularGraph instances.
Definition: MolecularGraph.hpp:63
std::shared_ptr< SmallestSetOfSmallestRings > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated SmallestSetOfSmallestRings instan...
Definition: SmallestSetOfSmallestRings.hpp:64
Data structure representing a canonicalized molecular fragment.
Definition: CanonicalFragment.hpp:61
Chem::BasicMolecule::BondIterator BondIterator
A mutable iterator over the contained bonds.
Definition: CanonicalFragment.hpp:82
void orderBonds(const Chem::BondCompareFunction &func)
Reorders the bonds of the fragment according to func.
AtomIterator getAtomsBegin()
Returns a mutable iterator pointing to the first atom.
ConstAtomIterator getAtomsBegin() const
Returns a constant iterator pointing to the first atom.
const AtomMapping & getAtomMapping() const
Returns the atom mapping from this fragment to the parent molecular graph.
BondIterator getBondsEnd()
Returns a mutable iterator pointing one past the last bond.
void perceiveSSSR()
Perceives the smallest set of smallest rings of the fragment.
std::shared_ptr< CanonicalFragment > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated CanonicalFragment instances.
Definition: CanonicalFragment.hpp:67
ConstBondIterator getBondsBegin() const
Returns a constant iterator pointing to the first bond.
std::size_t getNumEntities() const
Returns the number of 3D entities in the fragment.
void create(const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &parent, bool modify=true, bool strip_aro_subst=true)
Builds the canonical fragment from the fragment molgraph of the parent molecular graph parent.
bool containsAtom(const Chem::Atom &atom) const
Tells whether the fragment contains atom.
Chem::BasicMolecule::ConstAtomIterator ConstAtomIterator
A constant iterator over the contained atoms.
Definition: CanonicalFragment.hpp:77
CanonicalFragment(const CanonicalFragment &frag)
Constructs a copy of the CanonicalFragment instance frag.
std::size_t getAtomIndex(const Chem::Atom &atom) const
Returns the index of atom in the fragment.
CanonicalFragment & operator=(const CanonicalFragment &frag)
Replaces the contents of this fragment with a copy of frag.
Chem::Bond & getBond(std::size_t idx)
Returns a reference to the bond at index idx.
ConstAtomIterator getAtomsEnd() const
Returns a constant iterator pointing one past the last atom.
std::uint64_t getHashCode() const
Returns the hash code of the fragment.
const Chem::Atom & getAtom(std::size_t idx) const
Returns a const reference to the atom at index idx.
CanonicalFragment(const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &parent)
Constructs a CanonicalFragment instance from the fragment molgraph of the parent molecular graph pare...
const Chem::Bond & getBond(std::size_t idx) const
Returns a const reference to the bond at index idx.
const Chem::Entity3D & getEntity(std::size_t idx) const
Returns a const reference to the 3D entity at index idx.
Chem::MolecularGraph::SharedPointer clone() const
Creates and returns a deep copy of the fragment.
void clear()
Removes all atoms and bonds and resets the hash code.
bool containsBond(const Chem::Bond &bond) const
Tells whether the fragment contains bond.
std::vector< const Chem::Atom * > AtomMapping
Maps each atom of the fragment (in canonical order) to the corresponding atom of the parent molecular...
Definition: CanonicalFragment.hpp:92
Chem::Atom & getAtom(std::size_t idx)
Returns a reference to the atom at index idx.
CanonicalFragment()
Constructs an empty CanonicalFragment instance.
std::size_t getNumAtoms() const
Returns the number of atoms in the fragment.
Chem::Entity3D & getEntity(std::size_t idx)
Returns a reference to the 3D entity at index idx.
ConstBondIterator getBondsEnd() const
Returns a constant iterator pointing one past the last bond.
BondIterator getBondsBegin()
Returns a mutable iterator pointing to the first bond.
AtomIterator getAtomsEnd()
Returns a mutable iterator pointing one past the last atom.
std::size_t getNumBonds() const
Returns the number of bonds in the fragment.
Chem::BasicMolecule::ConstBondIterator ConstBondIterator
A constant iterator over the contained bonds.
Definition: CanonicalFragment.hpp:87
std::size_t getBondIndex(const Chem::Bond &bond) const
Returns the index of bond in the fragment.
Chem::BasicMolecule::AtomIterator AtomIterator
A mutable iterator over the contained atoms.
Definition: CanonicalFragment.hpp:72
void orderAtoms(const Chem::AtomCompareFunction &func)
Reorders the atoms of the fragment according to func.
STL compatible random access iterator for container elements accessible by index.
Definition: IndexedElementIterator.hpp:125
std::function< bool(const Atom &, const Atom &)> AtomCompareFunction
Generic wrapper class used to store a user-defined atom compare function.
Definition: AtomCompareFunction.hpp:41
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 void canonicalize(MolecularGraph &molgraph, const AtomCompareFunction &func, bool atoms=true, bool atom_nbrs=true, bool bonds=true, bool bond_atoms=false)
Reorders the atoms (and optionally their neighbors and bonds) of molgraph according to a user-supplie...
std::function< bool(const Chem::Bond &, const Chem::Bond &)> BondCompareFunction
Generic wrapper class used to store a user-defined bond compare function.
Definition: BondCompareFunction.hpp:41
Array< std::size_t > STArray
Array storing unsigned integers of type std::size_t.
Definition: Array.hpp:575
The namespace of the Chemical Data Processing Library.