![]() |
RDKit
Open-source cheminformatics and machine learning.
|
Class for storing atomic queries. More...
#include <QueryAtom.h>
Public Types | |
typedef Queries::Query< int, Atom const *, true > | QUERYATOM_QUERY |
![]() | |
enum | HybridizationType { UNSPECIFIED = 0, S, SP, SP2, SP3, SP3D, SP3D2, OTHER } |
store hybridization More... | |
enum | ChiralType { CHI_UNSPECIFIED = 0, CHI_TETRAHEDRAL_CW, CHI_TETRAHEDRAL_CCW, CHI_OTHER } |
store type of chirality More... | |
typedef Queries::Query< int, Atom const *, true > | QUERYATOM_QUERY |
Public Member Functions | |
QueryAtom () | |
QueryAtom (int num) | |
QueryAtom (const Atom &other) | |
QueryAtom (const QueryAtom &other) | |
QueryAtom & | operator= (const QueryAtom &other) |
~QueryAtom () | |
Atom * | copy () const |
returns a copy of this query, owned by the caller More... | |
bool | hasQuery () const |
void | setQuery (QUERYATOM_QUERY *what) |
replaces our current query with the value passed in More... | |
QUERYATOM_QUERY * | getQuery () const |
returns our current query More... | |
void | expandQuery (QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true) |
expands our current query More... | |
bool | Match (Atom const *what) const |
returns true if we match Atom what More... | |
bool | QueryMatch (QueryAtom const *what) const |
returns true if our query details match those of QueryAtom what More... | |
![]() | |
Atom () | |
Atom (unsigned int num) | |
construct an Atom with a particular atomic number More... | |
Atom (const std::string &what) | |
construct an Atom with a particular symbol (looked up in the More... | |
Atom (const Atom &other) | |
Atom & | operator= (const Atom &other) |
virtual | ~Atom () |
int | getAtomicNum () const |
returns our atomic number More... | |
void | setAtomicNum (int newNum) |
sets our atomic number More... | |
std::string | getSymbol () const |
returns our symbol (determined by our atomic number) More... | |
bool | hasOwningMol () const |
returns whether or not this instance belongs to a molecule More... | |
ROMol & | getOwningMol () const |
returns a reference to the ROMol that owns this instance More... | |
unsigned int | getIdx () const |
returns our index within the ROMol More... | |
void | setIdx (unsigned int index) |
sets our index within the ROMol More... | |
template<class U > | |
void | setIdx (const U index) |
overload More... | |
unsigned int | getDegree () const |
unsigned int | getTotalDegree () const |
unsigned int | getTotalNumHs (bool includeNeighbors=false) const |
returns the total number of Hs (implicit and explicit) that this Atom is bound to More... | |
unsigned int | getTotalValence () const |
returns the total valence (implicit and explicit) for an atom More... | |
unsigned int | getNumImplicitHs () const |
returns the number of implicit Hs this Atom is bound to More... | |
int | getExplicitValence () const |
returns the explicit valence (including Hs) of this atom More... | |
int | getImplicitValence () const |
returns the implicit valence for this Atom More... | |
unsigned int | getNumRadicalElectrons () const |
returns the number of radical electrons for this Atom More... | |
void | setNumRadicalElectrons (unsigned int num) |
int | getFormalCharge () const |
returns the formal charge of this atom More... | |
void | setFormalCharge (int what) |
set's the formal charge of this atom More... | |
void | setNoImplicit (bool what) |
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs More... | |
bool | getNoImplicit () const |
returns the noImplicit flag More... | |
void | setNumExplicitHs (unsigned int what) |
sets our number of explict Hs More... | |
unsigned int | getNumExplicitHs () const |
returns our number of explict Hs More... | |
void | setIsAromatic (bool what) |
sets our isAromatic flag, indicating whether or not we are aromatic More... | |
bool | getIsAromatic () const |
returns our isAromatic flag More... | |
double | getMass () const |
returns our mass More... | |
void | setIsotope (unsigned int what) |
sets our isotope number More... | |
unsigned int | getIsotope () const |
returns our isotope number More... | |
void | setChiralTag (ChiralType what) |
sets our chiralTag More... | |
void | invertChirality () |
inverts our chiralTag More... | |
ChiralType | getChiralTag () const |
returns our chiralTag More... | |
void | setHybridization (HybridizationType what) |
sets our hybridization More... | |
HybridizationType | getHybridization () const |
returns our hybridization More... | |
int | getPerturbationOrder (INT_LIST probe) const |
returns the perturbation order for a list of integers More... | |
void | updatePropertyCache (bool strict=true) |
calculates any of our lazy properties More... | |
bool | needsUpdatePropertyCache () const |
int | calcExplicitValence (bool strict=true) |
calculates and returns our explicit valence More... | |
int | calcImplicitValence (bool strict=true) |
calculates and returns our implicit valence More... | |
AtomMonomerInfo * | getMonomerInfo () |
const AtomMonomerInfo * | getMonomerInfo () const |
void | setMonomerInfo (AtomMonomerInfo *info) |
takes ownership of the pointer More... | |
void | setAtomMapNum (int mapno, bool strict=true) |
Set the atom map Number of the atom. More... | |
int | getAtomMapNum () const |
![]() | |
RDProps () | |
RDProps (const RDProps &rhs) | |
RDProps & | operator= (const RDProps &rhs) |
void | clear () |
const Dict & | getDict () const |
gets the underlying Dictionary More... | |
Dict & | getDict () |
STR_VECT | getPropList (bool includePrivate=true, bool includeComputed=true) const |
returns a list with the names of our properties More... | |
template<typename T > | |
void | setProp (const std::string &key, T val, bool computed=false) const |
sets a property value More... | |
template<typename T > | |
void | getProp (const std::string &key, T &res) const |
allows retrieval of a particular property value More... | |
template<typename T > | |
T | getProp (const std::string &key) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
template<typename T > | |
bool | getPropIfPresent (const std::string &key, T &res) const |
bool | hasProp (const std::string &key) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | clearProp (const std::string &key) const |
clears the value of a property More... | |
void | clearComputedProps () const |
clears all of our computed properties More... | |
void | updateProps (const RDProps &source, bool preserveExisting=false) |
update the properties from another More... | |
Additional Inherited Members | |
![]() | |
void | setOwningMol (ROMol *other) |
sets our owning molecule More... | |
void | setOwningMol (ROMol &other) |
sets our owning molecule More... | |
void | initAtom () |
void | initFromOther (const Atom &other) |
![]() | |
bool | df_isAromatic |
bool | df_noImplicit |
std::uint8_t | d_numExplicitHs |
std::int8_t | d_formalCharge |
std::uint8_t | d_atomicNum |
std::int8_t | d_implicitValence |
std::int8_t | d_explicitValence |
std::uint8_t | d_numRadicalElectrons |
std::uint8_t | d_chiralTag |
std::uint8_t | d_hybrid |
std::uint16_t | d_isotope |
atomindex_t | d_index |
ROMol * | dp_mol |
AtomMonomerInfo * | dp_monomerInfo |
![]() | |
Dict | d_props |
Class for storing atomic queries.
QueryAtom objects are derived from Atom objects, so they can be added to molecules and the like, but they have much fancier querying capabilities.
Definition at line 27 of file QueryAtom.h.
typedef Queries::Query<int, Atom const *, true> RDKit::QueryAtom::QUERYATOM_QUERY |
Definition at line 29 of file QueryAtom.h.
|
inline |
Definition at line 31 of file QueryAtom.h.
|
inlineexplicit |
Definition at line 32 of file QueryAtom.h.
|
inlineexplicit |
Definition at line 33 of file QueryAtom.h.
|
inline |
Definition at line 35 of file QueryAtom.h.
References Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::copy().
RDKit::QueryAtom::~QueryAtom | ( | ) |
|
virtual |
returns a copy of this query, owned by the caller
Reimplemented from RDKit::Atom.
|
virtual |
expands our current query
what | the Queries::Query to be added. The ownership of the query is passed to the current object, where it might be deleted, so that the pointer should not be used again in the calling code. |
how | the operator to be used in the expansion |
maintainOrder | (optional) flags whether the relative order of the queries needs to be maintained, if this is false, the order is reversed Notes:
|
Reimplemented from RDKit::Atom.
|
inlinevirtual |
returns our current query
Reimplemented from RDKit::Atom.
Definition at line 59 of file QueryAtom.h.
|
inlinevirtual |
Reimplemented from RDKit::Atom.
Definition at line 51 of file QueryAtom.h.
|
virtual |
returns true if we match Atom what
Reimplemented from RDKit::Atom.
Definition at line 38 of file QueryAtom.h.
References Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), and RDKit::Atom::operator=().
bool RDKit::QueryAtom::QueryMatch | ( | QueryAtom const * | what | ) | const |
returns true if our query details match those of QueryAtom what
|
inlinevirtual |
replaces our current query with the value passed in
Reimplemented from RDKit::Atom.
Definition at line 54 of file QueryAtom.h.