78 friend std::ostream &(::operator<<)(std::ostream &target,
79 const ::RDKit::Atom &at);
85 inline static constexpr unsigned int NOATOM =
86 std::numeric_limits<unsigned int>::max();
125 explicit Atom(
unsigned int num);
128 explicit Atom(
const std::string &what);
281 bool maintainOrder =
true);
376 !strict || (mapno >= 0 && mapno < 1000),
377 "atom map number out of range [0..1000], use strict=false to override");
448 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)
std::uint64_t getFlags() const
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
friend int calculateImplicitValence(const Atom &, bool, bool)
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
void setFlags(std::uint64_t flags)
unsigned int getValence(ValenceType which) const
returns the valence (explicit or implicit) of this atom
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
std::int8_t d_implicitValence
int getExplicitValence() const
returns the explicit valence (including Hs) of this atom
HybridizationType
store hybridization
@ OTHER
unrecognized hybridization
@ UNSPECIFIED
hybridization that hasn't been specified
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 clearPropertyCache()
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
static constexpr unsigned int NOATOM
void setIsotope(unsigned int what)
sets our isotope number
friend class MolPickler
the pickler needs access to our privates
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_UNSPECIFIED
chirality that hasn't been specified
@ CHI_OCTAHEDRAL
octahedral, use permutation flag
@ 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::uint64_t & getFlags()
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
bool getPropIfPresent(const std::string &key, T &res) const
void clearProp(const std::string &key) const
clears the value of a property
bool hasProp(const std::string &key) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setProp(const std::string &key, T val, bool computed=false) const
sets a property value
#define RDKIT_GRAPHMOL_EXPORT
RDKIT_RDGENERAL_EXPORT const std::string molAtomMapNumber
std::list< int > INT_LIST
RDKIT_GRAPHMOL_EXPORT std::string getAtomValue(const Atom *atom)
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)