29 #ifndef CDPL_CHEM_MOLECULE_HPP
30 #define CDPL_CHEM_MOLECULE_HPP
151 virtual Bond&
addBond(std::size_t atom1_idx, std::size_t atom2_idx) = 0;
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 class CDPL::Chem::MolecularGraph.
ConstAtomIterator getAtomsBegin() const
Returns a constant iterator pointing to the beginning of the stored const Chem::Atom objects.
ConstAtomIterator getAtomsEnd() const
Returns a constant iterator pointing to the end of the stored const Chem::Atom objects.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:58
ConstBondIterator getBondsEnd() const
Returns a constant iterator pointing to the end of the stored const Chem::Bond objects.
ConstBondIterator getBondsBegin() const
Returns a constant iterator pointing to the beginning of the stored const Chem::Bond objects.
Abstract base class representing a chemical bond between two atoms (represented by Chem::Atom instanc...
Definition: Bond.hpp:54
Abstract base class for data structures that represent chemical structures as molecular graphs.
Definition: MolecularGraph.hpp:60
Abstract base class representing a mutable molecular graph that owns and manages its atoms and bonds.
Definition: Molecule.hpp:53
AtomContainer::ConstAtomIterator ConstAtomIterator
A constant random access iterator used to iterate over the stored const Chem::Atom objects.
Definition: Molecule.hpp:64
virtual void copy(const MolecularGraph &molgraph)=0
Replaces the current set of atoms, bonds and properties by a copy of the atoms, bonds and properties ...
virtual void reserveMemoryForBonds(std::size_t num_bonds)
Reserves memory for num_bonds bonds.
Definition: Molecule.hpp:221
virtual void remove(const MolecularGraph &molgraph)=0
Removes atoms and bonds referenced by the molecular graph molgraph that are part of this Molecule ins...
virtual void append(const Molecule &mol)=0
Extends the current set of atoms and bonds by a copy of the atoms and bonds of the molecule mol.
Molecule & operator=(const MolecularGraph &molgraph)
Replaces the current set of atoms, bonds and properties by a copy of the atoms, bonds and properties ...
std::shared_ptr< Molecule > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Molecule instances.
Definition: Molecule.hpp:59
BondContainer::ConstBondIterator ConstBondIterator
A constant random access iterator used to iterate over the stored const Chem::Bond objects.
Definition: Molecule.hpp:74
virtual Bond & addBond(std::size_t atom1_idx, std::size_t atom2_idx)=0
Creates a new or returns an already existing bond between the atoms specified by atom1_idx and atom2_...
BondIterator removeBond(const BondIterator &it)
Removes the bond specified by the iterator it.
Molecule & operator-=(const MolecularGraph &molgraph)
Removes atoms and bonds referenced by the molecular graph molgraph that are part of this Molecule ins...
Molecule & operator=(const Molecule &mol)
Replaces the current set of atoms, bonds and properties by a copy of the atoms, bonds and properties ...
AtomContainer::AtomIterator AtomIterator
A mutable random access iterator used to iterate over the stored Chem::Atom objects.
Definition: Molecule.hpp:69
virtual void append(const MolecularGraph &molgraph)=0
Extends the current set of atoms and bonds by a copy of the atoms and bonds of the molecular graph mo...
virtual void reserveMemoryForAtoms(std::size_t num_atoms)
Reserves memory for num_atoms atoms.
Definition: Molecule.hpp:212
virtual ~Molecule()
Virtual destructor.
Definition: Molecule.hpp:93
virtual void clear()=0
Removes all atoms and bonds and clears all properties of the molecule.
Molecule & operator+=(const Molecule &mol)
Extends the current set of atoms and bonds by a copy of the atoms and bonds of the molecule mol.
static void registerCopyPostprocessingFunction(const CopyPostprocessingFunction &func)
Registers a new copy postprocessing function in the global registry.
virtual void removeBond(std::size_t idx)=0
Removes the bond at the specified index.
std::function< void(Molecule &, const MolecularGraph &)> CopyPostprocessingFunction
Type of function invoked after a molecule has been altered due to copying/appending a source molecula...
Definition: Molecule.hpp:86
void invokeCopyPostprocessingFunctions(const MolecularGraph &src_molgraph)
Invokes all registered copy postprocessing functions on this molecule with src_molgraph as the source...
virtual void removeAtom(std::size_t idx)=0
Removes the atom at the specified index.
virtual void copy(const Molecule &mol)=0
Replaces the current set of atoms, bonds and properties by a copy of the atoms, bonds and properties ...
virtual Atom & addAtom()=0
Creates a new atom and adds it to the molecule.
AtomIterator removeAtom(const AtomIterator &it)
Removes the atom specified by the iterator it.
Molecule & operator+=(const MolecularGraph &molgraph)
Extends the current set of atoms and bonds by a copy of the atoms and bonds of the molecular graph mo...
BondContainer::BondIterator BondIterator
A mutable random access iterator used to iterate over the stored Chem::Bond objects.
Definition: Molecule.hpp:79
STL compatible random access iterator for container elements accessible by index.
Definition: IndexedElementIterator.hpp:125
The namespace of the Chemical Data Processing Library.