20 #include <boost/foreach.hpp> 101 explicit Atom(
unsigned int num);
104 explicit Atom(
const std::string &what);
137 setIdx(rdcast<unsigned int>(index));
161 unsigned int getTotalNumHs(
bool includeNeighbors =
false)
const;
240 return static_cast<HybridizationType
>(
d_hybrid);
259 virtual void setQuery(QUERYATOM_QUERY *what);
262 virtual QUERYATOM_QUERY *
getQuery()
const;
265 QUERYATOM_QUERY *what,
267 bool maintainOrder =
true);
301 virtual bool Match(
Atom const *what)
const;
303 virtual inline bool Match(
const ATOM_SPTR &what)
const {
304 return Match(what.get());
324 template <
typename T>
325 void setProp(
const char *key, T val,
bool computed =
false)
const {
327 std::string what(key);
332 template <
typename T>
333 void setProp(
const std::string &key, T val,
bool computed =
false)
const {
337 if (std::find(compLst.begin(), compLst.end(), key) == compLst.end()) {
338 compLst.push_back(key);
362 template <
typename T>
367 template <
typename T>
368 void getProp(
const std::string &key, T &res)
const {
373 template <
typename T>
378 template <
typename T>
385 template <
typename T>
390 template <
typename T>
415 std::string what(key);
422 STR_VECT_I svi = std::find(compLst.begin(), compLst.end(), key);
423 if (svi != compLst.end()) {
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
virtual QUERYATOM_QUERY * getQuery() const
NOT CALLABLE.
unrecognized hybridization
std::list< int > INT_LIST
void setNumRadicalElectrons(unsigned int num)
void setChiralTag(ChiralType what)
sets our chiralTag
unsigned int getTotalValence() const
returns the total valence (implicit and explicit) for an atom
void setVal(const std::string &what, T &val)
Sets the value associated with a key.
bool getPropIfPresent(const std::string &key, T &res) const
void invertChirality()
inverts our chiralTag
T getProp(const char *key) const
The abstract base class for atom-level monomer info.
bool needsUpdatePropertyCache() const
RWMol is a molecule class that is intended to be edited.
bool hasVal(const char *what) const
Returns whether or not the dictionary contains a particular key.
hybridization that hasn't been specified
int getImplicitValence() const
returns the implicit valence for this Atom
virtual void setQuery(QUERYATOM_QUERY *what)
NOT CALLABLE.
HybridizationType getHybridization() const
returns our hybridization
STR_VECT getPropList() const
returns a list with the names of our properties
unsigned int getTotalNumHs(bool includeNeighbors=false) const
returns the total number of Hs (implicit and explicit) that this Atom is bound to ...
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
virtual bool Match(Atom const *what) const
returns whether or not we match the argument
some unrecognized type of chirality
boost::int8_t d_explicitValence
bool getValIfPresent(const std::string &what, T &res) const
Potentially gets the value associated with a particular key returns true on success/false on failure...
ROMol is a molecule class that is intended to have a fixed topology.
double getMass() const
returns our mass
int getExplicitValence() const
returns the explicit valence (including Hs) of this atom
void getVal(const std::string &what, T &res) const
Gets the value associated with a particular key.
void clearVal(const std::string &what)
Clears the value associated with a particular key, removing the key from the dictionary.
void setIdx(const U index)
overload
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
bool hasProp(const char *key) const
returns whether or not we have a property with name key
unsigned int getIsotope() const
returns our isotope number
tetrahedral: clockwise rotation (SMILES @@)
void setNumExplicitHs(unsigned int what)
sets our number of explict Hs
virtual void expandQuery(QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
AtomMonomerInfo * getMonomerInfo()
T getProp(const std::string &key) const
void setAtomicNum(int newNum)
sets our atomic number
void setIsotope(unsigned int what)
sets our isotope number
void setProp(const std::string &key, T val, bool computed=false) const
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
Includes a bunch of functionality for handling Atom and Bond queries.
STR_VECT keys() const
Returns the set of keys in the dictionary.
HybridizationType
store hybridization
bool getPropIfPresent(const char *key, T &res) const
int getAtomicNum() const
returns our atomic number
unsigned int getNumImplicitHs() const
returns the number of implicit Hs this Atom is bound to
const std::string computedPropName
int calcExplicitValence(bool strict=true)
calculates and returns our explicit valence
virtual bool hasQuery() const
void setOwningMol(ROMol *other)
sets our owning molecule
bool getNoImplicit() const
returns the noImplicit flag
void getProp(const std::string &key, T &res) const
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
int calcImplicitValence(bool strict=true)
calculates and returns our implicit valence
boost::shared_ptr< Atom > ATOM_SPTR
boost::uint8_t d_atomicNum
bool hasProp(const std::string &key) const
virtual bool Match(const ATOM_SPTR &what) const
std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
int getPerturbationOrder(INT_LIST probe) const
returns the perturbation order for a list of integers
boost::uint16_t atomindex_t
void setNoImplicit(bool what)
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs ...
unsigned int getDegree() const
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Atom
void setIdx(unsigned int index)
sets our index within the ROMol
boost::shared_ptr< const Atom > C_ATOM_SPTR
boost::int8_t d_formalCharge
boost::int8_t d_implicitValence
AtomMonomerInfo * dp_monomerInfo
Pulls in all the query types.
std::vector< std::string >::iterator STR_VECT_I
void clearProp(const char *key) const
clears the value of a property
ChiralType getChiralTag() const
returns our chiralTag
chirality that hasn't been specified
unsigned int getTotalDegree() const
void setProp(const char *key, T val, bool computed=false) const
sets a property value
void clearComputedProps() const
clears all of our computed properties
std::string getSymbol() const
returns our symbol (determined by our atomic number)
boost::uint8_t d_numRadicalElectrons
Base class for all queries.
void setFormalCharge(int what)
set's the formal charge of this atom
The Dict class can be used to store objects of arbitrary type keyed by strings.
boost::uint8_t d_numExplicitHs
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
void getProp(const char *key, T &res) const
allows retrieval of a particular property value
std::vector< std::string > STR_VECT
void clearProp(const std::string &key) const
virtual Atom * copy() const
makes a copy of this Atom and returns a pointer to it.