Loading...
Searching...
No Matches
RDKit::Atom Class Reference

The class for representing atoms. More...

`#include <Atom.h>`

Inheritance diagram for RDKit::Atom:

## Public Types

enum | HybridizationType { UNSPECIFIED = 0 , S , SP , SP2 , SP3 , SP2D , SP3D , SP3D2 , OTHER }
| store hybridization More...
enum | ChiralType { CHI_UNSPECIFIED = 0 , CHI_TETRAHEDRAL_CW , CHI_TETRAHEDRAL_CCW , CHI_OTHER , CHI_TETRAHEDRAL , CHI_ALLENE , CHI_SQUAREPLANAR , CHI_TRIGONALBIPYRAMIDAL , CHI_OCTAHEDRAL }
| store type of chirality More...
enum class | ValenceType : std::uint8_t { IMPLICIT = 0 , EXPLICIT }
typedef Queries::Query< int, Atom const *, true > | QUERYATOM_QUERY

## Public Member Functions

| Atom ()
| Atom (unsigned int num)
| construct an Atom with a particular atomic number
| Atom (const std::string &what)
| Atom (const Atom &other)
Atom & | operator= (const Atom &other)
| Atom (Atom &&other)=default
Atom & | operator= (Atom &&other)=default
virtual | ~Atom ()
virtual Atom * | copy () const
| makes a copy of this Atom and returns a pointer to it.
int | getAtomicNum () const
| returns our atomic number
void | setAtomicNum (int newNum)
| sets our atomic number
std::string | getSymbol () const
| returns our symbol (determined by our atomic number)
bool | hasOwningMol () const
| returns whether or not this instance belongs to a molecule
ROMol & | getOwningMol () const
| returns a reference to the ROMol that owns this instance
unsigned int | getIdx () const
| returns our index within the ROMol
void | setIdx (unsigned int index)
| sets our index within the ROMol
template<class U>
void | setIdx (const U index)
| overload
unsigned int | getDegree () const
unsigned int | getTotalDegree () const
unsigned int | getTotalNumHs (bool includeNeighbors=false) const
| returns the total number of Hs (implicit and explicit) that this Atom is bound to
unsigned int | getTotalValence () const
| returns the total valence (implicit and explicit) for an atom
unsigned int | getNumImplicitHs () const
| returns the number of implicit Hs this Atom is bound to
unsigned int | getValence (ValenceType which) const
| returns the valence (explicit or implicit) of this atom
int | getExplicitValence () const
| returns the explicit valence (including Hs) of this atom
int | getImplicitValence () const
| returns the implicit valence for this Atom
bool | hasValenceViolation () const
| returns whether the atom has a valency violation or not
unsigned int | getNumRadicalElectrons () const
| returns the number of radical electrons for this Atom
void | setNumRadicalElectrons (unsigned int num)
int | getFormalCharge () const
| returns the formal charge of this atom
void | setFormalCharge (int what)
| set's the formal charge of this atom
void | setNoImplicit (bool what)
| sets our `noImplicit` flag, indicating whether or not we are allowed to have implicit Hs
bool | getNoImplicit () const
| returns the `noImplicit` flag
void | setNumExplicitHs (unsigned int what)
| sets our number of explicit Hs
unsigned int | getNumExplicitHs () const
| returns our number of explicit Hs
void | setIsAromatic (bool what)
| sets our `isAromatic` flag, indicating whether or not we are aromatic
bool | getIsAromatic () const
| returns our `isAromatic` flag
double | getMass () const
| returns our mass
void | setIsotope (unsigned int what)
| sets our isotope number
unsigned int | getIsotope () const
| returns our isotope number
void | setChiralTag (ChiralType what)
| sets our `chiralTag`
bool | invertChirality ()
| inverts our `chiralTag`, returns whether or not a change was made
ChiralType | getChiralTag () const
| returns our `chiralTag`
void | setHybridization (HybridizationType what)
| sets our hybridization
HybridizationType | getHybridization () const
| returns our hybridization
virtual bool | hasQuery () const
virtual std::string | getQueryType () const
virtual void | setQuery (QUERYATOM_QUERY *what)
| NOT CALLABLE.
virtual QUERYATOM_QUERY * | getQuery () const
| NOT CALLABLE.
virtual void | expandQuery (QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
| NOT CALLABLE.
virtual bool | Match (Atom const *what) const
| returns whether or not we match the argument
int | getPerturbationOrder (const INT_LIST &probe) const
| returns the perturbation order for a list of integers
void | updatePropertyCache (bool strict=true)
| calculates any of our lazy `properties`
bool | needsUpdatePropertyCache () const
void | clearPropertyCache ()
int | calcExplicitValence (bool strict=true)
| calculates and returns our explicit valence
int | calcImplicitValence (bool strict=true)
| calculates and returns our implicit valence
AtomMonomerInfo * | getMonomerInfo ()
const AtomMonomerInfo * | getMonomerInfo () const
void | setMonomerInfo (AtomMonomerInfo *info)
| takes ownership of the pointer
void | setAtomMapNum (int mapno, bool strict=true)
| Set the atom map Number of the atom.
int | getAtomMapNum () const
Public Member Functions inherited from RDKit::RDProps
| RDProps ()
| RDProps (const RDProps &rhs)
RDProps & | operator= (const RDProps &rhs)
| RDProps (RDProps &&o) noexcept=default
RDProps & | operator= (RDProps &&rhs) noexcept=default
void | clear ()
const Dict & | getDict () const
| gets the underlying Dictionary
Dict & | getDict ()
STR_VECT | getPropList (bool includePrivate=true, bool includeComputed=true) const
| returns a list with the names of our `properties`
template<typename T>
void | setProp (const std::string &key, T val, bool computed=false) const
| sets a `property` value
template<typename T>
void | getProp (const std::string &key, T &res) const
| allows retrieval of a particular property value
template<typename T>
T | getProp (const std::string &key) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename T>
bool | getPropIfPresent (const std::string &key, T &res) const
bool | hasProp (const std::string &key) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void | clearProp (const std::string &key) const
| clears the value of a `property`
void | clearComputedProps () const
| clears all of our `computed` `properties`
void | updateProps (const RDProps &source, bool preserveExisting=false)
| update the properties from another

## Protected Member Functions

void | setOwningMol (ROMol *other)
| sets our owning molecule
void | setOwningMol (ROMol &other)
| sets our owning molecule
void | initAtom ()
void | initFromOther (const Atom &other)

## Protected Attributes

bool | df_isAromatic
bool | df_noImplicit
std::uint8_t | d_numExplicitHs
std::int8_t | d_formalCharge
std::uint8_t | d_atomicNum
std::int8_t | d_implicitValence
std::int8_t | d_explicitValence
std::uint8_t | d_numRadicalElectrons
std::uint8_t | d_chiralTag
std::uint8_t | d_hybrid
std::uint16_t | d_isotope
atomindex_t | d_index
ROMol * | dp_mol
AtomMonomerInfo * | dp_monomerInfo
Protected Attributes inherited from RDKit::RDProps
Dict | d_props

## Friends

class | MolPickler
| the pickler needs access to our privates
class | ROMol
class | RWMol
std::ostream & | operator<<) (std::ostream &target, const ::RDKit::Atom &at)
int | calculateImplicitValence (const Atom &, bool, bool)

## Detailed Description

The class for representing atoms.

Notes:

- many of the methods of Atom require that the Atom be associated with a molecule (an ROMol).
- each Atom maintains a Dict of `properties:`
  - Each `property` is keyed by name and can store an arbitrary type.
  - `Properties` can be marked as `calculated`, in which case they will be cleared when the `clearComputedProps()` method is called.
  - Because they have no impact upon chemistry, all `property` operations are `const`, this allows extra flexibility for clients who need to store extra data on Atom objects.
- Atom objects are lazy about computing their explicit and implicit valence values. These will not be computed until their values are requested.

Chirality:

The chirality of an Atom is determined by two things:

- its `chiralTag`
- the input order of its bonds (see note below for handling of implicit Hs)

For tetrahedral coordination, the `chiralTag` tells you what direction you have to rotate to get from bond 2 to bond 3 while looking down bond 1. This is pretty much identical to the SMILES representation of chirality.

NOTE: if an atom has an implicit H, the bond to that H is considered to be at the end of the list of other bonds.

Definition at line 75 of file Atom.h.

## Member Typedef Documentation

## QUERYATOM_QUERY

typedef Queries::Query<int, Atom const *, true> RDKit::Atom::QUERYATOM_QUERY

Definition at line 85 of file Atom.h.

## Member Enumeration Documentation

## ChiralType

enum RDKit::Atom::ChiralType

store type of chirality

Enumerator
CHI_UNSPECIFIED | chirality that hasn't been specified
CHI_TETRAHEDRAL_CW | tetrahedral: clockwise rotation (SMILES @@)
CHI_TETRAHEDRAL_CCW | tetrahedral: counter-clockwise rotation (SMILES
CHI_OTHER | some unrecognized type of chirality
CHI_TETRAHEDRAL | tetrahedral, use permutation flag
CHI_ALLENE | allene, use permutation flag
CHI_SQUAREPLANAR | square planar, use permutation flag
CHI_TRIGONALBIPYRAMIDAL | trigonal bipyramidal, use permutation flag
CHI_OCTAHEDRAL | octahedral, use permutation flag

Definition at line 101 of file Atom.h.

## HybridizationType

enum RDKit::Atom::HybridizationType

store hybridization

Enumerator
UNSPECIFIED | hybridization that hasn't been specified
S |
SP |
SP2 |
SP3 |
SP2D |
SP3D |
SP3D2 |
OTHER | unrecognized hybridization

Definition at line 88 of file Atom.h.

## ValenceType

enum class RDKit::Atom::ValenceType : std::uint8_t

strong

Enumerator
IMPLICIT |
EXPLICIT |

Definition at line 114 of file Atom.h.

## Constructor & Destructor Documentation

## Atom() [1/5]

RDKit::Atom::Atom | ( |  | ) |

Referenced by Atom(), Atom(), calculateImplicitValence, copy(), RDKit::QueryAtom::copy(), initFromOther(), Match(), RDKit::QueryAtom::Match(), operator=(), operator=(), RDKit::QueryAtom::QueryAtom(), RDKit::QueryAtom::QueryAtom(), RDKit::QueryAtom::QueryAtom(), RDKit::QueryAtom::QueryAtom(), and RDKit::QueryAtom::QueryAtom().

## Atom() [2/5]

RDKit::Atom::Atom | ( | unsigned int | num | ) |

explicit

construct an Atom with a particular atomic number

## Atom() [3/5]

RDKit::Atom::Atom | ( | const std::string & | what | ) |

explicit

construct an Atom with a particular symbol (looked up in the PeriodicTable)

## Atom() [4/5]

RDKit::Atom::Atom | ( | const Atom & | other | ) |

References Atom().

## Atom() [5/5]

RDKit::Atom::Atom | ( | Atom && | other | ) |

default

References Atom().

## ~Atom()

virtual RDKit::Atom::~Atom | ( |  | ) |

virtual

## Member Function Documentation

## calcExplicitValence()

int RDKit::Atom::calcExplicitValence | ( | bool | strict = true | ) |

calculates and returns our explicit valence

Notes:

- requires an owning molecule

## calcImplicitValence()

int RDKit::Atom::calcImplicitValence | ( | bool | strict = true | ) |

calculates and returns our implicit valence

Notes:

- requires an owning molecule

## clearPropertyCache()

void RDKit::Atom::clearPropertyCache | ( |  | ) |

## copy()

virtual Atom * RDKit::Atom::copy | ( |  | ) | const

virtual

makes a copy of this Atom and returns a pointer to it.

Note: the caller is responsible for deleteing the result

Reimplemented in RDKit::QueryAtom.

References Atom().

## expandQuery()

virtual void RDKit::Atom::expandQuery | ( | QUERYATOM_QUERY * | what,
|  | Queries::CompositeQueryType | how = Queries::COMPOSITE_AND,
|  | bool | maintainOrder = true )

virtual

NOT CALLABLE.

Reimplemented in RDKit::QueryAtom.

References Queries::COMPOSITE_AND.

## getAtomicNum()

int RDKit::Atom::getAtomicNum | ( |  | ) | const

inline

returns our atomic number

Definition at line 141 of file Atom.h.

References d_atomicNum.

Referenced by RDDepict::getAtomDepictRank(), RDKit::isAnyAtomWithMultipleNeighborsOrNotUserRLabel(), RDKit::isAtomDummy(), RDKit::QueryAtom::QueryAtom(), RDKit::queryAtomHasAliphaticHeteroatomNbrs(), RDKit::queryAtomHasHeteroatomNbrs(), RDKit::queryAtomNum(), RDKit::queryAtomNumAliphaticHeteroatomNbrs(), RDKit::queryAtomNumHeteroatomNbrs(), and RDKit::queryAtomType().

## getAtomMapNum()

int RDKit::Atom::getAtomMapNum | ( |  | ) | const

inline

Gets the atom map Number of the atom, if no atom map exists, 0 is returned.

Definition at line 382 of file Atom.h.

References RDKit::RDProps::getPropIfPresent(), and RDKit::common_properties::molAtomMapNumber.

## getChiralTag()

ChiralType RDKit::Atom::getChiralTag | ( |  | ) | const

inline

returns our `chiralTag`

Definition at line 240 of file Atom.h.

References d_chiralTag.

Referenced by RDKit::queryAtomHasChiralTag(), and RDKit::queryAtomMissingChiralTag().

## getDegree()

unsigned int RDKit::Atom::getDegree | ( |  | ) | const

returns the explicit degree of the Atom (number of bonded neighbors in the graph)

Referenced by RDDepict::getAtomDepictRank(), and RDKit::queryAtomExplicitDegree().

## getExplicitValence()

int RDKit::Atom::getExplicitValence | ( |  | ) | const

returns the explicit valence (including Hs) of this atom

## getFormalCharge()

int RDKit::Atom::getFormalCharge | ( |  | ) | const

inline

returns the formal charge of this atom

Definition at line 207 of file Atom.h.

References d_formalCharge.

Referenced by RDKit::QueryAtom::QueryAtom(), RDKit::queryAtomFormalCharge(), and RDKit::queryAtomNegativeFormalCharge().

## getHybridization()

HybridizationType RDKit::Atom::getHybridization | ( |  | ) | const

inline

returns our hybridization

Definition at line 247 of file Atom.h.

References d_hybrid.

Referenced by RDKit::queryAtomHybridization().

## getIdx()

unsigned int RDKit::Atom::getIdx | ( |  | ) | const

inline

returns our index within the ROMol

Definition at line 158 of file Atom.h.

References d_index.

Referenced by RDKit::SLNParse::addAtomToMol(), RDKit::SLNParse::addBranchToMol(), RDKit::SLNParse::closeRingBond(), RDKit::RecursiveStructureQuery::getAtIdx(), RDKit::queryAtomIsInRingOfSize(), RDKit::queryAtomMinRingSize(), RDKit::queryAtomRingMembership(), RDKit::queryIsAtomInNRings(), and RDKit::queryIsAtomInRing().

## getImplicitValence()

int RDKit::Atom::getImplicitValence | ( |  | ) | const

returns the implicit valence for this Atom

## getIsAromatic()

bool RDKit::Atom::getIsAromatic | ( |  | ) | const

inline

returns our `isAromatic` flag

Definition at line 225 of file Atom.h.

References df_isAromatic.

Referenced by RDKit::queryAtomAliphatic(), RDKit::queryAtomAromatic(), RDKit::queryAtomHasAliphaticHeteroatomNbrs(), RDKit::queryAtomNumAliphaticHeteroatomNbrs(), and RDKit::queryAtomType().

## getIsotope()

unsigned int RDKit::Atom::getIsotope | ( |  | ) | const

inline

returns our isotope number

Definition at line 233 of file Atom.h.

References d_isotope.

Referenced by RDKit::QueryAtom::QueryAtom(), and RDKit::queryAtomIsotope().

## getMass()

double RDKit::Atom::getMass | ( |  | ) | const

returns our mass

Referenced by RDKit::queryAtomMass().

## getMonomerInfo() [1/2]

AtomMonomerInfo * RDKit::Atom::getMonomerInfo | ( |  | ) |

inline

Definition at line 364 of file Atom.h.

References dp_monomerInfo.

## getMonomerInfo() [2/2]

const AtomMonomerInfo * RDKit::Atom::getMonomerInfo | ( |  | ) | const

inline

Definition at line 365 of file Atom.h.

References dp_monomerInfo.

## getNoImplicit()

bool RDKit::Atom::getNoImplicit | ( |  | ) | const

inline

returns the `noImplicit` flag

Definition at line 215 of file Atom.h.

References df_noImplicit.

## getNumExplicitHs()

unsigned int RDKit::Atom::getNumExplicitHs | ( |  | ) | const

inline

returns our number of explicit Hs

Definition at line 220 of file Atom.h.

References d_numExplicitHs.

Referenced by RDKit::queryAtomExplicitValence().

## getNumImplicitHs()

unsigned int RDKit::Atom::getNumImplicitHs | ( |  | ) | const

returns the number of implicit Hs this Atom is bound to

## getNumRadicalElectrons()

unsigned int RDKit::Atom::getNumRadicalElectrons | ( |  | ) | const

inline

returns the number of radical electrons for this Atom

Definition at line 203 of file Atom.h.

References d_numRadicalElectrons.

Referenced by RDKit::QueryAtom::QueryAtom(), and RDKit::queryAtomNumRadicalElectrons().

## getOwningMol()

ROMol & RDKit::Atom::getOwningMol | ( |  | ) | const

inline

returns a reference to the ROMol that owns this instance

Definition at line 152 of file Atom.h.

References dp_mol, PRECONDITION, and ROMol.

Referenced by RDKit::queryAtomHasAliphaticHeteroatomNbrs(), RDKit::queryAtomHasHeteroatomNbrs(), RDKit::queryAtomHasRingBond(), RDKit::queryAtomHeavyAtomDegree(), RDKit::queryAtomIsInRingOfSize(), RDKit::queryAtomMinRingSize(), RDKit::queryAtomNonHydrogenDegree(), RDKit::queryAtomNumAliphaticHeteroatomNbrs(), RDKit::queryAtomNumHeteroatomNbrs(), RDKit::queryAtomRingBondCount(), RDKit::queryAtomRingMembership(), RDKit::queryIsAtomInNRings(), and RDKit::queryIsAtomInRing().

## getPerturbationOrder()

int RDKit::Atom::getPerturbationOrder | ( | const INT_LIST & | probe | ) | const

returns the perturbation order for a list of integers

This value is associated with chirality.

Parameters

  probe | a list of bond indices. This must be the same length as our number of incoming bonds (our degree).

Returns
  the number of swaps required to convert the ordering of the probe list to match the order of our incoming bonds: e.g. if our incoming bond order is: [0,1,2,3]

        getPerturbationOrder([1,0,2,3]) = 1
        getPerturbationOrder([1,2,3,0]) = 3
        getPerturbationOrder([1,2,0,3]) = 2

See the class documentation for a more detailed description of our representation of chirality.

Notes:

- requires an owning molecule

## getQuery()

virtual QUERYATOM_QUERY * RDKit::Atom::getQuery | ( |  | ) | const

virtual

NOT CALLABLE.

Reimplemented in RDKit::QueryAtom.

Referenced by RDKit::describeQuery(), and RDKit::isAtomDummy().

## getQueryType()

virtual std::string RDKit::Atom::getQueryType | ( |  | ) | const

inline virtual

Reimplemented in RDKit::QueryAtom.

Definition at line 266 of file Atom.h.

## getSymbol()

std::string RDKit::Atom::getSymbol | ( |  | ) | const

returns our symbol (determined by our atomic number)

## getTotalDegree()

unsigned int RDKit::Atom::getTotalDegree | ( |  | ) | const

returns the total degree of the Atom (number of bonded neighbors + number of Hs)

Referenced by RDKit::queryAtomTotalDegree(), and RDKit::queryAtomUnsaturated().

## getTotalNumHs()

unsigned int RDKit::Atom::getTotalNumHs | ( | bool | includeNeighbors = false | ) | const

returns the total number of Hs (implicit and explicit) that this Atom is bound to

Referenced by RDKit::queryAtomHasImplicitH(), RDKit::queryAtomHCount(), and RDKit::queryAtomImplicitHCount().

## getTotalValence()

unsigned int RDKit::Atom::getTotalValence | ( |  | ) | const

returns the total valence (implicit and explicit) for an atom

Referenced by RDKit::queryAtomTotalValence(), and RDKit::queryAtomUnsaturated().

## getValence()

unsigned int RDKit::Atom::getValence | ( | ValenceType | which | ) | const

returns the valence (explicit or implicit) of this atom

Referenced by RDKit::queryAtomExplicitValence(), and RDKit::queryAtomImplicitValence().

## hasOwningMol()

bool RDKit::Atom::hasOwningMol | ( |  | ) | const

inline

returns whether or not this instance belongs to a molecule

Definition at line 149 of file Atom.h.

References dp_mol.

## hasQuery()

virtual bool RDKit::Atom::hasQuery | ( |  | ) | const

inline virtual

Reimplemented in RDKit::QueryAtom.

Definition at line 264 of file Atom.h.

Referenced by RDKit::describeQuery(), and RDKit::isAtomDummy().

## hasValenceViolation()

bool RDKit::Atom::hasValenceViolation | ( |  | ) | const

returns whether the atom has a valency violation or not

## initAtom()

void RDKit::Atom::initAtom | ( |  | ) |

protected

## initFromOther()

void RDKit::Atom::initFromOther | ( | const Atom & | other | ) |

protected

References Atom().

## invertChirality()

bool RDKit::Atom::invertChirality | ( |  | ) |

inverts our `chiralTag`, returns whether or not a change was made

## Match()

virtual bool RDKit::Atom::Match | ( | Atom const * | what | ) | const

virtual

returns whether or not we match the argument

Notes: The general rule is that if a property on this atom has a non-default value, the property on the other atom must have the same value. The exception to this is H counts, which are ignored. These turns out to be impossible to handle generally, so rather than having odd and hard-to-explain exceptions, we ignore them entirely.

Here are the rules for atom-atom matching: | This | Other | Match | Reason | CCO | CCO | Yes | | CCO | CC[O-] | Yes | | CC[O-] | CCO | No | Charge | CC[O-] | CC[O-] | Yes | | CC[OH] | CC[O-] | Yes | | CC[OH] | CCOC | Yes | | CCO | CCOC | Yes | | CCC | CCC | Yes | | CCC | CC[14C] | Yes | | CC[14C] | CCC | No | Isotope | CC[14C] | CC[14C] | Yes | | C | OCO | Yes | | [CH] | OCO | Yes | | [CH2] | OCO | Yes | | [CH3] | OCO | No | Radical | C | O[CH2]O | Yes | | [CH2] | O[CH2]O | Yes |

Reimplemented in RDKit::QueryAtom.

References Atom().

## needsUpdatePropertyCache()

bool RDKit::Atom::needsUpdatePropertyCache | ( |  | ) | const

## operator=() [1/2]

Atom & RDKit::Atom::operator= | ( | Atom && | other | ) |

default

References Atom().

## operator=() [2/2]

Atom & RDKit::Atom::operator= | ( | const Atom & | other | ) |

References Atom().

Referenced by RDKit::QueryAtom::operator=().

## setAtomicNum()

void RDKit::Atom::setAtomicNum | ( | int | newNum | ) |

inline

sets our atomic number

Definition at line 143 of file Atom.h.

References d_atomicNum.

## setAtomMapNum()

void RDKit::Atom::setAtomMapNum | ( | int | mapno,
|  | bool | strict = true )

inline

Set the atom map Number of the atom.

Definition at line 370 of file Atom.h.

References RDKit::RDProps::clearProp(), RDKit::RDProps::hasProp(), RDKit::common_properties::molAtomMapNumber, PRECONDITION, and RDKit::RDProps::setProp().

## setChiralTag()

void RDKit::Atom::setChiralTag | ( | ChiralType | what | ) |

inline

sets our `chiralTag`

Definition at line 236 of file Atom.h.

References d_chiralTag.

## setFormalCharge()

void RDKit::Atom::setFormalCharge | ( | int | what | ) |

inline

set's the formal charge of this atom

Definition at line 209 of file Atom.h.

References d_formalCharge.

## setHybridization()

void RDKit::Atom::setHybridization | ( | HybridizationType | what | ) |

inline

sets our hybridization

Definition at line 245 of file Atom.h.

References d_hybrid.

## setIdx() [1/2]

template<class U>

void RDKit::Atom::setIdx | ( | const U | index | ) |

inline

overload

Definition at line 168 of file Atom.h.

References rdcast, and setIdx().

## setIdx() [2/2]

void RDKit::Atom::setIdx | ( | unsigned int | index | ) |

inline

sets our index within the ROMol

Notes:

- this makes no sense if we do not have an owning molecule
- the index should be < this->getOwningMol()->getNumAtoms()

Definition at line 165 of file Atom.h.

References d_index.

Referenced by setIdx().

## setIsAromatic()

void RDKit::Atom::setIsAromatic | ( | bool | what | ) |

inline

sets our `isAromatic` flag, indicating whether or not we are aromatic

Definition at line 223 of file Atom.h.

References df_isAromatic.

## setIsotope()

void RDKit::Atom::setIsotope | ( | unsigned int | what | ) |

sets our isotope number

## setMonomerInfo()

void RDKit::Atom::setMonomerInfo | ( | AtomMonomerInfo * | info | ) |

takes ownership of the pointer

## setNoImplicit()

void RDKit::Atom::setNoImplicit | ( | bool | what | ) |

inline

sets our `noImplicit` flag, indicating whether or not we are allowed to have implicit Hs

Definition at line 213 of file Atom.h.

References df_noImplicit.

## setNumExplicitHs()

void RDKit::Atom::setNumExplicitHs | ( | unsigned int | what | ) |

inline

sets our number of explicit Hs

Definition at line 218 of file Atom.h.

References d_numExplicitHs.

## setNumRadicalElectrons()

void RDKit::Atom::setNumRadicalElectrons | ( | unsigned int | num | ) |

inline

Definition at line 204 of file Atom.h.

References d_numRadicalElectrons.

## setOwningMol() [1/2]

void RDKit::Atom::setOwningMol | ( | ROMol & | other | ) |

inline protected

sets our owning molecule

Definition at line 392 of file Atom.h.

References ROMol, and setOwningMol().

Referenced by setOwningMol().

## setOwningMol() [2/2]

void RDKit::Atom::setOwningMol | ( | ROMol * | other | ) |

protected

sets our owning molecule

References ROMol.

Referenced by RDKit::SLNParse::closeRingBond().

## setQuery()

virtual void RDKit::Atom::setQuery | ( | QUERYATOM_QUERY * | what | ) |

virtual

NOT CALLABLE.

Reimplemented in RDKit::QueryAtom.

## updatePropertyCache()

void RDKit::Atom::updatePropertyCache | ( | bool | strict = true | ) |

calculates any of our lazy `properties`

Notes:

- requires an owning molecule
- the current lazy `properties` are implicit and explicit valence

## Friends And Related Symbol Documentation

## calculateImplicitValence

int calculateImplicitValence | ( | const Atom & | ,
|  | bool | ,
|  | bool | )

friend

References Atom().

## MolPickler

friend class MolPickler

friend

the pickler needs access to our privates

Definition at line 76 of file Atom.h.

References MolPickler.

Referenced by MolPickler.

## operator<<)

std::ostream & operator<<) | ( | std::ostream & | target,
|  | const ::RDKit::Atom & | at )

friend

## ROMol

friend class ROMol

friend

Definition at line 77 of file Atom.h.

References ROMol.

Referenced by getOwningMol(), ROMol, setOwningMol(), and setOwningMol().

## RWMol

friend class RWMol

friend

Definition at line 78 of file Atom.h.

References RWMol.

Referenced by RWMol.

## Member Data Documentation

## d_atomicNum

std::uint8_t RDKit::Atom::d_atomicNum

protected

Definition at line 398 of file Atom.h.

Referenced by getAtomicNum(), and setAtomicNum().

## d_chiralTag

std::uint8_t RDKit::Atom::d_chiralTag

protected

Definition at line 404 of file Atom.h.

Referenced by getChiralTag(), and setChiralTag().

## d_explicitValence

std::int8_t RDKit::Atom::d_explicitValence

protected

Definition at line 402 of file Atom.h.

## d_formalCharge

std::int8_t RDKit::Atom::d_formalCharge

protected

Definition at line 397 of file Atom.h.

Referenced by getFormalCharge(), and setFormalCharge().

## d_hybrid

std::uint8_t RDKit::Atom::d_hybrid

protected

Definition at line 405 of file Atom.h.

Referenced by getHybridization(), and setHybridization().

## d_implicitValence

std::int8_t RDKit::Atom::d_implicitValence

protected

Definition at line 402 of file Atom.h.

## d_index

atomindex_t RDKit::Atom::d_index

protected

Definition at line 408 of file Atom.h.

Referenced by getIdx(), and setIdx().

## d_isotope

std::uint16_t RDKit::Atom::d_isotope

protected

Definition at line 407 of file Atom.h.

Referenced by getIsotope().

## d_numExplicitHs

std::uint8_t RDKit::Atom::d_numExplicitHs

protected

Definition at line 396 of file Atom.h.

Referenced by getNumExplicitHs(), and setNumExplicitHs().

## d_numRadicalElectrons

std::uint8_t RDKit::Atom::d_numRadicalElectrons

protected

Definition at line 403 of file Atom.h.

Referenced by getNumRadicalElectrons(), and setNumRadicalElectrons().

## df_isAromatic

bool RDKit::Atom::df_isAromatic

protected

Definition at line 394 of file Atom.h.

Referenced by getIsAromatic(), and setIsAromatic().

## df_noImplicit

bool RDKit::Atom::df_noImplicit

protected

Definition at line 395 of file Atom.h.

Referenced by getNoImplicit(), and setNoImplicit().

## dp_mol

ROMol* RDKit::Atom::dp_mol

protected

Definition at line 410 of file Atom.h.

Referenced by getOwningMol(), and hasOwningMol().

## dp_monomerInfo

AtomMonomerInfo* RDKit::Atom::dp_monomerInfo

protected

Definition at line 411 of file Atom.h.

Referenced by getMonomerInfo(), and getMonomerInfo().

The documentation for this class was generated from the following file:

- Atom.h