79 friend std::ostream &(::operator<<)(std::ostream &target,
const Atom &at);
114 explicit Atom(
unsigned int num);
117 explicit Atom(
const std::string &what);
151 unsigned int getIdx()
const {
return d_index; }
158 void setIdx(
unsigned int index) { d_index = index; }
162 setIdx(rdcast<unsigned int>(index));
299 bool maintainOrder =
true);
393 !strict || (mapno >= 0 && mapno < 1000),
394 "atom map number out of range [0..1000], use strict=false to override");
396 setProp(common_properties::molAtomMapNumber, mapno);
397 }
else if (hasProp(common_properties::molAtomMapNumber)) {
398 clearProp(common_properties::molAtomMapNumber);
405 getPropIfPresent(common_properties::molAtomMapNumber, mapno);
456 const std::string &label);
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
#define PRECONDITION(expr, mess)
Pulls in all the query types.
Base class for all queries.
The abstract base class for atom-level monomer info.
The class for representing atoms.
virtual Atom * copy() const
makes a copy of this Atom and returns a pointer to it.
ChiralType getChiralTag() const
returns our chiralTag
AtomMonomerInfo * getMonomerInfo()
void setNumExplicitHs(unsigned int what)
sets our number of explicit Hs
Atom & operator=(const Atom &other)
void setHybridization(HybridizationType what)
sets our hybridization
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this instance
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
bool needsUpdatePropertyCache() const
virtual void expandQuery(QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
bool invertChirality()
inverts our chiralTag, returns whether or not a change was made
bool getNoImplicit() const
returns the noImplicit flag
Atom(unsigned int num)
construct an Atom with a particular atomic number
bool hasValenceViolation() const
returns whether the atom has a valency violation or not
unsigned int getIdx() const
returns our index within the ROMol
unsigned int getNumExplicitHs() const
returns our number of explicit Hs
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
void setNoImplicit(bool what)
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs
virtual void setQuery(QUERYATOM_QUERY *what)
NOT CALLABLE.
virtual std::string getQueryType() const
int getExplicitValence() const
returns the explicit valence (including Hs) of this atom
HybridizationType
store hybridization
int getImplicitValence() const
returns the implicit valence for this Atom
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
Atom(Atom &&other)=default
void setIdx(unsigned int index)
sets our index within the ROMol
void setAtomicNum(int newNum)
sets our atomic number
unsigned int getTotalNumHs(bool includeNeighbors=false) const
returns the total number of Hs (implicit and explicit) that this Atom is bound to
void initFromOther(const Atom &other)
int calcExplicitValence(bool strict=true)
calculates and returns our explicit valence
const AtomMonomerInfo * getMonomerInfo() const
void setIsotope(unsigned int what)
sets our isotope number
void setOwningMol(ROMol &other)
sets our owning molecule
int getAtomicNum() const
returns our atomic number
int calcImplicitValence(bool strict=true)
calculates and returns our implicit valence
ChiralType
store type of chirality
@ CHI_OTHER
some unrecognized type of chirality
@ CHI_TETRAHEDRAL
tetrahedral, use permutation flag
@ CHI_ALLENE
allene, use permutation flag
@ CHI_TETRAHEDRAL_CW
tetrahedral: clockwise rotation (SMILES @@)
@ CHI_TETRAHEDRAL_CCW
tetrahedral: counter-clockwise rotation (SMILES
@ CHI_TRIGONALBIPYRAMIDAL
trigonal bipyramidal, use permutation flag
@ CHI_SQUAREPLANAR
square planar, use permutation flag
unsigned int getNumImplicitHs() const
returns the number of implicit Hs this Atom is bound to
int getPerturbationOrder(const INT_LIST &probe) const
returns the perturbation order for a list of integers
AtomMonomerInfo * dp_monomerInfo
int getAtomMapNum() const
void setAtomMapNum(int mapno, bool strict=true)
Set the atom map Number of the atom.
virtual bool hasQuery() const
void setFormalCharge(int what)
set's the formal charge of this atom
std::int8_t d_formalCharge
std::string getSymbol() const
returns our symbol (determined by our atomic number)
virtual bool Match(Atom const *what) const
returns whether or not we match the argument
void setChiralTag(ChiralType what)
sets our chiralTag
void setMonomerInfo(AtomMonomerInfo *info)
takes ownership of the pointer
HybridizationType getHybridization() const
returns our hybridization
bool getIsAromatic() const
returns our isAromatic flag
unsigned int getTotalValence() const
returns the total valence (implicit and explicit) for an atom
Atom(const std::string &what)
std::uint8_t d_numRadicalElectrons
void setIsAromatic(bool what)
sets our isAromatic flag, indicating whether or not we are aromatic
int getFormalCharge() const
returns the formal charge of this atom
Atom & operator=(Atom &&other)=default
double getMass() const
returns our mass
unsigned int getIsotope() const
returns our isotope number
unsigned int getTotalDegree() const
std::int8_t d_explicitValence
void setIdx(const U index)
overload
virtual QUERYATOM_QUERY * getQuery() const
NOT CALLABLE.
void setNumRadicalElectrons(unsigned int num)
bool hasOwningMol() const
returns whether or not this instance belongs to a molecule
void setOwningMol(ROMol *other)
sets our owning molecule
std::uint8_t d_numExplicitHs
unsigned int getDegree() const
handles pickling (serializing) molecules
RWMol is a molecule class that is intended to be edited.
#define RDKIT_GRAPHMOL_EXPORT
std::list< int > INT_LIST
RDKIT_GRAPHMOL_EXPORT std::string getAtomValue(const Atom *atom)
bool rdvalue_is(const RDValue_cast_t)
RDKIT_GRAPHMOL_EXPORT std::string getAtomAlias(const Atom *atom)
RDKIT_GRAPHMOL_EXPORT void setAtomRLabel(Atom *atm, int rlabel)
RDKIT_GRAPHMOL_EXPORT bool isAromaticAtom(const Atom &atom)
returns true if the atom is aromatic or has an aromatic bond
RDKIT_GRAPHMOL_EXPORT std::string getSupplementalSmilesLabel(const Atom *atom)
RDKIT_GRAPHMOL_EXPORT void setAtomAlias(Atom *atom, const std::string &alias)
RDKIT_GRAPHMOL_EXPORT int getAtomRLabel(const Atom *atm)
RDKIT_GRAPHMOL_EXPORT void setAtomValue(Atom *atom, const std::string &value)
RDKIT_GRAPHMOL_EXPORT unsigned int numPiElectrons(const Atom &atom)
returns the number of pi electrons on the atom
RDKIT_GRAPHMOL_EXPORT bool isEarlyAtom(int atomicNum)
returns true if the atom is to the left of C
std::uint32_t atomindex_t
RDKIT_GRAPHMOL_EXPORT void setSupplementalSmilesLabel(Atom *atom, const std::string &label)