|
Chemical Data Processing Library C++ API - Version 1.1.1
|
Go to the documentation of this file.
29 #ifndef CDPL_CHEM_MOLECULE_HPP
30 #define CDPL_CHEM_MOLECULE_HPP
188 virtual Bond&
addBond(std::size_t atom1_idx, std::size_t atom2_idx) = 0;
353 #endif // CDPL_CHEM_MOLECULE_HPP
virtual void clear()=0
Removes all atoms and bonds and clears all properties of the molecule.
virtual Atom & getAtom(std::size_t idx)=0
Returns a non-const reference to the atom at index idx.
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.
Bond.
Definition: Bond.hpp:50
virtual std::size_t getBondIndex(const Bond &bond) const =0
Returns the index of the specified bond.
virtual const Bond & getBond(std::size_t idx) const =0
Returns a const reference to the bond at index idx.
ConstBondIterator getBondsBegin() const
Returns a constant iterator pointing to the beginning of the stored const Chem::Bond objects.
std::function< void(Molecule &, const MolecularGraph &)> CopyPostprocessingFunction
Definition: Molecule.hpp:77
virtual ~Molecule()
Virtual destructor.
Definition: Molecule.hpp:84
ConstBondIterator getBondsEnd() const
Returns a constant iterator pointing to the end of the stored const Chem::Bond objects.
A STL compatible random access iterator for container elements accessible by index.
Definition: IndexedElementIterator.hpp:125
Atom.
Definition: Atom.hpp:52
virtual void reserveMemoryForAtoms(std::size_t num_atoms)
Reserves memory for num_atoms atoms.
Definition: Molecule.hpp:280
virtual std::size_t getNumAtoms() const =0
Returns the number of explicit atoms.
std::shared_ptr< Molecule > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Molecule instances.
Definition: Molecule.hpp:55
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 bool containsBond(const Bond &bond) const =0
Tells whether the specified bond is part of this molecule.
virtual bool containsAtom(const Atom &atom) const =0
Tells whether the specified atom is part of this molecule.
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 void append(const Molecule &mol)=0
Extends the current set of atoms and bonds by a copy of the atoms and bonds in the molecule mol.
BondIterator removeBond(const BondIterator &it)
Removes the bond specified by the iterator it.
ConstAtomIterator getAtomsBegin() const
Returns a constant iterator pointing to the beginning of the stored const Chem::Atom objects.
AtomContainer::ConstAtomIterator ConstAtomIterator
A constant random access iterator used to iterate over the atoms of the molecule.
Definition: Molecule.hpp:60
MolecularGraph.
Definition: MolecularGraph.hpp:52
Molecule.
Definition: Molecule.hpp:49
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_...
virtual std::size_t getNumBonds() const =0
Returns the number of explicit bonds.
virtual void removeBond(std::size_t idx)=0
Removes the bond at the specified index.
virtual std::size_t getAtomIndex(const Atom &atom) const =0
Returns the index of the specified atom.
virtual Atom & addAtom()=0
Creates a new atom and adds it to the molecule.
Definition of the class CDPL::Chem::MolecularGraph.
BondContainer::ConstBondIterator ConstBondIterator
A constant random access iterator used to iterate over the bonds of the molecule.
Definition: Molecule.hpp:70
AtomContainer::AtomIterator AtomIterator
A mutable random access iterator used to iterate over the atoms of the molecule.
Definition: Molecule.hpp:65
void invokeCopyPostprocessingFunctions(const MolecularGraph &src_molgraph)
static void registerCopyPostprocessingFunction(const CopyPostprocessingFunction &func)
virtual Bond & getBond(std::size_t idx)=0
Returns a non-const reference to the bond at index idx.
virtual void append(const MolecularGraph &molgraph)=0
Extends the current set of atoms and bonds by a copy of the atoms and bonds in the molecular graph mo...
The namespace of the Chemical Data Processing Library.
virtual void removeAtom(std::size_t idx)=0
Removes the atom at the specified index.
BondContainer::BondIterator BondIterator
A mutable random access iterator used to iterate over the bonds of the molecule.
Definition: Molecule.hpp:75
virtual void remove(const MolecularGraph &molgraph)=0
Removes atoms and bonds referenced by the molecular graph molgraph that are part of this Molecule ins...
Molecule & operator-=(const MolecularGraph &molgraph)
Removes atoms and bonds referenced by the molecular graph molgraph that are part of this Molecule ins...
virtual void reserveMemoryForBonds(std::size_t num_bonds)
Reserves memory for num_bonds bonds.
Definition: Molecule.hpp:289
AtomIterator removeAtom(const AtomIterator &it)
Removes the atom specified by the iterator it.
ConstAtomIterator getAtomsEnd() const
Returns a constant iterator pointing to the end of the stored const Chem::Atom objects.
virtual const Atom & getAtom(std::size_t idx) const =0
Returns a const reference to the atom at index idx.