 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
21 #include <boost/foreach.hpp>
101 explicit Atom(
unsigned int num);
104 explicit Atom(
const std::string &what);
133 unsigned int getIdx()
const {
return d_index; };
140 void setIdx(
unsigned int index) { d_index = index; };
144 setIdx(rdcast<unsigned int>(index));
202 d_numRadicalElectrons = num;
274 bool maintainOrder =
true);
368 !strict || (mapno >= 0 && mapno < 1000),
369 "atom map number out of range [0..1000], use strict=false to override");
431 const std::string &label);
RDKIT_GRAPHMOL_EXPORT bool isEarlyAtom(int atomicNum)
returns whether or not the atom is to the left of C
std::int8_t d_formalCharge
std::string getSymbol() const
returns our symbol (determined by our atomic number)
ChiralType getChiralTag() const
returns our chiralTag
bool hasOwningMol() const
returns whether or not this instance belongs to a molecule
virtual void setQuery(QUERYATOM_QUERY *what)
NOT CALLABLE.
unsigned int getIsotope() const
returns our isotope number
unsigned int getTotalDegree() const
void setIdx(const U index)
overload
RDKIT_GRAPHMOL_EXPORT std::string getAtomValue(const Atom *atom)
unsigned int getTotalValence() const
returns the total valence (implicit and explicit) for an atom
std::int8_t d_implicitValence
void initFromOther(const Atom &other)
Pulls in all the query types.
RDKIT_GRAPHMOL_EXPORT int getAtomRLabel(const Atom *atm)
virtual bool hasQuery() const
unsigned int getNumExplicitHs() const
returns our number of explicit Hs
HybridizationType
store hybridization
The abstract base class for atom-level monomer info.
RWMol is a molecule class that is intended to be edited.
int getAtomMapNum() const
void setOwningMol(ROMol &other)
sets our owning molecule
ChiralType
store type of chirality
RDKIT_GRAPHMOL_EXPORT void setAtomRLabel(Atom *atm, int rlabel)
Set the atom's MDL integer RLabel.
virtual QUERYATOM_QUERY * getQuery() const
NOT CALLABLE.
void setAtomicNum(int newNum)
sets our atomic number
void setAtomMapNum(int mapno, bool strict=true)
Set the atom map Number of the atom.
int getAtomicNum() const
returns our atomic number
unsigned int getIdx() const
returns our index within the ROMol
@ CHI_TETRAHEDRAL_CW
tetrahedral: clockwise rotation (SMILES @@)
int getExplicitValence() const
returns the explicit valence (including Hs) of this atom
int getImplicitValence() const
returns the implicit valence for this Atom
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
Atom(unsigned int num)
construct an Atom with a particular atomic number
RDKIT_GRAPHMOL_EXPORT void setAtomAlias(Atom *atom, const std::string &alias)
Set the atom's MDL atom alias.
virtual Atom * copy() const
makes a copy of this Atom and returns a pointer to it.
The class for representing atoms.
void setMonomerInfo(AtomMonomerInfo *info)
takes ownership of the pointer
void setNumRadicalElectrons(unsigned int num)
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
void setIsAromatic(bool what)
sets our isAromatic flag, indicating whether or not we are aromatic
RDKIT_GRAPHMOL_EXPORT void setSupplementalSmilesLabel(Atom *atom, const std::string &label)
Sets the supplemental label that will follow the atom when writing.
void setNumExplicitHs(unsigned int what)
sets our number of explicit Hs
unsigned int getDegree() const
std::uint8_t d_numExplicitHs
std::uint8_t d_numRadicalElectrons
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this instance
#define RDKIT_GRAPHMOL_EXPORT
void setNoImplicit(bool what)
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs
void setIsotope(unsigned int what)
sets our isotope number
const AtomMonomerInfo * getMonomerInfo() const
int calcImplicitValence(bool strict=true)
calculates and returns our implicit valence
unsigned int getTotalNumHs(bool includeNeighbors=false) const
returns the total number of Hs (implicit and explicit) that this Atom is bound to
int calcExplicitValence(bool strict=true)
calculates and returns our explicit valence
int getFormalCharge() const
returns the formal charge of this atom
void setChiralTag(ChiralType what)
sets our chiralTag
HybridizationType getHybridization() const
returns our hybridization
virtual void expandQuery(QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
RDKIT_GRAPHMOL_EXPORT void setAtomValue(Atom *atom, const std::string &value)
Set the atom's MDL atom value.
double getMass() const
returns our mass
void invertChirality()
inverts our chiralTag
Atom(const std::string &what)
construct an Atom with a particular symbol (looked up in the
void setIdx(unsigned int index)
sets our index within the ROMol
bool getNoImplicit() const
returns the noImplicit flag
void setFormalCharge(int what)
set's the formal charge of this atom
void setHybridization(HybridizationType what)
sets our hybridization
int getPerturbationOrder(const INT_LIST &probe) const
returns the perturbation order for a list of integers
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
std::list< int > INT_LIST
#define PRECONDITION(expr, mess)
handles pickling (serializing) molecules
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
@ CHI_TETRAHEDRAL_CCW
tetrahedral: counter-clockwise rotation (SMILES
Base class for all queries.
std::uint32_t atomindex_t
unsigned int getNumImplicitHs() const
returns the number of implicit Hs this Atom is bound to
bool needsUpdatePropertyCache() const
bool getIsAromatic() const
returns our isAromatic flag
virtual bool Match(Atom const *what) const
returns whether or not we match the argument
AtomMonomerInfo * dp_monomerInfo
RDKIT_GRAPHMOL_EXPORT std::string getAtomAlias(const Atom *atom)
void setOwningMol(ROMol *other)
sets our owning molecule
AtomMonomerInfo * getMonomerInfo()
RDKIT_RDGENERAL_EXPORT const std::string molAtomMapNumber
Atom & operator=(const Atom &other)
RDKIT_GRAPHMOL_EXPORT std::string getSupplementalSmilesLabel(const Atom *atom)