21 #include <boost/foreach.hpp> 101 explicit Atom(
unsigned int num);
104 explicit Atom(
const std::string &what);
112 virtual Atom *copy()
const;
120 std::string getSymbol()
const;
129 unsigned int getIdx()
const {
return d_index; };
136 void setIdx(
unsigned int index) { d_index = index; };
140 setIdx(rdcast<unsigned int>(index));
148 unsigned int getDegree()
const;
156 unsigned int getTotalDegree()
const;
164 unsigned int getTotalNumHs(
bool includeNeighbors =
false)
const;
172 unsigned int getTotalValence()
const;
179 unsigned int getNumImplicitHs()
const;
182 int getExplicitValence()
const;
189 int getImplicitValence()
const;
198 d_numRadicalElectrons = num;
223 double getMass()
const;
226 void setIsotope(
unsigned int what);
233 void invertChirality();
236 return static_cast<ChiralType
>(d_chiralTag);
243 return static_cast<HybridizationType
>(d_hybrid);
262 virtual void setQuery(QUERYATOM_QUERY *what);
265 virtual QUERYATOM_QUERY *getQuery()
const;
267 virtual void expandQuery(
268 QUERYATOM_QUERY *what,
270 bool maintainOrder =
true);
304 virtual bool Match(
Atom const *what)
const;
330 int getPerturbationOrder(
INT_LIST probe)
const;
338 void updatePropertyCache(
bool strict =
true);
340 bool needsUpdatePropertyCache()
const;
347 int calcExplicitValence(
bool strict =
true);
354 int calcImplicitValence(
bool strict =
true);
364 !strict || (mapno >= 0 && mapno < 1000),
365 "atom map number out of range [0..1000], use strict=false to override");
382 void setOwningMol(
ROMol *other);
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
std::list< int > INT_LIST
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
void setNumRadicalElectrons(unsigned int num)
void setChiralTag(ChiralType what)
sets our chiralTag
RDKIT_RDGENERAL_EXPORT const std::string molAtomMapNumber
The abstract base class for atom-level monomer info.
RDKIT_GRAPHMOL_EXPORT void setAtomAlias(Atom *atom, const std::string &alias)
Set the atom's MDL atom alias.
RDKIT_GRAPHMOL_EXPORT void setAtomRLabel(Atom *atm, int rlabel)
Set the atom's MDL integer RLabel.
RWMol is a molecule class that is intended to be edited.
RDKIT_GRAPHMOL_EXPORT std::string getAtomValue(const Atom *atom)
HybridizationType getHybridization() const
returns our hybridization
RDKIT_GRAPHMOL_EXPORT void setAtomValue(Atom *atom, const std::string &value)
Set the atom's MDL atom value.
bool getIsAromatic() const
returns our isAromatic flag
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
boost::uint8_t d_chiralTag
RDKIT_GRAPHMOL_EXPORT std::string getAtomAlias(const Atom *atom)
void setIdx(const U index)
overload
#define RDKIT_GRAPHMOL_EXPORT
unsigned int getIsotope() const
returns our isotope number
tetrahedral: clockwise rotation (SMILES @@)
void setNumExplicitHs(unsigned int what)
sets our number of explict Hs
AtomMonomerInfo * getMonomerInfo()
void setAtomicNum(int newNum)
sets our atomic number
void setHybridization(HybridizationType what)
sets our hybridization
int getFormalCharge() const
returns the formal charge of this atom
unsigned int getIdx() const
returns our index within the ROMol
ChiralType
store type of chirality
void setMonomerInfo(AtomMonomerInfo *info)
takes ownership of the pointer
HybridizationType
store hybridization
int getAtomicNum() const
returns our atomic number
virtual bool hasQuery() const
bool getNoImplicit() const
returns the noImplicit flag
const AtomMonomerInfo * getMonomerInfo() const
tetrahedral: counter-clockwise rotation (SMILES
unsigned int getNumExplicitHs() const
returns our number of explict Hs
handles pickling (serializing) molecules
boost::uint16_t d_isotope
boost::uint8_t d_atomicNum
#define PRECONDITION(expr, mess)
int getAtomMapNum() const
void setNoImplicit(bool what)
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs ...
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Atom
void setIdx(unsigned int index)
sets our index within the ROMol
RDKIT_GRAPHMOL_EXPORT int getAtomRLabel(const Atom *atm)
boost::int8_t d_formalCharge
boost::int8_t d_implicitValence
AtomMonomerInfo * dp_monomerInfo
Pulls in all the query types.
RDKIT_GRAPHMOL_EXPORT std::string getSupplementalSmilesLabel(const Atom *atom)
ChiralType getChiralTag() const
returns our chiralTag
RDKIT_GRAPHMOL_EXPORT void setSupplementalSmilesLabel(Atom *atom, const std::string &label)
Sets the supplemental label that will follow the atom when writing.
boost::uint8_t d_numRadicalElectrons
boost::uint32_t atomindex_t
Base class for all queries.
void setFormalCharge(int what)
set's the formal charge of this atom
boost::uint8_t d_numExplicitHs
void setAtomMapNum(int mapno, bool strict=true)
Set the atom map Number of the atom.
void setOwningMol(ROMol &other)
sets our owning molecule
The class for representing atoms.
void setIsAromatic(bool what)
sets our isAromatic flag, indicating whether or not we are aromatic