#include <RWMol.h>

Public Member Functions | |
| RWMol () | |
| RWMol (const ROMol &other, bool quickCopy=false) | |
| copy constructor with a twist | |
| void | insertMol (const ROMol &other) |
insert the atoms and bonds from other into this molecule | |
Atoms | |
| unsigned int | addAtom (bool updateLabel=true) |
| adds an empty Atom to our collection | |
| unsigned int | addAtom (Atom *atom, bool updateLabel=true, bool takeOwnership=false) |
| adds an Atom to our collection | |
| unsigned int | addAtom (ATOM_SPTR atom, bool updateLabel=true) |
| adds an Atom to our collection | |
| void | replaceAtom (unsigned int idx, Atom *atom, bool updateLabel=false) |
| replaces a particular Atom | |
| Atom * | getLastAtom () |
| returns a pointer to the highest-numbered Atom | |
| Atom * | getActiveAtom () |
| returns a pointer to the "active" Atom | |
| void | setActiveAtom (Atom *atom) |
sets our activeAtom | |
| void | setActiveAtom (unsigned int idx) |
| void | removeAtom (unsigned int idx) |
| removes an Atom from the molecule | |
| void | removeAtom (Atom *atom) |
Bonds | |
| unsigned int | addBond (unsigned int beginAtomIdx, unsigned int endAtomIdx, Bond::BondType order=Bond::UNSPECIFIED) |
| adds a Bond between the indicated Atoms | |
| unsigned int | addBond (ATOM_SPTR beginAtom, ATOM_SPTR endAtom, Bond::BondType order=Bond::UNSPECIFIED) |
| unsigned int | addBond (Atom *beginAtom, Atom *endAtom, Bond::BondType order=Bond::UNSPECIFIED) |
| unsigned int | addBond (Bond *bond, bool takeOwnership=false) |
| adds a Bond to our collection | |
| unsigned int | addBond (BOND_SPTR bsp) |
| adds a Bond to our collection | |
| Bond * | createPartialBond (unsigned int beginAtomIdx, Bond::BondType order=Bond::UNSPECIFIED) |
| starts a Bond and sets its beginAtomIdx | |
| unsigned int | finishPartialBond (unsigned int endAtomIdx, int bondBookmark, Bond::BondType order=Bond::UNSPECIFIED) |
| finishes a partially constructed bond | |
| void | removeBond (unsigned int beginAtomIdx, unsigned int endAtomIdx) |
| removes a bond from the molecule | |
See documentation for ROMol for general remarks
Definition at line 25 of file RWMol.h.
| RDKit::RWMol::RWMol | ( | const ROMol & | other, | |
| bool | quickCopy = false | |||
| ) | [inline] |
copy constructor with a twist
| other | the molecule to be copied | |
| quickCopy | (optional) if this is true, the resulting ROMol will not copy any of the properties or bookmarks and conformers from other. This can make the copy substantially faster (thus the name). |
| void RDKit::RWMol::insertMol | ( | const ROMol & | other | ) |
insert the atoms and bonds from other into this molecule
| unsigned int RDKit::RWMol::addAtom | ( | bool | updateLabel = true |
) |
adds an empty Atom to our collection
| updateLabel | (optional) if this is true, the new Atom will be our activeAtom |
Referenced by RDKit::SLNParse::startMol().
| unsigned int RDKit::RWMol::addAtom | ( | Atom * | atom, | |
| bool | updateLabel = true, |
|||
| bool | takeOwnership = false | |||
| ) | [inline] |
adds an Atom to our collection
| atom | pointer to the Atom to add | |
| updateLabel | (optional) if this is true, the new Atom will be our activeAtom | |
| takeOwnership | (optional) if this is true, we take ownership of atom instead of copying it. |
Reimplemented from RDKit::ROMol.
| unsigned int RDKit::RWMol::addAtom | ( | ATOM_SPTR | atom, | |
| bool | updateLabel = true | |||
| ) | [inline] |
adds an Atom to our collection
| atom | pointer to the Atom to add | |
| updateLabel | (optional) if this is true, the new Atom will be our activeAtom |
Reimplemented from RDKit::ROMol.
| void RDKit::RWMol::replaceAtom | ( | unsigned int | idx, | |
| Atom * | atom, | |||
| bool | updateLabel = false | |||
| ) |
| Atom* RDKit::RWMol::getLastAtom | ( | ) | [inline] |
returns a pointer to the highest-numbered Atom
Definition at line 98 of file RWMol.h.
References RDKit::ROMol::getAtomWithIdx(), and RDKit::ROMol::getNumAtoms().
| Atom* RDKit::RWMol::getActiveAtom | ( | ) |
returns a pointer to the "active" Atom
If we have an activeAtom, it will be returned, otherwise the results of getLastAtom() will be returned.
| void RDKit::RWMol::setActiveAtom | ( | Atom * | atom | ) |
sets our activeAtom
| void RDKit::RWMol::setActiveAtom | ( | unsigned int | idx | ) |
| void RDKit::RWMol::removeAtom | ( | unsigned int | idx | ) |
removes an Atom from the molecule
| void RDKit::RWMol::removeAtom | ( | Atom * | atom | ) |
| unsigned int RDKit::RWMol::addBond | ( | unsigned int | beginAtomIdx, | |
| unsigned int | endAtomIdx, | |||
| Bond::BondType | order = Bond::UNSPECIFIED | |||
| ) |
adds a Bond between the indicated Atoms
Referenced by RDKit::SLNParse::addBondToMol(), and RDKit::SLNParse::startMol().
| unsigned int RDKit::RWMol::addBond | ( | ATOM_SPTR | beginAtom, | |
| ATOM_SPTR | endAtom, | |||
| Bond::BondType | order = Bond::UNSPECIFIED | |||
| ) |
| unsigned int RDKit::RWMol::addBond | ( | Atom * | beginAtom, | |
| Atom * | endAtom, | |||
| Bond::BondType | order = Bond::UNSPECIFIED | |||
| ) |
| unsigned int RDKit::RWMol::addBond | ( | Bond * | bond, | |
| bool | takeOwnership = false | |||
| ) | [inline] |
adds a Bond to our collection
| bond | pointer to the Bond to add | |
| takeOwnership | (optional) if this is true, we take ownership of bond instead of copying it. |
Reimplemented from RDKit::ROMol.
| unsigned int RDKit::RWMol::addBond | ( | BOND_SPTR | bsp | ) | [inline] |
adds a Bond to our collection
| bond | pointer to the Bond to add |
Reimplemented from RDKit::ROMol.
| Bond* RDKit::RWMol::createPartialBond | ( | unsigned int | beginAtomIdx, | |
| Bond::BondType | order = Bond::UNSPECIFIED | |||
| ) |
starts a Bond and sets its beginAtomIdx
Bond *pBond = mol->createPartialBond(1);
mol->setBondBookmark(pBond,666);
... do some other stuff ...
mol->finishPartialBond(2,666,Bond::SINGLE);
mol->clearBondBookmark(666,pBond);
or, if we want to set the BondType initially:
Bond *pBond = mol->createPartialBond(1,Bond::DOUBLE);
mol->setBondBookmark(pBond,666);
... do some other stuff ...
mol->finishPartialBond(2,666);
mol->clearBondBookmark(666,pBond);
the call to finishPartialBond() will take priority if you set the BondType in both calls.
| unsigned int RDKit::RWMol::finishPartialBond | ( | unsigned int | endAtomIdx, | |
| int | bondBookmark, | |||
| Bond::BondType | order = Bond::UNSPECIFIED | |||
| ) |
finishes a partially constructed bond
| void RDKit::RWMol::removeBond | ( | unsigned int | beginAtomIdx, | |
| unsigned int | endAtomIdx | |||
| ) |
removes a bond from the molecule
1.5.6