RDKit
Open-source cheminformatics and machine learning.
Atom.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2001-2014 Greg Landrum and Rational Discovery LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 /*! \file Atom.h
11 
12  \brief Defines the Atom class and associated typedefs
13 
14 */
15 #ifndef _RD_ATOM_H
16 #define _RD_ATOM_H
17 
18 // Std stuff
19 #include <iostream>
20 #include <boost/foreach.hpp>
21 
22 // ours
23 #include <Query/QueryObjects.h>
24 #include <RDGeneral/types.h>
25 #include <RDGeneral/Dict.h>
26 #include <GraphMol/details.h>
27 
28 namespace RDKit{
29  class ROMol;
30  class RWMol;
31  class AtomMonomerInfo;
32 
33  //! The class for representing atoms
34  /*!
35 
36  <b>Notes:</b>
37  - many of the methods of Atom require that the Atom be associated
38  with a molecule (an ROMol).
39  - each Atom maintains a Dict of \c properties:
40  - Each \c property is keyed by name and can store an
41  arbitrary type.
42  - \c Properties can be marked as \c calculated, in which case
43  they will be cleared when the \c clearComputedProps() method
44  is called.
45  - Because they have no impact upon chemistry, all \c property
46  operations are \c const, this allows extra flexibility for
47  clients who need to store extra data on Atom objects.
48  - Atom objects are lazy about computing their explicit and implicit valence
49  values. These will not be computed until their values are requested.
50 
51  <b>Chirality:</b>
52 
53  The chirality of an Atom is determined by two things:
54  - its \c chiralTag
55  - the input order of its bonds (see note below for handling of
56  implicit Hs)
57 
58  For tetrahedral coordination, the \c chiralTag tells you what
59  direction you have to rotate to get from bond 2 to bond 3 while looking
60  down bond 1. This is pretty much identical to the SMILES representation of
61  chirality.
62 
63  NOTE: if an atom has an implicit H, the bond to that H is considered to be
64  at the *end* of the list of other bonds.
65 
66  */
67  class Atom {
68  friend class MolPickler; //!< the pickler needs access to our privates
69  friend class ROMol;
70  friend class RWMol;
71  public:
72 
73  typedef boost::shared_ptr<Atom> ATOM_SPTR;
74  typedef boost::shared_ptr<const Atom> C_ATOM_SPTR;
75  // FIX: grn...
77 
78  //! store hybridization
79  typedef enum {
80  UNSPECIFIED=0, //!< hybridization that hasn't been specified
81  S,
82  SP,
83  SP2,
84  SP3,
87  OTHER //!< unrecognized hybridization
89 
90  //! store type of chirality
91  typedef enum {
92  CHI_UNSPECIFIED=0, //!< chirality that hasn't been specified
93  CHI_TETRAHEDRAL_CW, //!< tetrahedral: clockwise rotation (SMILES \@\@)
94  CHI_TETRAHEDRAL_CCW,//!< tetrahedral: counter-clockwise rotation (SMILES \@)
95  CHI_OTHER //!< some unrecognized type of chirality
96  } ChiralType;
97 
98  Atom();
99  //! construct an Atom with a particular atomic number
100  explicit Atom(unsigned int num);
101  //! construct an Atom with a particular symbol (looked up in the PeriodicTable)
102  explicit Atom(std::string what);
103  Atom(const Atom & other);
104  virtual ~Atom();
105 
106  //! makes a copy of this Atom and returns a pointer to it.
107  /*!
108  <b>Note:</b> the caller is responsible for <tt>delete</tt>ing the result
109  */
110  virtual Atom *copy() const;
111 
112  //! returns our atomic number
113  int getAtomicNum() const { return d_atomicNum; };
114  //! sets our atomic number
115  void setAtomicNum(int newNum) { d_atomicNum = newNum; };
116 
117  //! returns our symbol (determined by our atomic number)
118  std::string getSymbol() const;
119 
120  //! returns a reference to the ROMol that owns this Atom
121  ROMol &getOwningMol() const { return *dp_mol; };
122 
123  //! returns our index within the ROMol
124  unsigned int getIdx() const {return d_index;};
125  //! sets our index within the ROMol
126  /*!
127  <b>Notes:</b>
128  - this makes no sense if we do not have an owning molecule
129  - the index should be <tt>< this->getOwningMol()->getNumAtoms()</tt>
130  */
131  void setIdx(unsigned int index) {d_index=index;};
132 
133  //! returns the explicit degree of the Atom (number of bonded
134  //! neighbors in the graph)
135  /*!
136  <b>Notes:</b>
137  - requires an owning molecule
138  */
139  unsigned int getDegree() const;
140 
141  //! returns the total degree of the Atom (number of bonded
142  //! neighbors + number of Hs)
143  /*!
144  <b>Notes:</b>
145  - requires an owning molecule
146  */
147  unsigned int getTotalDegree() const;
148 
149  //! \brief returns the total number of Hs (implicit and explicit) that
150  //! this Atom is bound to
151  /*!
152  <b>Notes:</b>
153  - requires an owning molecule
154  */
155  unsigned int getTotalNumHs(bool includeNeighbors=false) const;
156 
157  //! \brief returns the total valence (implicit and explicit)
158  //! for an atom
159  /*!
160  <b>Notes:</b>
161  - requires an owning molecule
162  */
163  unsigned int getTotalValence() const;
164 
165  //! returns the number of implicit Hs this Atom is bound to
166  /*!
167  <b>Notes:</b>
168  - requires an owning molecule
169  */
170  unsigned int getNumImplicitHs() const;
171 
172  //! returns the explicit valence (including Hs) of this atom
173  int getExplicitValence() const;
174 
175  //! returns the implicit valence for this Atom
176  /*!
177  <b>Notes:</b>
178  - requires an owning molecule
179  */
180  int getImplicitValence() const;
181 
182  //! returns the number of radical electrons for this Atom
183  /*!
184  <b>Notes:</b>
185  - requires an owning molecule
186  */
187  unsigned int getNumRadicalElectrons() const { return d_numRadicalElectrons; };
188  void setNumRadicalElectrons(unsigned int num) { d_numRadicalElectrons=num; };
189 
190 
191  //! returns the formal charge of this atom
192  int getFormalCharge() const { return d_formalCharge; };
193  //! set's the formal charge of this atom
194  void setFormalCharge(int what) { d_formalCharge = what;} ;
195 
196  //! \brief sets our \c noImplicit flag, indicating whether or not
197  //! we are allowed to have implicit Hs
198  void setNoImplicit( bool what ) { df_noImplicit = what; };
199  //! returns the \c noImplicit flag
200  bool getNoImplicit() const { return df_noImplicit; };
201 
202  //! sets our number of explict Hs
203  void setNumExplicitHs(unsigned int what) { d_numExplicitHs = what; };
204  //! returns our number of explict Hs
205  unsigned int getNumExplicitHs() const { return d_numExplicitHs; };
206 
207  //! sets our \c isAromatic flag, indicating whether or not we are aromatic
208  void setIsAromatic( bool what ) { df_isAromatic = what; };
209  //! returns our \c isAromatic flag
210  bool getIsAromatic() const { return df_isAromatic; };
211 
212  //! returns our mass
213  double getMass() const;
214 
215  //! sets our isotope number
216  void setIsotope(unsigned int what);
217  //! returns our isotope number
218  unsigned int getIsotope() const {return d_isotope; };
219 
220  //! sets our \c chiralTag
221  void setChiralTag(ChiralType what) { d_chiralTag = what; };
222  //! inverts our \c chiralTag
223  void invertChirality();
224  //! returns our \c chiralTag
225  ChiralType getChiralTag() const { return static_cast<ChiralType>(d_chiralTag); };
226 
227  //! sets our hybridization
228  void setHybridization(HybridizationType what) { d_hybrid = what; };
229  //! returns our hybridization
230  HybridizationType getHybridization() const { return static_cast<HybridizationType>(d_hybrid); };
231 
232  // ------------------------------------
233  // Some words of explanation before getting down into
234  // the query stuff.
235  // These query functions are really only here so that they
236  // can have real functionality in subclasses (like QueryAtoms).
237  // Since pretty much it's gonna be a mistake to call any of these
238  // (ever), we're saddling them all with a precondition which
239  // is guaranteed to fail. I'd like to have them be pure virtual,
240  // but that doesn't work since we need to be able to instantiate
241  // Atoms.
242  // ------------------------------------
243 
244  // This method can be used to distinguish query atoms from standard atoms:
245  virtual bool hasQuery() const { return false; };
246 
247  //! NOT CALLABLE
248  virtual void setQuery(QUERYATOM_QUERY *what);
249 
250  //! NOT CALLABLE
251  virtual QUERYATOM_QUERY *getQuery() const;
252  //! NOT CALLABLE
253  virtual void expandQuery(QUERYATOM_QUERY *what,
255  bool maintainOrder=true);
256 
257  //! returns whether or not we match the argument
258  /*!
259  <b>Notes:</b>
260  The general rule is that if a property on this atom has a non-default value,
261  the property on the other atom must have the same value.
262  The exception to this is H counts, which are ignored. These turns out to be
263  impossible to handle generally, so rather than having odd and hard-to-explain
264  exceptions, we ignore them entirely.
265 
266  Here are the rules for atom-atom matching:
267  | This | Other | Match | Reason
268  | CCO | CCO | Yes |
269  | CCO | CC[O-] | Yes |
270  | CC[O-] | CCO | No | Charge
271  | CC[O-] | CC[O-] | Yes |
272  | CC[OH] | CC[O-] | Yes |
273  | CC[OH] | CCOC | Yes |
274  | CCO | CCOC | Yes |
275  | CCC | CCC | Yes |
276  | CCC | CC[14C] | Yes |
277  | CC[14C] | CCC | No | Isotope
278  | CC[14C] | CC[14C] | Yes |
279  | C | OCO | Yes |
280  | [CH] | OCO | Yes |
281  | [CH2] | OCO | Yes |
282  | [CH3] | OCO | No | Radical
283  | C | O[CH2]O | Yes |
284  | [CH2] | O[CH2]O | Yes |
285  */
286  virtual bool Match(Atom const *what) const;
287  //! \overload
288  virtual inline bool Match(const ATOM_SPTR &what) const {
289  return Match(what.get());
290  };
291 
292 
293  // ------------------------------------
294  // Local Property Dict functionality
295  // all setProp functions are const because they
296  // are not meant to change the atom chemically
297  // ------------------------------------
298  //! returns a list with the names of our \c properties
300  return dp_props->keys();
301  }
302 
303  //! sets a \c property value
304  /*!
305  \param key the name under which the \c property should be stored.
306  If a \c property is already stored under this name, it will be
307  replaced.
308  \param val the value to be stored
309  \param computed (optional) allows the \c property to be flagged
310  \c computed.
311  */
312  template <typename T>
313  void setProp(const char *key, T val, bool computed=false) const{
314 
315  //if(!dp_props) dp_props = new Dict();
316  std::string what(key);
317  setProp(what,val, computed);
318  }
319 
320  //! \overload
321  template <typename T>
322  void setProp(const std::string &key, T val, bool computed=false) const {
323  if (computed) {
324  STR_VECT compLst;
326  if (std::find(compLst.begin(), compLst.end(), key) == compLst.end()) {
327  compLst.push_back(key);
329  }
330  }
331  //setProp(key.c_str(),val);
332  dp_props->setVal(key, val);
333  }
334 
335  //! allows retrieval of a particular property value
336  /*!
337 
338  \param key the name under which the \c property should be stored.
339  If a \c property is already stored under this name, it will be
340  replaced.
341  \param res a reference to the storage location for the value.
342 
343  <b>Notes:</b>
344  - if no \c property with name \c key exists, a KeyErrorException will be thrown.
345  - the \c boost::lexical_cast machinery is used to attempt type conversions.
346  If this fails, a \c boost::bad_lexical_cast exception will be thrown.
347 
348  */
349  template <typename T>
350  void getProp(const char *key,T &res) const {
351  dp_props->getVal(key,res);
352  }
353  //! \overload
354  template <typename T>
355  void getProp(const std::string &key,T &res) const {
356  dp_props->getVal(key,res);
357  }
358 
359  //! \overload
360  template <typename T>
361  T getProp(const char *key) const {
362  return dp_props->getVal<T>(key);
363  }
364  //! \overload
365  template <typename T>
366  T getProp(const std::string &key) const {
367  return dp_props->getVal<T>(key);
368  }
369 
370  //! returns whether or not we have a \c property with name \c key
371  //! and assigns the value if we do
372  template <typename T>
373  bool getPropIfPresent(const char *key,T &res) const {
374  return dp_props->getValIfPresent(key,res);
375  }
376  //! \overload
377  template <typename T>
378  bool getPropIfPresent(const std::string &key,T &res) const {
379  return dp_props->getValIfPresent(key,res);
380  }
381 
382  //! returns whether or not we have a \c property with name \c key
383  bool hasProp(const char *key) const {
384  if(!dp_props) return false;
385  return dp_props->hasVal(key);
386  };
387  //! \overload
388  bool hasProp(const std::string &key) const {
389  if(!dp_props) return false;
390  return dp_props->hasVal(key);
391  };
392 
393 
394  //! clears the value of a \c property
395  /*!
396  <b>Notes:</b>
397  - if no \c property with name \c key exists, a KeyErrorException
398  will be thrown.
399  - if the \c property is marked as \c computed, it will also be removed
400  from our list of \c computedProperties
401  */
402  void clearProp(const char *key) const {
403  std::string what(key);
404  clearProp(what);
405  };
406  //! \overload
407  void clearProp(const std::string &key) const {
408  STR_VECT compLst;
410  STR_VECT_I svi = std::find(compLst.begin(), compLst.end(), key);
411  if (svi != compLst.end()) {
412  compLst.erase(svi);
414  }
415  }
416  dp_props->clearVal(key);
417  };
418 
419  //! clears all of our \c computed \c properties
420  void clearComputedProps() const {
421  STR_VECT compLst;
423  {
424  BOOST_FOREACH(const std::string &sv,compLst){
425  dp_props->clearVal(sv);
426  }
427  compLst.clear();
429  }
430  }
431 
432  //! returns the perturbation order for a list of integers
433  /*!
434 
435  This value is associated with chirality.
436 
437  \param probe a list of bond indices. This must be the same
438  length as our number of incoming bonds (our degree).
439 
440  \return the number of swaps required to convert the ordering
441  of the probe list to match the order of our incoming bonds:
442  e.g. if our incoming bond order is: <tt>[0,1,2,3]</tt>
443  \verbatim
444  getPerturbationOrder([1,0,2,3]) = 1
445  getPerturbationOrder([1,2,3,0]) = 3
446  getPerturbationOrder([1,2,0,3]) = 2
447  \endverbatim
448 
449  See the class documentation for a more detailed description
450  of our representation of chirality.
451 
452  <b>Notes:</b>
453  - requires an owning molecule
454 
455  */
456  int getPerturbationOrder(INT_LIST probe) const;
457 
458  //! calculates any of our lazy \c properties
459  /*!
460  <b>Notes:</b>
461  - requires an owning molecule
462  - the current lazy \c properties are implicit and explicit valence
463  */
464  void updatePropertyCache(bool strict=true);
465 
466  bool needsUpdatePropertyCache() const;
467 
468  //! calculates and returns our explicit valence
469  /*!
470  <b>Notes:</b>
471  - requires an owning molecule
472  */
473  int calcExplicitValence(bool strict=true);
474 
475  //! calculates and returns our implicit valence
476  /*!
477  <b>Notes:</b>
478  - requires an owning molecule
479  */
480  int calcImplicitValence(bool strict=true);
481 
483  const AtomMonomerInfo *getMonomerInfo() const { return dp_monomerInfo; };
484  //! takes ownership of the pointer
486 
487  protected:
488  //! sets our owning molecule
489  void setOwningMol(ROMol *other);
490  //! sets our owning molecule
491  void setOwningMol(ROMol &other) {setOwningMol(&other);};
492 
493  bool df_isAromatic;
495  boost::uint8_t d_numExplicitHs;
496  boost::int8_t d_formalCharge;
497  boost::uint8_t d_atomicNum;
498  // NOTE that these cannot be signed, they are calculated using
499  // a lazy scheme and are initialized to -1 to indicate that the
500  // calculation has not yet been done.
502  boost::uint8_t d_numRadicalElectrons;
503  boost::uint8_t d_chiralTag;
504  boost::uint8_t d_hybrid;
505 
507  boost::uint16_t d_isotope;
508 
512  void initAtom();
513  };
514 
515 };
516 //! allows Atom objects to be dumped to streams
517 std::ostream & operator<<(std::ostream& target, const RDKit::Atom &at);
518 
519 #endif
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Atom
Definition: Atom.h:121
unrecognized hybridization
Definition: Atom.h:87
std::list< int > INT_LIST
Definition: types.h:152
bool df_isAromatic
Definition: Atom.h:491
void setNumRadicalElectrons(unsigned int num)
Definition: Atom.h:188
void setChiralTag(ChiralType what)
sets our chiralTag
Definition: Atom.h:221
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
Definition: Atom.h:200
void setVal(const std::string &what, T &val)
Sets the value associated with a key.
Definition: Dict.h:170
int getPerturbationOrder(INT_LIST probe) const
returns the perturbation order for a list of integers
bool df_noImplicit
Definition: Atom.h:494
void invertChirality()
inverts our chiralTag
The abstract base class for atom-level monomer info.
Definition: MonomerInfo.h:24
STR_VECT keys() const
Returns the set of keys in the dictionary.
Definition: Dict.h:63
CompositeQueryType
Definition: QueryObjects.h:35
RWMol is a molecule class that is intended to be edited.
Definition: RWMol.h:30
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
Definition: Atom.h:76
atomindex_t d_index
Definition: Atom.h:506
hybridization that hasn&#39;t been specified
Definition: Atom.h:80
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...
Definition: Dict.h:134
virtual void setQuery(QUERYATOM_QUERY *what)
NOT CALLABLE.
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
Definition: Atom.h:187
unsigned int getIsotope() const
returns our isotope number
Definition: Atom.h:218
double getMass() const
returns our mass
void clearComputedProps() const
clears all of our computed properties
Definition: Atom.h:420
void clearProp(const char *key) const
clears the value of a property
Definition: Atom.h:402
T getProp(const char *key) const
Definition: Atom.h:361
unsigned int getIdx() const
returns our index within the ROMol
Definition: Atom.h:124
boost::uint8_t d_chiralTag
Definition: Atom.h:503
void setProp(const std::string &key, T val, bool computed=false) const
Definition: Atom.h:322
some unrecognized type of chirality
Definition: Atom.h:95
Defines the Dict class.
STR_VECT getPropList() const
returns a list with the names of our properties
Definition: Atom.h:299
void getProp(const char *key, T &res) const
allows retrieval of a particular property value
Definition: Atom.h:350
Dict * dp_props
Definition: Atom.h:510
boost::int8_t d_explicitValence
Definition: Atom.h:501
virtual bool Match(Atom const *what) const
returns whether or not we match the argument
virtual bool Match(const ATOM_SPTR &what) const
Definition: Atom.h:288
ROMol is a molecule class that is intended to have a fixed topology.
Definition: ROMol.h:105
unsigned int getDegree() const
void clearVal(const std::string &what)
Clears the value associated with a particular key, removing the key from the dictionary.
Definition: Dict.h:198
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.
Definition: Dict.h:86
virtual bool hasQuery() const
Definition: Atom.h:245
tetrahedral: clockwise rotation (SMILES @@)
Definition: Atom.h:93
bool hasProp(const std::string &key) const
Definition: Atom.h:388
unsigned int getTotalDegree() const
void setNumExplicitHs(unsigned int what)
sets our number of explict Hs
Definition: Atom.h:203
virtual void expandQuery(QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
int getAtomicNum() const
returns our atomic number
Definition: Atom.h:113
AtomMonomerInfo * getMonomerInfo()
Definition: Atom.h:482
void getProp(const std::string &key, T &res) const
Definition: Atom.h:355
void setAtomicNum(int newNum)
sets our atomic number
Definition: Atom.h:115
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
Definition: Atom.h:228
ChiralType
store type of chirality
Definition: Atom.h:91
void setProp(const char *key, T val, bool computed=false) const
sets a property value
Definition: Atom.h:313
void setMonomerInfo(AtomMonomerInfo *info)
takes ownership of the pointer
Definition: Atom.h:485
unsigned int getNumExplicitHs() const
returns our number of explict Hs
Definition: Atom.h:205
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:28
void initAtom()
HybridizationType
store hybridization
Definition: Atom.h:79
const std::string computedPropName
Definition: types.h:25
ChiralType getChiralTag() const
returns our chiralTag
Definition: Atom.h:225
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.
Definition: Dict.h:50
void setOwningMol(ROMol *other)
sets our owning molecule
T getProp(const std::string &key) const
Definition: Atom.h:366
int getImplicitValence() const
returns the implicit valence for this Atom
ROMol * dp_mol
Definition: Atom.h:509
boost::uint8_t d_hybrid
Definition: Atom.h:504
tetrahedral: counter-clockwise rotation (SMILES @)
Definition: Atom.h:94
handles pickling (serializing) molecules
Definition: MolPickler.h:46
boost::uint16_t d_isotope
Definition: Atom.h:507
bool needsUpdatePropertyCache() const
int calcImplicitValence(bool strict=true)
calculates and returns our implicit valence
boost::shared_ptr< Atom > ATOM_SPTR
Definition: Atom.h:73
boost::uint8_t d_atomicNum
Definition: Atom.h:497
bool hasProp(const char *key) const
returns whether or not we have a property with name key
Definition: Atom.h:383
const AtomMonomerInfo * getMonomerInfo() const
Definition: Atom.h:483
void clearProp(const std::string &key) const
Definition: Atom.h:407
std::ostream & operator<<(std::ostream &target, const RDKit::Atom &at)
allows Atom objects to be dumped to streams
boost::uint16_t atomindex_t
Definition: details.h:13
void setNoImplicit(bool what)
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs ...
Definition: Atom.h:198
bool getPropIfPresent(const char *key, T &res) const
Definition: Atom.h:373
HybridizationType getHybridization() const
returns our hybridization
Definition: Atom.h:230
std::string getSymbol() const
returns our symbol (determined by our atomic number)
void setIdx(unsigned int index)
sets our index within the ROMol
Definition: Atom.h:131
boost::shared_ptr< const Atom > C_ATOM_SPTR
Definition: Atom.h:74
boost::int8_t d_formalCharge
Definition: Atom.h:496
boost::int8_t d_implicitValence
Definition: Atom.h:501
AtomMonomerInfo * dp_monomerInfo
Definition: Atom.h:511
Pulls in all the query types.
std::vector< std::string >::iterator STR_VECT_I
Definition: types.h:168
chirality that hasn&#39;t been specified
Definition: Atom.h:92
int getFormalCharge() const
returns the formal charge of this atom
Definition: Atom.h:192
boost::uint8_t d_numRadicalElectrons
Definition: Atom.h:502
bool getPropIfPresent(const std::string &key, T &res) const
Definition: Atom.h:378
Base class for all queries.
Definition: Query.h:46
void setFormalCharge(int what)
set&#39;s the formal charge of this atom
Definition: Atom.h:194
The Dict class can be used to store objects of arbitrary type keyed by strings.
Definition: Dict.h:33
boost::uint8_t d_numExplicitHs
Definition: Atom.h:495
void setOwningMol(ROMol &other)
sets our owning molecule
Definition: Atom.h:491
The class for representing atoms.
Definition: Atom.h:67
void setIsAromatic(bool what)
sets our isAromatic flag, indicating whether or not we are aromatic
Definition: Atom.h:208
std::vector< std::string > STR_VECT
Definition: Dict.h:26
bool getIsAromatic() const
returns our isAromatic flag
Definition: Atom.h:210
virtual ~Atom()