 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
17 #ifndef __RD_RWMOL_H__
18 #define __RD_RWMOL_H__
45 RWMol(
const ROMol &other,
bool quickCopy =
false,
int confId = -1)
46 :
ROMol(other, quickCopy, confId) {
47 d_partialBonds.
clear();
66 unsigned int addAtom(
bool updateLabel =
true);
80 bool takeOwnership =
false) {
81 return ROMol::addAtom(atom, updateLabel, takeOwnership);
96 bool preserveProps =
false);
123 unsigned int addBond(
unsigned int beginAtomIdx,
unsigned int endAtomIdx,
139 return ROMol::addBond(bond, takeOwnership);
182 void removeBond(
unsigned int beginAtomIdx,
unsigned int endAtomIdx);
203 return ROMol::setStereoGroups(std::move(stereo_groups));
215 std::vector<Bond *> d_partialBonds;
RWMol(const RWMol &other)
void removeAtom(Atom *atom)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Defines the primary molecule class ROMol as well as associated typedefs.
void setActiveAtom(Atom *atom)
sets our activeAtom
class for representing a bond
RWMol is a molecule class that is intended to be edited.
Bond * createPartialBond(unsigned int beginAtomIdx, Bond::BondType order=Bond::UNSPECIFIED)
starts a Bond and sets its beginAtomIdx
void insertMol(const ROMol &other)
insert the atoms and bonds from other into this molecule
boost::shared_ptr< RWMol > RWMOL_SPTR
unsigned int addAtom(bool updateLabel=true)
adds an empty Atom to our collection
The class for representing atoms.
unsigned int finishPartialBond(unsigned int endAtomIdx, int bondBookmark, Bond::BondType order=Bond::UNSPECIFIED)
finishes a partially constructed bond
unsigned int addBond(Atom *beginAtom, Atom *endAtom, Bond::BondType order=Bond::UNSPECIFIED)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setActiveAtom(unsigned int idx)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void replaceBond(unsigned int idx, Bond *bond, bool preserveProps=false)
replaces a particular Bond
#define RDKIT_GRAPHMOL_EXPORT
void removeBond(unsigned int beginAtomIdx, unsigned int endAtomIdx)
removes a bond from the molecule
unsigned int addBond(unsigned int beginAtomIdx, unsigned int endAtomIdx, Bond::BondType order=Bond::UNSPECIFIED)
adds a Bond between the indicated Atoms
Atom * getLastAtom()
returns a pointer to the highest-numbered Atom
unsigned int addAtom(Atom *atom, bool updateLabel=true, bool takeOwnership=false)
adds an Atom to our collection
Atom * getActiveAtom()
returns a pointer to the "active" Atom
std::vector< RWMOL_SPTR > RWMOL_SPTR_VECT
void removeAtom(unsigned int idx)
removes an Atom from the molecule
void setStereoGroups(std::vector< StereoGroup > &&stereo_groups)
Sets groups of atoms with relative stereochemistry.
void replaceAtom(unsigned int idx, Atom *atom, bool updateLabel=false, bool preserveProps=false)
adds an Atom to our collection
RWMol & operator=(const RWMol &)
unsigned int addBond(Bond *bond, bool takeOwnership=false)
adds a Bond to our collection
RWMol(const ROMol &other, bool quickCopy=false, int confId=-1)
copy constructor with a twist
void clear()
removes all atoms, bonds, properties, bookmarks, etc.