20 #include <boost/foreach.hpp> 100 explicit Atom(
unsigned int num);
102 explicit Atom(std::string what);
155 unsigned int getTotalNumHs(
bool includeNeighbors=
false)
const;
248 virtual void setQuery(QUERYATOM_QUERY *what);
251 virtual QUERYATOM_QUERY *
getQuery()
const;
255 bool maintainOrder=
true);
286 virtual bool Match(
Atom const *what)
const;
288 virtual inline bool Match(
const ATOM_SPTR &what)
const {
289 return Match(what.get());
312 template <
typename T>
313 void setProp(
const char *key, T val,
bool computed=
false)
const{
316 std::string what(key);
321 template <
typename T>
322 void setProp(
const std::string &key, T val,
bool computed=
false)
const {
326 if (std::find(compLst.begin(), compLst.end(), key) == compLst.end()) {
327 compLst.push_back(key);
349 template <
typename T>
354 template <
typename T>
355 void getProp(
const std::string &key,T &res)
const {
360 template <
typename T>
365 template <
typename T>
372 template <
typename T>
377 template <
typename T>
403 std::string what(key);
410 STR_VECT_I svi = std::find(compLst.begin(), compLst.end(), key);
411 if (svi != compLst.end()) {
424 BOOST_FOREACH(
const std::string &sv,compLst){
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Atom
unrecognized hybridization
std::list< int > INT_LIST
void setNumRadicalElectrons(unsigned int num)
void setChiralTag(ChiralType what)
sets our chiralTag
virtual Atom * copy() const
makes a copy of this Atom and returns a pointer to it.
unsigned int getTotalValence() const
returns the total valence (implicit and explicit) for an atom
bool getNoImplicit() const
returns the noImplicit flag
void setVal(const std::string &what, T &val)
Sets the value associated with a key.
int getPerturbationOrder(INT_LIST probe) const
returns the perturbation order for a list of integers
void invertChirality()
inverts our chiralTag
The abstract base class for atom-level monomer info.
STR_VECT keys() const
Returns the set of keys in the dictionary.
RWMol is a molecule class that is intended to be edited.
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
hybridization that hasn't been specified
unsigned int getTotalNumHs(bool includeNeighbors=false) const
returns the total number of Hs (implicit and explicit) that this Atom is bound to ...
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...
virtual void setQuery(QUERYATOM_QUERY *what)
NOT CALLABLE.
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
unsigned int getIsotope() const
returns our isotope number
double getMass() const
returns our mass
void clearComputedProps() const
clears all of our computed properties
void clearProp(const char *key) const
clears the value of a property
T getProp(const char *key) const
unsigned int getIdx() const
returns our index within the ROMol
boost::uint8_t d_chiralTag
void setProp(const std::string &key, T val, bool computed=false) const
some unrecognized type of chirality
STR_VECT getPropList() const
returns a list with the names of our properties
void getProp(const char *key, T &res) const
allows retrieval of a particular property value
boost::int8_t d_explicitValence
virtual bool Match(Atom const *what) const
returns whether or not we match the argument
virtual bool Match(const ATOM_SPTR &what) const
ROMol is a molecule class that is intended to have a fixed topology.
unsigned int getDegree() const
void clearVal(const std::string &what)
Clears the value associated with a particular key, removing the key from the dictionary.
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
void getVal(const std::string &what, T &res) const
Gets the value associated with a particular key.
virtual bool hasQuery() const
tetrahedral: clockwise rotation (SMILES @@)
bool hasProp(const std::string &key) const
unsigned int getTotalDegree() const
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.
int getAtomicNum() const
returns our atomic number
AtomMonomerInfo * getMonomerInfo()
void getProp(const std::string &key, T &res) const
void setAtomicNum(int newNum)
sets our atomic number
void setIsotope(unsigned int what)
sets our isotope number
int getExplicitValence() const
returns the explicit valence (including Hs) of this atom
void setHybridization(HybridizationType what)
sets our hybridization
ChiralType
store type of chirality
void setProp(const char *key, T val, bool computed=false) const
sets a property value
void setMonomerInfo(AtomMonomerInfo *info)
takes ownership of the pointer
unsigned int getNumExplicitHs() const
returns our number of explict Hs
Includes a bunch of functionality for handling Atom and Bond queries.
HybridizationType
store hybridization
const std::string computedPropName
ChiralType getChiralTag() const
returns our chiralTag
int calcExplicitValence(bool strict=true)
calculates and returns our explicit valence
virtual QUERYATOM_QUERY * getQuery() const
NOT CALLABLE.
unsigned int getNumImplicitHs() const
returns the number of implicit Hs this Atom is bound to
bool hasVal(const char *what) const
Returns whether or not the dictionary contains a particular key.
void setOwningMol(ROMol *other)
sets our owning molecule
T getProp(const std::string &key) const
int getImplicitValence() const
returns the implicit valence for this Atom
tetrahedral: counter-clockwise rotation (SMILES @)
handles pickling (serializing) molecules
boost::uint16_t d_isotope
bool needsUpdatePropertyCache() const
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 char *key) const
returns whether or not we have a property with name key
const AtomMonomerInfo * getMonomerInfo() const
void clearProp(const std::string &key) const
std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
boost::uint16_t atomindex_t
void setNoImplicit(bool what)
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs ...
bool getPropIfPresent(const char *key, T &res) const
HybridizationType getHybridization() const
returns our hybridization
std::string getSymbol() const
returns our symbol (determined by our atomic number)
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
chirality that hasn't been specified
int getFormalCharge() const
returns the formal charge of this atom
boost::uint8_t d_numRadicalElectrons
bool getPropIfPresent(const std::string &key, T &res) const
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
std::vector< std::string > STR_VECT
bool getIsAromatic() const
returns our isAromatic flag