Chemical Data Processing Library C++ API - Version 1.2.0
|
#include <CanonicalFragment.hpp>
Public Types | |
typedef std::shared_ptr< CanonicalFragment > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated CanonicalFragment instances. More... | |
typedef Chem::BasicMolecule::AtomIterator | AtomIterator |
typedef Chem::BasicMolecule::ConstAtomIterator | ConstAtomIterator |
typedef Chem::BasicMolecule::BondIterator | BondIterator |
typedef Chem::BasicMolecule::ConstBondIterator | ConstBondIterator |
typedef std::vector< const Chem::Atom * > | AtomMapping |
Public Types inherited from CDPL::Chem::MolecularGraph | |
typedef std::shared_ptr< MolecularGraph > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated MolecularGraph instances. More... | |
Public Types inherited from CDPL::Chem::AtomContainer | |
typedef Util::IndexedElementIterator< const Atom, ConstAtomAccessor > | ConstAtomIterator |
A constant random access iterator used to iterate over the stored const Chem::Atom objects. More... | |
typedef Util::IndexedElementIterator< Atom, AtomAccessor > | AtomIterator |
A mutable random access iterator used to iterate over the stored Chem::Atom objects. More... | |
Public Types inherited from CDPL::Chem::Entity3DContainer | |
typedef Util::IndexedElementIterator< const Entity3D, ConstEntityAccessor > | ConstEntityIterator |
A constant random access iterator used to iterate over the stored const Chem::Entity3D objects. More... | |
typedef Util::IndexedElementIterator< Entity3D, EntityAccessor > | EntityIterator |
A mutable random access iterator used to iterate over the stored Chem::Entity3D objects. More... | |
Public Types inherited from CDPL::Chem::BondContainer | |
typedef Util::IndexedElementIterator< const Bond, ConstBondAccessor > | ConstBondIterator |
A constant random access iterator used to iterate over the stored const Chem::Bond objects. More... | |
typedef Util::IndexedElementIterator< Bond, BondAccessor > | BondIterator |
A mutable random access iterator used to iterate over the stored Chem::Bond objects. More... | |
Public Types inherited from CDPL::Base::PropertyContainer | |
typedef PropertyMap::value_type | PropertyEntry |
A Base::LookupKey / Base::Any pair that stores the property value for a given property key. More... | |
typedef PropertyMap::const_iterator | ConstPropertyIterator |
A constant iterator used to iterate over the property entries. More... | |
Public Member Functions | |
CanonicalFragment () | |
Constructs an empty CanonicalFragment instance. More... | |
CanonicalFragment (const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &parent) | |
Constructs a CanonicalFragment instance that contains the relevant atoms and bonds of the molecular graph molgraph. More... | |
CanonicalFragment (const CanonicalFragment &frag) | |
void | clear () |
std::size_t | getNumAtoms () const |
Returns the number of stored Chem::Atom objects. More... | |
const Chem::Atom & | getAtom (std::size_t idx) const |
Returns a const reference to the Chem::Atom instance at index idx. More... | |
Chem::Atom & | getAtom (std::size_t idx) |
Returns a non-const reference to the atom at index idx. More... | |
ConstAtomIterator | getAtomsBegin () const |
ConstAtomIterator | getAtomsEnd () const |
AtomIterator | getAtomsBegin () |
AtomIterator | getAtomsEnd () |
bool | containsAtom (const Chem::Atom &atom) const |
Tells whether the specified Chem::Atom instance is stored in this container. More... | |
std::size_t | getAtomIndex (const Chem::Atom &atom) const |
Returns the index of the specified Chem::Atom instance in this container. More... | |
std::size_t | getNumEntities () const |
Returns the number of stored Chem::Entity3D objects. More... | |
const Chem::Entity3D & | getEntity (std::size_t idx) const |
Returns a const reference to the Chem::Entity3D instance at index idx. More... | |
Chem::Entity3D & | getEntity (std::size_t idx) |
Returns a non-const reference to the entity at index idx. More... | |
std::size_t | getNumBonds () const |
Returns the number of stored Chem::Bond objects. More... | |
const Chem::Bond & | getBond (std::size_t idx) const |
Returns a const reference to the Chem::Bond instance at index idx. More... | |
Chem::Bond & | getBond (std::size_t idx) |
Returns a non-const reference to the bond at index idx. More... | |
ConstBondIterator | getBondsBegin () const |
ConstBondIterator | getBondsEnd () const |
BondIterator | getBondsBegin () |
BondIterator | getBondsEnd () |
bool | containsBond (const Chem::Bond &bond) const |
Tells whether the specified Chem::Bond instance is stored in this container. More... | |
std::size_t | getBondIndex (const Chem::Bond &bond) const |
Returns the index of the specified Chem::Bond instance in this container. More... | |
void | orderAtoms (const Chem::AtomCompareFunction &func) |
Orders the stored atoms according to criteria implemented by the provided atom comparison function. More... | |
void | orderBonds (const Chem::BondCompareFunction &func) |
Orders the stored bonds according to criteria implemented by the provided bond comparison function. More... | |
std::uint64_t | getHashCode () const |
Chem::MolecularGraph::SharedPointer | clone () const |
Creates a copy of the molecular graph. More... | |
CanonicalFragment & | operator= (const CanonicalFragment &frag) |
void | create (const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &parent, bool modify=true, bool strip_aro_subst=true) |
const AtomMapping & | getAtomMapping () const |
void | perceiveSSSR () |
Public Member Functions inherited from CDPL::Chem::MolecularGraph | |
virtual | ~MolecularGraph () |
Virtual destructor. More... | |
Public Member Functions inherited from CDPL::Chem::AtomContainer | |
ConstAtomIterator | getAtomsBegin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Atom objects. More... | |
ConstAtomIterator | getAtomsEnd () const |
Returns a constant iterator pointing to the end of the stored const Chem::Atom objects. More... | |
AtomIterator | getAtomsBegin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Atom objects. More... | |
AtomIterator | getAtomsEnd () |
Returns a mutable iterator pointing to the end of the stored Chem::Atom objects. More... | |
ConstAtomIterator | begin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Atom objects. More... | |
ConstAtomIterator | end () const |
Returns a constant iterator pointing to the end of the stored const Chem::Atom objects. More... | |
AtomIterator | begin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Atom objects. More... | |
AtomIterator | end () |
Returns a mutable iterator pointing to the end of the stored Chem::Atom objects. More... | |
const AtomContainer & | getAtoms () const |
Returns a const reference to itself. More... | |
AtomContainer & | getAtoms () |
Returns a reference to itself. More... | |
Public Member Functions inherited from CDPL::Chem::Entity3DContainer | |
ConstEntityIterator | getEntitiesBegin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Entity3D objects. More... | |
ConstEntityIterator | getEntitiesEnd () const |
Returns a constant iterator pointing to the end of the stored const Chem::Entity3D objects. More... | |
EntityIterator | getEntitiesBegin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D objects. More... | |
EntityIterator | getEntitiesEnd () |
Returns a mutable iterator pointing to the end of the stored Chem::Entity3D objects. More... | |
ConstEntityIterator | begin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Entity3D objects. More... | |
ConstEntityIterator | end () const |
Returns a constant iterator pointing to the end of the stored const Chem::Entity3D objects. More... | |
EntityIterator | begin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D objects. More... | |
EntityIterator | end () |
Returns a mutable iterator pointing to the end of the stored Chem::Entity3D objects. More... | |
const Entity3DContainer & | getEntities () const |
Returns a const reference to itself. More... | |
Entity3DContainer & | getEntities () |
Returns a reference to itself. More... | |
Public Member Functions inherited from CDPL::Chem::BondContainer | |
ConstBondIterator | getBondsBegin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Bond objects. More... | |
ConstBondIterator | getBondsEnd () const |
Returns a constant iterator pointing to the end of the stored const Chem::Bond objects. More... | |
BondIterator | getBondsBegin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Bond objects. More... | |
BondIterator | getBondsEnd () |
Returns a mutable iterator pointing to the end of the stored Chem::Bond objects. More... | |
ConstBondIterator | begin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Bond objects. More... | |
ConstBondIterator | end () const |
Returns a constant iterator pointing to the end of the stored const Chem::Bond objects. More... | |
BondIterator | begin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Bond objects. More... | |
BondIterator | end () |
Returns a mutable iterator pointing to the end of the stored Chem::Bond objects. More... | |
const BondContainer & | getBonds () const |
Returns a const reference to itself. More... | |
BondContainer & | getBonds () |
Returns a reference to itself. More... | |
Public Member Functions inherited from CDPL::Base::PropertyContainer | |
std::size_t | getNumProperties () const |
Returns the number of property entries. More... | |
template<typename T > | |
void | setProperty (const LookupKey &key, T &&val) |
Sets the value of the property specified by key to val. More... | |
template<typename T > | |
const T & | getProperty (const LookupKey &key) const |
Returns the value of the property specified by key as a const reference to an object of type T. More... | |
template<typename T > | |
const T & | getPropertyOrDefault (const LookupKey &key, const T &def_val) const |
Returns the value of the property specified by key as a const reference to an object of type T, or the default value def_val if a stored value does not exist. More... | |
const Any & | getProperty (const LookupKey &key, bool throw_=false) const |
Returns the value of the property specified by key. More... | |
bool | isPropertySet (const LookupKey &key) const |
Tells whether or not a value has been assigned to the property specified by key. More... | |
ConstPropertyIterator | getPropertiesBegin () const |
Returns a constant iterator pointing to the beginning of the property entries. More... | |
ConstPropertyIterator | getPropertiesEnd () const |
Returns a constant iterator pointing to the end of the property entries. More... | |
ConstPropertyIterator | begin () const |
Returns a constant iterator pointing to the beginning of the property entries. More... | |
ConstPropertyIterator | end () const |
Returns a constant iterator pointing to the end of the property entries. More... | |
bool | removeProperty (const LookupKey &key) |
Clears the value of the property specified by key. More... | |
void | clearProperties () |
Clears all property values. More... | |
void | addProperties (const PropertyContainer &cntnr) |
Adds the property value entries in the PropertyContainer instance cntnr. More... | |
void | copyProperties (const PropertyContainer &cntnr) |
Replaces the current set of properties by a copy of the entries in cntnr. More... | |
void | swap (PropertyContainer &cntnr) |
Exchanges the properties of this container with the properties of the container cntnr. More... | |
const PropertyContainer & | getProperties () const |
Returns a const reference to itself. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Chem::MolecularGraph | |
MolecularGraph & | operator= (const MolecularGraph &molgraph) |
Assignment operator. More... | |
Protected Member Functions inherited from CDPL::Chem::AtomContainer | |
virtual | ~AtomContainer () |
Virtual destructor. More... | |
AtomContainer & | operator= (const AtomContainer &cntnr) |
Assignment operator. More... | |
Protected Member Functions inherited from CDPL::Chem::Entity3DContainer | |
virtual | ~Entity3DContainer () |
Virtual destructor. More... | |
Entity3DContainer & | operator= (const Entity3DContainer &cntnr) |
Assignment operator. More... | |
Protected Member Functions inherited from CDPL::Chem::BondContainer | |
virtual | ~BondContainer () |
Virtual destructor. More... | |
BondContainer & | operator= (const BondContainer &cntnr) |
Assignment operator. More... | |
Protected Member Functions inherited from CDPL::Base::PropertyContainer | |
PropertyContainer () | |
Constructs an empty PropertyContainer instance. More... | |
PropertyContainer (const PropertyContainer &cntnr) | |
Constructs a copy of the PropertyContainer instance cntnr. More... | |
virtual | ~PropertyContainer () |
Virtual destructor. More... | |
PropertyContainer & | operator= (const PropertyContainer &cntnr) |
Assignment operator. More... | |
typedef std::shared_ptr<CanonicalFragment> CDPL::ConfGen::CanonicalFragment::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated CanonicalFragment
instances.
typedef std::vector<const Chem::Atom*> CDPL::ConfGen::CanonicalFragment::AtomMapping |
CDPL::ConfGen::CanonicalFragment::CanonicalFragment | ( | ) |
Constructs an empty CanonicalFragment
instance.
CDPL::ConfGen::CanonicalFragment::CanonicalFragment | ( | const Chem::MolecularGraph & | molgraph, |
const Chem::MolecularGraph & | parent | ||
) |
Constructs a CanonicalFragment
instance that contains the relevant atoms and bonds of the molecular graph molgraph.
molgraph | The molecular graph for which to generate the fragments. |
parent | The parent molecular graph the fragment is coming from. |
CDPL::ConfGen::CanonicalFragment::CanonicalFragment | ( | const CanonicalFragment & | frag | ) |
void CDPL::ConfGen::CanonicalFragment::clear | ( | ) |
|
virtual |
Returns the number of stored Chem::Atom objects.
Implements CDPL::Chem::AtomContainer.
|
virtual |
Returns a const
reference to the Chem::Atom instance at index idx.
idx | The zero-based index of the Chem::Atom instance to return. |
const
reference to the Chem::Atom instance at the specified index. Base::IndexError | if the container is empty or idx is not in the range [0, getNumAtoms() - 1]. |
Implements CDPL::Chem::AtomContainer.
|
virtual |
Returns a non-const
reference to the atom at index idx.
idx | The zero-based index of the Chem::Atom instance to return. |
const
reference to the atom at the specified index. Base::IndexError | if the number of atoms is zero or idx is not in the range [0, getNumAtoms() - 1]. |
Implements CDPL::Chem::AtomContainer.
ConstAtomIterator CDPL::ConfGen::CanonicalFragment::getAtomsBegin | ( | ) | const |
ConstAtomIterator CDPL::ConfGen::CanonicalFragment::getAtomsEnd | ( | ) | const |
AtomIterator CDPL::ConfGen::CanonicalFragment::getAtomsBegin | ( | ) |
AtomIterator CDPL::ConfGen::CanonicalFragment::getAtomsEnd | ( | ) |
|
virtual |
Tells whether the specified Chem::Atom instance is stored in this container.
atom | The Chem::Atom instance to look for. |
true
if atom is stored in the container, and false
otherwise. Implements CDPL::Chem::AtomContainer.
|
virtual |
Returns the index of the specified Chem::Atom instance in this container.
atom | The Chem::Atom instance for which to return the index. |
Base::ItemNotFound | if the specified Chem::Atom instance could not be found. |
Implements CDPL::Chem::AtomContainer.
|
virtual |
Returns the number of stored Chem::Entity3D objects.
Reimplemented from CDPL::Chem::AtomContainer.
|
virtual |
Returns a const
reference to the Chem::Entity3D instance at index idx.
idx | The zero-based index of the Chem::Entity3D instance to return. |
const
reference to the Chem::Entity3D instance at the specified index. Base::IndexError | if the container is empty or idx is not in the range [0, getNumEntities() - 1]. |
Reimplemented from CDPL::Chem::AtomContainer.
|
virtual |
Returns a non-const
reference to the entity at index idx.
idx | The zero-based index of the Chem::Entity3D instance to return. |
const
reference to the entity at the specified index. Base::IndexError | if the number of entities is zero or idx is not in the range [0, getNumEntities() - 1]. |
Reimplemented from CDPL::Chem::AtomContainer.
|
virtual |
Returns the number of stored Chem::Bond objects.
Implements CDPL::Chem::BondContainer.
|
virtual |
Returns a const
reference to the Chem::Bond instance at index idx.
idx | The zero-based index of the Chem::Bond instance to return. |
const
reference to the Chem::Bond instance at the specified index. Base::IndexError | if the container is empty or idx is not in the range [0, getNumBonds() - 1]. |
Implements CDPL::Chem::BondContainer.
|
virtual |
Returns a non-const
reference to the bond at index idx.
idx | The zero-based index of the Chem::Bond instance to return. |
const
reference to the bond at the specified index. Base::IndexError | if the number of bonds is zero or idx is not in the range [0, getNumBonds() - 1]. |
Implements CDPL::Chem::BondContainer.
ConstBondIterator CDPL::ConfGen::CanonicalFragment::getBondsBegin | ( | ) | const |
ConstBondIterator CDPL::ConfGen::CanonicalFragment::getBondsEnd | ( | ) | const |
BondIterator CDPL::ConfGen::CanonicalFragment::getBondsBegin | ( | ) |
BondIterator CDPL::ConfGen::CanonicalFragment::getBondsEnd | ( | ) |
|
virtual |
Tells whether the specified Chem::Bond instance is stored in this container.
bond | The Chem::Bond instance to look for. |
true
if bond is stored in the container, and false
otherwise. Implements CDPL::Chem::BondContainer.
|
virtual |
Returns the index of the specified Chem::Bond instance in this container.
bond | The Chem::Bond instance for which to return the index. |
Base::ItemNotFound | if the specified Chem::Bond instance could not be found. |
Implements CDPL::Chem::BondContainer.
|
virtual |
Orders the stored atoms according to criteria implemented by the provided atom comparison function.
func | The atom comparison function implementing the applied ordering criteria. |
Implements CDPL::Chem::AtomContainer.
|
virtual |
Orders the stored bonds according to criteria implemented by the provided bond comparison function.
func | The bond comparison function implementing the applied ordering criteria. |
Implements CDPL::Chem::BondContainer.
std::uint64_t CDPL::ConfGen::CanonicalFragment::getHashCode | ( | ) | const |
|
virtual |
Creates a copy of the molecular graph.
Implements CDPL::Chem::MolecularGraph.
CanonicalFragment& CDPL::ConfGen::CanonicalFragment::operator= | ( | const CanonicalFragment & | frag | ) |
void CDPL::ConfGen::CanonicalFragment::create | ( | const Chem::MolecularGraph & | molgraph, |
const Chem::MolecularGraph & | parent, | ||
bool | modify = true , |
||
bool | strip_aro_subst = true |
||
) |
const AtomMapping& CDPL::ConfGen::CanonicalFragment::getAtomMapping | ( | ) | const |
void CDPL::ConfGen::CanonicalFragment::perceiveSSSR | ( | ) |