Loading...
Searching...
No Matches
Atom.h
Go to the documentation of this file.
//
// Copyright (C) 2001-2024 Greg Landrum and other RDKit contributors
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
/*! \file Atom.h
\brief Defines the Atom class and associated typedefs
*/
#include <RDGeneral/export.h>
#ifndef _RD_ATOM_H
#define _RD_ATOM_H
#include <limits>
// ours
#include <RDGeneral/Invariant.h>
#include <Query/QueryObjects.h>
#include <RDGeneral/types.h>
#include <RDGeneral/RDProps.h>
#include <GraphMol/details.h>
namespace RDKit {
class Atom;
}
//! allows Atom objects to be dumped to streams
RDKIT_GRAPHMOL_EXPORT std::ostream &operator<<(std::ostream &target,
const RDKit::Atom &at);
namespace RDKit {
class ROMol;
class RWMol;
class AtomMonomerInfo;
//! The class for representing atoms
/*!
<b>Notes:</b>
- many of the methods of Atom require that the Atom be associated
with a molecule (an ROMol).
- each Atom maintains a Dict of \c properties:
- Each \c property is keyed by name and can store an
arbitrary type.
- \c Properties can be marked as \c calculated, in which case
they will be cleared when the \c clearComputedProps() method
is called.
- Because they have no impact upon chemistry, all \c property
operations are \c 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.
<b>Chirality:</b>
The chirality of an Atom is determined by two things:
- its \c chiralTag
- the input order of its bonds (see note below for handling of
implicit Hs)
For tetrahedral coordination, the \c 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.
*/
class RDKIT_GRAPHMOL_EXPORT Atom : public RDProps {
friend class MolPickler; //!< the pickler needs access to our privates
friend class ROMol;
friend class RWMol;
friend std::ostream &(::operator<<)(std::ostream &target,
const ::RDKit::Atom &at);
friend int calculateImplicitValence(const Atom &, bool, bool);
public:
// used to mark missing atoms, e.g. in Chirality::StereoInfo
// and the _CIPNeighborOrder in CIP labeler
inline static constexpr unsigned int NOATOM =
std::numeric_limits<unsigned int>::max();
// FIX: grn...
typedef Queries::Query<int, Atom const *, true> QUERYATOM_QUERY;
//! store hybridization
typedef enum {
UNSPECIFIED = 0, //!< hybridization that hasn't been specified
S,
SP,
SP2,
SP3,
SP2D,
SP3D,
SP3D2,
OTHER //!< unrecognized hybridization
} HybridizationType;
//! store type of chirality
typedef enum {
CHI_UNSPECIFIED = 0, //!< 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
} ChiralType;
enum class ValenceType : std::uint8_t {
IMPLICIT = 0,
EXPLICIT
};
Atom();
//! construct an Atom with a particular atomic number
explicit Atom(unsigned int num);
//! construct an Atom with a particular symbol (looked up in the
/// PeriodicTable)
explicit Atom(const std::string &what);
Atom(const Atom &other);
Atom &operator=(const Atom &other);
// NOTE: the move methods are somewhat fraught for atoms associated with
// molecules since the molecule will still be pointing to the original object
Atom(Atom &&other) = default;
Atom &operator=(Atom &&other) = default;
virtual ~Atom();
//! makes a copy of this Atom and returns a pointer to it.
/*!
<b>Note:</b> the caller is responsible for <tt>delete</tt>ing the result
*/
virtual Atom *copy() const;
//! returns our atomic number
int getAtomicNum() const { return d_atomicNum; }
//! sets our atomic number
void setAtomicNum(int newNum) { d_atomicNum = newNum; }
//! returns our symbol (determined by our atomic number)
std::string getSymbol() const;
//! returns whether or not this instance belongs to a molecule
bool hasOwningMol() const { return dp_mol != nullptr; }
//! returns a reference to the ROMol that owns this instance
ROMol &getOwningMol() const {
PRECONDITION(dp_mol, "no owner");
return *dp_mol;
}
//! returns our index within the ROMol
unsigned int getIdx() const { return d_index; }
//! sets our index within the ROMol
/*!
<b>Notes:</b>
- this makes no sense if we do not have an owning molecule
- the index should be <tt>< this->getOwningMol()->getNumAtoms()</tt>
*/
void setIdx(unsigned int index) { d_index = index; }
//! overload
template <class U>
void setIdx(const U index) {
setIdx(rdcast<unsigned int>(index));
}
//! returns the explicit degree of the Atom (number of bonded
//! neighbors in the graph)
unsigned int getDegree() const;
//! returns the total degree of the Atom (number of bonded
//! neighbors + number of Hs)
unsigned int getTotalDegree() const;
//! \brief returns the total number of Hs (implicit and explicit) that
//! this Atom is bound to
unsigned int getTotalNumHs(bool includeNeighbors = false) const;
//! \brief returns the total valence (implicit and explicit)
//! for an atom
unsigned int getTotalValence() const;
//! returns the number of implicit Hs this Atom is bound to
unsigned int getNumImplicitHs() const;
//! returns the valence (explicit or implicit) of this atom
unsigned int getValence(ValenceType which) const;
//! returns the explicit valence (including Hs) of this atom
[[deprecated("please use getValence(true)")]] int getExplicitValence() const;
//! returns the implicit valence for this Atom
[[deprecated("please use getValence(false)")]] int getImplicitValence() const;
//! returns whether the atom has a valency violation or not
bool hasValenceViolation() const;
//! returns the number of radical electrons for this Atom
unsigned int getNumRadicalElectrons() const { return d_numRadicalElectrons; }
void setNumRadicalElectrons(unsigned int num) { d_numRadicalElectrons = num; }
//! returns the formal charge of this atom
int getFormalCharge() const { return d_formalCharge; }
//! set's the formal charge of this atom
void setFormalCharge(int what) { d_formalCharge = what; }
//! \brief sets our \c noImplicit flag, indicating whether or not
//! we are allowed to have implicit Hs
void setNoImplicit(bool what) { df_noImplicit = what; }
//! returns the \c noImplicit flag
bool getNoImplicit() const { return df_noImplicit; }
//! sets our number of explicit Hs
void setNumExplicitHs(unsigned int what) { d_numExplicitHs = what; }
//! returns our number of explicit Hs
unsigned int getNumExplicitHs() const { return d_numExplicitHs; }
//! sets our \c isAromatic flag, indicating whether or not we are aromatic
void setIsAromatic(bool what) { df_isAromatic = what; }
//! returns our \c isAromatic flag
bool getIsAromatic() const { return df_isAromatic; }
//! returns our mass
double getMass() const;
//! sets our isotope number
void setIsotope(unsigned int what);
//! returns our isotope number
unsigned int getIsotope() const { return d_isotope; }
//! sets our \c chiralTag
void setChiralTag(ChiralType what) { d_chiralTag = what; }
//! inverts our \c chiralTag, returns whether or not a change was made
bool invertChirality();
//! returns our \c chiralTag
ChiralType getChiralTag() const {
return static_cast<ChiralType>(d_chiralTag);
}
//! sets our hybridization
void setHybridization(HybridizationType what) { d_hybrid = what; }
//! returns our hybridization
HybridizationType getHybridization() const {
return static_cast<HybridizationType>(d_hybrid);
}
// ------------------------------------
// Some words of explanation before getting down into
// the query stuff.
// These query functions are really only here so that they
// can have real functionality in subclasses (like QueryAtoms).
// Since pretty much it's gonna be a mistake to call any of these
// (ever), we're saddling them all with a precondition which
// is guaranteed to fail. I'd like to have them be pure virtual,
// but that doesn't work since we need to be able to instantiate
// Atoms.
// ------------------------------------
// This method can be used to distinguish query atoms from standard atoms:
virtual bool hasQuery() const { return false; }
virtual std::string getQueryType() const { return ""; }
//! NOT CALLABLE
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);
//! returns whether or not we match the argument
/*!
<b>Notes:</b>
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 |
*/
virtual bool Match(Atom const *what) const;
//! returns the perturbation order for a list of integers
/*!
This value is associated with chirality.
\param probe a list of bond indices. This must be the same
length as our number of incoming bonds (our degree).
\return 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: <tt>[0,1,2,3]</tt>
\verbatim
getPerturbationOrder([1,0,2,3]) = 1
getPerturbationOrder([1,2,3,0]) = 3
getPerturbationOrder([1,2,0,3]) = 2
\endverbatim
See the class documentation for a more detailed description
of our representation of chirality.
<b>Notes:</b>
- requires an owning molecule
*/
int getPerturbationOrder(const INT_LIST &probe) const;
//! calculates any of our lazy \c properties
/*!
<b>Notes:</b>
- requires an owning molecule
- the current lazy \c properties are implicit and explicit valence
*/
void updatePropertyCache(bool strict = true);
bool needsUpdatePropertyCache() const;
void clearPropertyCache();
//! calculates and returns our explicit valence
/*!
<b>Notes:</b>
- requires an owning molecule
*/
int calcExplicitValence(bool strict = true);
//! calculates and returns our implicit valence
/*!
<b>Notes:</b>
- requires an owning molecule
*/
int calcImplicitValence(bool strict = true);
AtomMonomerInfo *getMonomerInfo() { return dp_monomerInfo; }
const AtomMonomerInfo *getMonomerInfo() const { return dp_monomerInfo; }
//! takes ownership of the pointer
void setMonomerInfo(AtomMonomerInfo *info);
//! Set the atom map Number of the atom
void setAtomMapNum(int mapno, bool strict = true) {
PRECONDITION(
!strict || (mapno >= 0 && mapno < 1000),
"atom map number out of range [0..1000], use strict=false to override");
if (mapno) {
setProp(common_properties::molAtomMapNumber, mapno);
} else if (hasProp(common_properties::molAtomMapNumber)) {
clearProp(common_properties::molAtomMapNumber);
}
}
//! Gets the atom map Number of the atom, if no atom map exists, 0 is
//! returned.
int getAtomMapNum() const {
int mapno = 0;
getPropIfPresent(common_properties::molAtomMapNumber, mapno);
return mapno;
}
//! Flags that can be used by to store information on atoms.
//! These are not serialized and should be treated as temporary values.
//! No guarantees are made about preserving these flags across library
//! calls.
void setFlags(std::uint64_t flags) { d_flags = flags; }
std::uint64_t getFlags() const { return d_flags; }
std::uint64_t &getFlags() { return d_flags; }
protected:
//! sets our owning molecule
void setOwningMol(ROMol *other);
//! sets our owning molecule
void setOwningMol(ROMol &other) { setOwningMol(&other); }
bool df_isAromatic;
bool df_noImplicit;
std::uint8_t d_numExplicitHs;
std::int8_t d_formalCharge;
std::uint8_t d_atomicNum;
// NOTE that these cannot be signed, they are calculated using
// a lazy scheme and are initialized to -1 to indicate that the
// calculation has not yet been done.
std::int8_t d_implicitValence, 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;
std::uint64_t d_flags = 0ul;
ROMol *dp_mol;
AtomMonomerInfo *dp_monomerInfo;
void initAtom();
void initFromOther(const Atom &other);
};
//! Set the atom's MDL integer RLabel
/// Setting to 0 clears the rlabel. Rlabel must be in the range [0..99]
RDKIT_GRAPHMOL_EXPORT void setAtomRLabel(Atom *atm, int rlabel);
RDKIT_GRAPHMOL_EXPORT int getAtomRLabel(const Atom *atm);
//! Set the atom's MDL atom alias
/// Setting to an empty string clears the alias
RDKIT_GRAPHMOL_EXPORT void setAtomAlias(Atom *atom, const std::string &alias);
RDKIT_GRAPHMOL_EXPORT std::string getAtomAlias(const Atom *atom);
//! Set the atom's MDL atom value
/// Setting to an empty string clears the value
/// This is where recursive smarts get stored in MolBlock Queries
RDKIT_GRAPHMOL_EXPORT void setAtomValue(Atom *atom, const std::string &value);
RDKIT_GRAPHMOL_EXPORT std::string getAtomValue(const Atom *atom);
//! Sets the supplemental label that will follow the atom when writing
/// smiles strings.
RDKIT_GRAPHMOL_EXPORT void setSupplementalSmilesLabel(Atom *atom,
const std::string &label);
RDKIT_GRAPHMOL_EXPORT std::string getSupplementalSmilesLabel(const Atom *atom);
//! returns true if the atom is to the left of C
RDKIT_GRAPHMOL_EXPORT bool isEarlyAtom(int atomicNum);
//! returns true if the atom is aromatic or has an aromatic bond
RDKIT_GRAPHMOL_EXPORT bool isAromaticAtom(const Atom &atom);
//! returns the number of pi electrons on the atom
RDKIT_GRAPHMOL_EXPORT unsigned int numPiElectrons(const Atom &atom);
}; // namespace RDKit
//! allows Atom objects to be dumped to streams
RDKIT_GRAPHMOL_EXPORT std::ostream &operator<<(std::ostream &target,
const RDKit::Atom &at);
#endif
operator<<
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
Invariant.h
rdcast
#define rdcast
Definition Invariant.h:191
PRECONDITION
#define PRECONDITION(expr, mess)
Definition Invariant.h:108
QueryObjects.h
Pulls in all the query types.
RDProps.h
Queries::Query
Base class for all queries.
Definition Query.h:48
RDKit::AtomMonomerInfo
The abstract base class for atom-level monomer info.
Definition MonomerInfo.h:26
RDKit::Atom
The class for representing atoms.
Definition Atom.h:74
RDKit::Atom::copy
virtual Atom * copy() const
makes a copy of this Atom and returns a pointer to it.
RDKit::Atom::getChiralTag
ChiralType getChiralTag() const
returns our chiralTag
Definition Atom.h:244
RDKit::Atom::getMonomerInfo
AtomMonomerInfo * getMonomerInfo()
Definition Atom.h:368
RDKit::Atom::setNumExplicitHs
void setNumExplicitHs(unsigned int what)
sets our number of explicit Hs
Definition Atom.h:222
RDKit::Atom::operator=
Atom & operator=(const Atom &other)
RDKit::Atom::getFlags
std::uint64_t getFlags() const
Definition Atom.h:397
RDKit::Atom::initAtom
void initAtom()
RDKit::Atom::setHybridization
void setHybridization(HybridizationType what)
sets our hybridization
Definition Atom.h:249
RDKit::Atom::getOwningMol
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this instance
Definition Atom.h:156
RDKit::Atom::QUERYATOM_QUERY
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
Definition Atom.h:89
RDKit::Atom::needsUpdatePropertyCache
bool needsUpdatePropertyCache() const
RDKit::Atom::expandQuery
virtual void expandQuery(QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
RDKit::Atom::invertChirality
bool invertChirality()
inverts our chiralTag, returns whether or not a change was made
RDKit::Atom::d_index
atomindex_t d_index
Definition Atom.h:420
RDKit::Atom::getNoImplicit
bool getNoImplicit() const
returns the noImplicit flag
Definition Atom.h:219
RDKit::Atom::calculateImplicitValence
friend int calculateImplicitValence(const Atom &, bool, bool)
RDKit::Atom::Atom
Atom(unsigned int num)
construct an Atom with a particular atomic number
RDKit::Atom::hasValenceViolation
bool hasValenceViolation() const
returns whether the atom has a valency violation or not
RDKit::Atom::RWMol
friend class RWMol
Definition Atom.h:77
RDKit::Atom::getIdx
unsigned int getIdx() const
returns our index within the ROMol
Definition Atom.h:162
RDKit::Atom::setFlags
void setFlags(std::uint64_t flags)
Definition Atom.h:396
RDKit::Atom::getValence
unsigned int getValence(ValenceType which) const
returns the valence (explicit or implicit) of this atom
RDKit::Atom::getNumExplicitHs
unsigned int getNumExplicitHs() const
returns our number of explicit Hs
Definition Atom.h:224
RDKit::Atom::getNumRadicalElectrons
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
Definition Atom.h:207
RDKit::Atom::df_isAromatic
bool df_isAromatic
Definition Atom.h:406
RDKit::Atom::setNoImplicit
void setNoImplicit(bool what)
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs
Definition Atom.h:217
RDKit::Atom::Atom
Atom(const Atom &other)
RDKit::Atom::dp_mol
ROMol * dp_mol
Definition Atom.h:423
RDKit::Atom::setQuery
virtual void setQuery(QUERYATOM_QUERY *what)
NOT CALLABLE.
RDKit::Atom::getQueryType
virtual std::string getQueryType() const
Definition Atom.h:270
RDKit::Atom::d_implicitValence
std::int8_t d_implicitValence
Definition Atom.h:414
RDKit::Atom::getExplicitValence
int getExplicitValence() const
returns the explicit valence (including Hs) of this atom
RDKit::Atom::HybridizationType
HybridizationType
store hybridization
Definition Atom.h:92
RDKit::Atom::SP3
@ SP3
Definition Atom.h:97
RDKit::Atom::SP3D2
@ SP3D2
Definition Atom.h:100
RDKit::Atom::S
@ S
Definition Atom.h:94
RDKit::Atom::SP
@ SP
Definition Atom.h:95
RDKit::Atom::SP2D
@ SP2D
Definition Atom.h:98
RDKit::Atom::SP2
@ SP2
Definition Atom.h:96
RDKit::Atom::OTHER
@ OTHER
unrecognized hybridization
Definition Atom.h:101
RDKit::Atom::UNSPECIFIED
@ UNSPECIFIED
hybridization that hasn't been specified
Definition Atom.h:93
RDKit::Atom::SP3D
@ SP3D
Definition Atom.h:99
RDKit::Atom::getImplicitValence
int getImplicitValence() const
returns the implicit valence for this Atom
RDKit::Atom::ValenceType
ValenceType
Definition Atom.h:118
RDKit::Atom::updatePropertyCache
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
RDKit::Atom::Atom
Atom(Atom &&other)=default
RDKit::Atom::clearPropertyCache
void clearPropertyCache()
RDKit::Atom::setIdx
void setIdx(unsigned int index)
sets our index within the ROMol
Definition Atom.h:169
RDKit::Atom::setAtomicNum
void setAtomicNum(int newNum)
sets our atomic number
Definition Atom.h:147
RDKit::Atom::getTotalNumHs
unsigned int getTotalNumHs(bool includeNeighbors=false) const
returns the total number of Hs (implicit and explicit) that this Atom is bound to
RDKit::Atom::initFromOther
void initFromOther(const Atom &other)
RDKit::Atom::calcExplicitValence
int calcExplicitValence(bool strict=true)
calculates and returns our explicit valence
RDKit::Atom::getMonomerInfo
const AtomMonomerInfo * getMonomerInfo() const
Definition Atom.h:369
RDKit::Atom::NOATOM
static constexpr unsigned int NOATOM
Definition Atom.h:85
RDKit::Atom::setIsotope
void setIsotope(unsigned int what)
sets our isotope number
RDKit::Atom::MolPickler
friend class MolPickler
the pickler needs access to our privates
Definition Atom.h:75
RDKit::Atom::d_isotope
std::uint16_t d_isotope
Definition Atom.h:419
RDKit::Atom::setOwningMol
void setOwningMol(ROMol &other)
sets our owning molecule
Definition Atom.h:404
RDKit::Atom::d_atomicNum
std::uint8_t d_atomicNum
Definition Atom.h:410
RDKit::Atom::getAtomicNum
int getAtomicNum() const
returns our atomic number
Definition Atom.h:145
RDKit::Atom::calcImplicitValence
int calcImplicitValence(bool strict=true)
calculates and returns our implicit valence
RDKit::Atom::ChiralType
ChiralType
store type of chirality
Definition Atom.h:105
RDKit::Atom::CHI_OTHER
@ CHI_OTHER
some unrecognized type of chirality
Definition Atom.h:110
RDKit::Atom::CHI_TETRAHEDRAL
@ CHI_TETRAHEDRAL
tetrahedral, use permutation flag
Definition Atom.h:111
RDKit::Atom::CHI_ALLENE
@ CHI_ALLENE
allene, use permutation flag
Definition Atom.h:112
RDKit::Atom::CHI_TETRAHEDRAL_CW
@ CHI_TETRAHEDRAL_CW
tetrahedral: clockwise rotation (SMILES @@)
Definition Atom.h:107
RDKit::Atom::CHI_UNSPECIFIED
@ CHI_UNSPECIFIED
chirality that hasn't been specified
Definition Atom.h:106
RDKit::Atom::CHI_OCTAHEDRAL
@ CHI_OCTAHEDRAL
octahedral, use permutation flag
Definition Atom.h:115
RDKit::Atom::CHI_TETRAHEDRAL_CCW
@ CHI_TETRAHEDRAL_CCW
tetrahedral: counter-clockwise rotation (SMILES
Definition Atom.h:108
RDKit::Atom::CHI_TRIGONALBIPYRAMIDAL
@ CHI_TRIGONALBIPYRAMIDAL
trigonal bipyramidal, use permutation flag
Definition Atom.h:114
RDKit::Atom::CHI_SQUAREPLANAR
@ CHI_SQUAREPLANAR
square planar, use permutation flag
Definition Atom.h:113
RDKit::Atom::getNumImplicitHs
unsigned int getNumImplicitHs() const
returns the number of implicit Hs this Atom is bound to
RDKit::Atom::df_noImplicit
bool df_noImplicit
Definition Atom.h:407
RDKit::Atom::ROMol
friend class ROMol
Definition Atom.h:76
RDKit::Atom::getPerturbationOrder
int getPerturbationOrder(const INT_LIST &probe) const
returns the perturbation order for a list of integers
RDKit::Atom::dp_monomerInfo
AtomMonomerInfo * dp_monomerInfo
Definition Atom.h:424
RDKit::Atom::getAtomMapNum
int getAtomMapNum() const
Definition Atom.h:386
RDKit::Atom::setAtomMapNum
void setAtomMapNum(int mapno, bool strict=true)
Set the atom map Number of the atom.
Definition Atom.h:374
RDKit::Atom::hasQuery
virtual bool hasQuery() const
Definition Atom.h:268
RDKit::Atom::setFormalCharge
void setFormalCharge(int what)
set's the formal charge of this atom
Definition Atom.h:213
RDKit::Atom::d_formalCharge
std::int8_t d_formalCharge
Definition Atom.h:409
RDKit::Atom::d_hybrid
std::uint8_t d_hybrid
Definition Atom.h:417
RDKit::Atom::getSymbol
std::string getSymbol() const
returns our symbol (determined by our atomic number)
RDKit::Atom::Match
virtual bool Match(Atom const *what) const
returns whether or not we match the argument
RDKit::Atom::setChiralTag
void setChiralTag(ChiralType what)
sets our chiralTag
Definition Atom.h:240
RDKit::Atom::setMonomerInfo
void setMonomerInfo(AtomMonomerInfo *info)
takes ownership of the pointer
RDKit::Atom::getHybridization
HybridizationType getHybridization() const
returns our hybridization
Definition Atom.h:251
RDKit::Atom::getIsAromatic
bool getIsAromatic() const
returns our isAromatic flag
Definition Atom.h:229
RDKit::Atom::getTotalValence
unsigned int getTotalValence() const
returns the total valence (implicit and explicit) for an atom
RDKit::Atom::Atom
Atom(const std::string &what)
RDKit::Atom::d_numRadicalElectrons
std::uint8_t d_numRadicalElectrons
Definition Atom.h:415
RDKit::Atom::setIsAromatic
void setIsAromatic(bool what)
sets our isAromatic flag, indicating whether or not we are aromatic
Definition Atom.h:227
RDKit::Atom::getFormalCharge
int getFormalCharge() const
returns the formal charge of this atom
Definition Atom.h:211
RDKit::Atom::operator=
Atom & operator=(Atom &&other)=default
RDKit::Atom::getMass
double getMass() const
returns our mass
RDKit::Atom::getIsotope
unsigned int getIsotope() const
returns our isotope number
Definition Atom.h:237
RDKit::Atom::getTotalDegree
unsigned int getTotalDegree() const
RDKit::Atom::getFlags
std::uint64_t & getFlags()
Definition Atom.h:398
RDKit::Atom::d_explicitValence
std::int8_t d_explicitValence
Definition Atom.h:414
RDKit::Atom::setIdx
void setIdx(const U index)
overload
Definition Atom.h:172
RDKit::Atom::d_flags
std::uint64_t d_flags
Definition Atom.h:421
RDKit::Atom::getQuery
virtual QUERYATOM_QUERY * getQuery() const
NOT CALLABLE.
RDKit::Atom::setNumRadicalElectrons
void setNumRadicalElectrons(unsigned int num)
Definition Atom.h:208
RDKit::Atom::hasOwningMol
bool hasOwningMol() const
returns whether or not this instance belongs to a molecule
Definition Atom.h:153
RDKit::Atom::setOwningMol
void setOwningMol(ROMol *other)
sets our owning molecule
RDKit::Atom::d_chiralTag
std::uint8_t d_chiralTag
Definition Atom.h:416
RDKit::Atom::Atom
Atom()
RDKit::Atom::d_numExplicitHs
std::uint8_t d_numExplicitHs
Definition Atom.h:408
RDKit::Atom::~Atom
virtual ~Atom()
RDKit::Atom::getDegree
unsigned int getDegree() const
RDKit::RDProps::clearProp
void clearProp(const std::string_view key) const
clears the value of a property
Definition RDProps.h:142
RDKit::RDProps::setProp
void setProp(const std::string_view key, T val, bool computed=false) const
sets a property value
Definition RDProps.h:80
RDKit::RDProps::getPropIfPresent
bool getPropIfPresent(const std::string_view key, T &res) const
Definition RDProps.h:127
RDKit::RDProps::RDProps
RDProps()
Definition RDProps.h:25
RDKit::RDProps::hasProp
bool hasProp(const std::string_view key) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition RDProps.h:132
details.h
export.h
RDKIT_GRAPHMOL_EXPORT
#define RDKIT_GRAPHMOL_EXPORT
Definition export.h:257
Queries::CompositeQueryType
CompositeQueryType
Definition QueryObjects.h:36
Queries::COMPOSITE_AND
@ COMPOSITE_AND
Definition QueryObjects.h:36
RDKit::common_properties::molAtomMapNumber
constexpr std::string_view molAtomMapNumber
Definition types.h:160
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::INT_LIST
std::list< int > INT_LIST
Definition types.h:232
RDKit::getAtomValue
RDKIT_GRAPHMOL_EXPORT std::string getAtomValue(const Atom *atom)
RDKit::getAtomAlias
RDKIT_GRAPHMOL_EXPORT std::string getAtomAlias(const Atom *atom)
RDKit::setAtomRLabel
RDKIT_GRAPHMOL_EXPORT void setAtomRLabel(Atom *atm, int rlabel)
RDKit::isAromaticAtom
RDKIT_GRAPHMOL_EXPORT bool isAromaticAtom(const Atom &atom)
returns true if the atom is aromatic or has an aromatic bond
RDKit::getSupplementalSmilesLabel
RDKIT_GRAPHMOL_EXPORT std::string getSupplementalSmilesLabel(const Atom *atom)
RDKit::setAtomAlias
RDKIT_GRAPHMOL_EXPORT void setAtomAlias(Atom *atom, const std::string &alias)
RDKit::getAtomRLabel
RDKIT_GRAPHMOL_EXPORT int getAtomRLabel(const Atom *atm)
RDKit::setAtomValue
RDKIT_GRAPHMOL_EXPORT void setAtomValue(Atom *atom, const std::string &value)
RDKit::numPiElectrons
RDKIT_GRAPHMOL_EXPORT unsigned int numPiElectrons(const Atom &atom)
returns the number of pi electrons on the atom
RDKit::isEarlyAtom
RDKIT_GRAPHMOL_EXPORT bool isEarlyAtom(int atomicNum)
returns true if the atom is to the left of C
RDKit::atomindex_t
std::uint32_t atomindex_t
Definition details.h:14
RDKit::setSupplementalSmilesLabel
RDKIT_GRAPHMOL_EXPORT void setSupplementalSmilesLabel(Atom *atom, const std::string &label)
types.h