RDKit
Open-source cheminformatics and machine learning.
Reaction.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2007-2018, Novartis Institutes for BioMedical Research Inc.
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following
13 // disclaimer in the documentation and/or other materials provided
14 // with the distribution.
15 // * Neither the name of Novartis Institutes for BioMedical Research Inc.
16 // nor the names of its contributors may be used to endorse or promote
17 // products derived from this software without specific prior written
18 // permission.
19 //
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 //
32 
33 #include <RDGeneral/export.h>
34 #ifndef RD_REACTION_H_17Aug2006
35 #define RD_REACTION_H_17Aug2006
36 
37 #include <GraphMol/RDKitBase.h>
38 #include <RDGeneral/RDProps.h>
40 #include <vector>
41 
42 namespace RDKit {
43 class ReactionPickler;
44 
45 //! used to indicate an error in the chemical reaction engine
47  : public std::exception {
48  public:
49  //! construct with an error message
50  explicit ChemicalReactionException(const char *msg) : _msg(msg){};
51  //! construct with an error message
52  explicit ChemicalReactionException(const std::string msg) : _msg(msg){};
53  //! get the error message
54  const char *message() const { return _msg.c_str(); };
56 
57  private:
58  std::string _msg;
59 };
60 
61 //! This is a class for storing and applying general chemical reactions.
62 /*!
63  basic usage will be something like:
64 
65  \verbatim
66  ChemicalReaction rxn;
67  rxn.addReactantTemplate(r1);
68  rxn.addReactantTemplate(r2);
69  rxn.addProductTemplate(p1);
70  rxn.initReactantMatchers();
71 
72  MOL_SPTR_VECT prods;
73  for(MOL_SPTR_VECT::const_iterator r1It=reactantSet1.begin();
74  r1It!=reactantSet1.end();++r1It;){
75  for(MOL_SPTR_VECT::const_iterator r2It=reactantSet2.begin();
76  r2It!=reactantSet2.end();++r2It;){
77  MOL_SPTR_VECT rVect(2);
78  rVect[0] = *r1It;
79  rVect[1] = *r2It;
80 
81  std::vector<MOL_SPTR_VECT> lprods;
82  lprods = rxn.runReactants(rVect);
83  for(std::vector<MOL_SPTR_VECT>::const_iterator lpIt=lprods.begin();
84  lpIt!=lprods.end();++lpIt){
85  // we know this is a single-product reaction:
86  prods.push_back((*lpIt)[0]);
87  }
88  }
89  }
90  \endverbatim
91 
92  NOTES:
93  - to allow more control over the reaction, it is possible to flag reactant
94  atoms as being protected by setting the common_properties::_protected
95  property on those
96  atoms. Here's an example:
97  \verbatim
98  std::string smi="[O:1]>>[N:1]";
99  ChemicalReaction *rxn = RxnSmartsToChemicalReaction(smi);
100  rxn->initReactantMatchers();
101 
102  MOL_SPTR_VECT reacts;
103  reacts.clear();
104  smi = "OCO";
105  ROMol *mol = SmilesToMol(smi);
106  reacts.push_back(ROMOL_SPTR(mol));
107  std::vector<MOL_SPTR_VECT> prods;
108  prods = rxn->runReactants(reacts);
109  // here prods has two entries, because there are two Os in the
110  // reactant.
111 
112  reacts[0]->getAtomWithIdx(0)->setProp(common_properties::_protected,1);
113  prods = rxn->runReactants(reacts);
114  // here prods only has one entry, the reaction at atom 0
115  // has been blocked by the _protected property
116  \endverbatim
117 
118 */
120  friend class ReactionPickler;
121 
122  public:
124  : RDProps(), df_needsInit(true), df_implicitProperties(false){};
126  df_needsInit = other.df_needsInit;
127  df_implicitProperties = other.df_implicitProperties;
128  for (MOL_SPTR_VECT::const_iterator iter = other.beginReactantTemplates();
129  iter != other.endReactantTemplates(); ++iter) {
130  ROMol *reactant = new ROMol(**iter);
131  m_reactantTemplates.push_back(ROMOL_SPTR(reactant));
132  }
133  for (MOL_SPTR_VECT::const_iterator iter = other.beginProductTemplates();
134  iter != other.endProductTemplates(); ++iter) {
135  ROMol *product = new ROMol(**iter);
136  m_productTemplates.push_back(ROMOL_SPTR(product));
137  }
138  for (MOL_SPTR_VECT::const_iterator iter = other.beginAgentTemplates();
139  iter != other.endAgentTemplates(); ++iter) {
140  ROMol *agent = new ROMol(**iter);
141  m_agentTemplates.push_back(ROMOL_SPTR(agent));
142  }
143  d_props = other.d_props;
144  }
145  //! construct a reaction from a pickle string
146  ChemicalReaction(const std::string &binStr);
147 
148  //! Adds a new reactant template
149  /*!
150  \return the number of reactants
151 
152  */
153  unsigned int addReactantTemplate(ROMOL_SPTR mol) {
154  this->df_needsInit = true;
155  this->m_reactantTemplates.push_back(mol);
156  return rdcast<unsigned int>(this->m_reactantTemplates.size());
157  }
158 
159  //! Adds a new agent template
160  /*!
161  \return the number of agent
162 
163  */
164  unsigned int addAgentTemplate(ROMOL_SPTR mol) {
165  this->m_agentTemplates.push_back(mol);
166  return rdcast<unsigned int>(this->m_agentTemplates.size());
167  }
168 
169  //! Adds a new product template
170  /*!
171  \return the number of products
172 
173  */
174  unsigned int addProductTemplate(ROMOL_SPTR mol) {
175  this->m_productTemplates.push_back(mol);
176  return rdcast<unsigned int>(this->m_productTemplates.size());
177  }
178 
179  //! Removes the reactant templates from a reaction if atom mapping ratio is
180  // below a given threshold
181  /*! By default the removed reactant templates were attached to the agent
182  templates.
183  An alternative will be to provide a pointer to a molecule vector where
184  these reactants should be saved.
185  */
186  void removeUnmappedReactantTemplates(double thresholdUnmappedAtoms = 0.2,
187  bool moveToAgentTemplates = true,
188  MOL_SPTR_VECT *targetVector = NULL);
189 
190  //! Removes the product templates from a reaction if its atom mapping ratio is
191  // below a given threshold
192  /*! By default the removed products templates were attached to the agent
193  templates.
194  An alternative will be to provide a pointer to a molecule vector where
195  these products should be saved.
196  */
197  void removeUnmappedProductTemplates(double thresholdUnmappedAtoms = 0.2,
198  bool moveToAgentTemplates = true,
199  MOL_SPTR_VECT *targetVector = NULL);
200 
201  /*! Removes the agent templates from a reaction if a pointer to a
202  molecule vector is provided the agents are stored therein.*/
203  void removeAgentTemplates(MOL_SPTR_VECT *targetVector = NULL);
204 
205  //! Runs the reaction on a set of reactants
206  /*!
207 
208  \param reactants the reactants to be used. The length of this must be equal
209  to
210  this->getNumReactantTemplates()
211  \param maxProducts: if non zero, the maximum number of products to generate
212  before stopping. If hit a warning will be generated.
213 
214  \return a vector of vectors of products. Each subvector will be
215  this->getNumProductTemplates() long.
216 
217  We return a vector of vectors of products because each individual template
218  may
219  map multiple times onto its reactant. This leads to multiple possible result
220  sets.
221  */
222  std::vector<MOL_SPTR_VECT> runReactants(
223  const MOL_SPTR_VECT reactants, unsigned int numProducts = 1000) const;
224 
225  //! Runs a single reactant against a single reactant template
226  /*!
227  \param reactant The single reactant to use
228 
229  \param reactantTemplateIdx the reactant template to target in the reaction
230  */
231  std::vector<MOL_SPTR_VECT> runReactant(
232  ROMOL_SPTR reactant, unsigned int reactantTemplateIdx) const;
233 
234  const MOL_SPTR_VECT &getReactants() const {
235  return this->m_reactantTemplates;
236  }
237  const MOL_SPTR_VECT &getAgents() const { return this->m_agentTemplates; }
238  const MOL_SPTR_VECT &getProducts() const { return this->m_productTemplates; }
239 
240  MOL_SPTR_VECT::const_iterator beginReactantTemplates() const {
241  return this->m_reactantTemplates.begin();
242  }
243  MOL_SPTR_VECT::const_iterator endReactantTemplates() const {
244  return this->m_reactantTemplates.end();
245  }
246 
247  MOL_SPTR_VECT::const_iterator beginProductTemplates() const {
248  return this->m_productTemplates.begin();
249  }
250  MOL_SPTR_VECT::const_iterator endProductTemplates() const {
251  return this->m_productTemplates.end();
252  }
253 
254  MOL_SPTR_VECT::const_iterator beginAgentTemplates() const {
255  return this->m_agentTemplates.begin();
256  }
257  MOL_SPTR_VECT::const_iterator endAgentTemplates() const {
258  return this->m_agentTemplates.end();
259  }
260 
261  MOL_SPTR_VECT::iterator beginReactantTemplates() {
262  return this->m_reactantTemplates.begin();
263  }
264  MOL_SPTR_VECT::iterator endReactantTemplates() {
265  return this->m_reactantTemplates.end();
266  }
267 
268  MOL_SPTR_VECT::iterator beginProductTemplates() {
269  return this->m_productTemplates.begin();
270  }
271  MOL_SPTR_VECT::iterator endProductTemplates() {
272  return this->m_productTemplates.end();
273  }
274 
275  MOL_SPTR_VECT::iterator beginAgentTemplates() {
276  return this->m_agentTemplates.begin();
277  }
278  MOL_SPTR_VECT::iterator endAgentTemplates() {
279  return this->m_agentTemplates.end();
280  }
281  unsigned int getNumReactantTemplates() const {
282  return rdcast<unsigned int>(this->m_reactantTemplates.size());
283  };
284  unsigned int getNumProductTemplates() const {
285  return rdcast<unsigned int>(this->m_productTemplates.size());
286  };
287  unsigned int getNumAgentTemplates() const {
288  return rdcast<unsigned int>(this->m_agentTemplates.size());
289  };
290 
291  //! initializes our internal reactant-matching datastructures.
292  /*!
293  This must be called after adding reactants and before calling
294  runReactants.
295  */
296  void initReactantMatchers();
297 
298  bool isInitialized() const { return !df_needsInit; };
299 
300  //! validates the reactants and products to make sure the reaction seems
301  //"reasonable"
302  /*!
303  \return true if the reaction validates without errors (warnings do not
304  stop
305  validation)
306 
307  \param numWarnings used to return the number of validation warnings
308  \param numErrors used to return the number of validation errors
309 
310  \param silent: If this bool is true, no messages will be logged during the
311  validation.
312  By default, validation problems are reported to the warning
313  and error
314  logs depending on their severity.
315 
316  */
317  bool validate(unsigned int &numWarnings, unsigned int &numErrors,
318  bool silent = false) const;
319 
320  //! returns whether or not the reaction uses implicit
321  //! properties on the product atoms
322  /*!
323 
324  This toggles whether or not unspecified atomic properties in the
325  products are considered to be implicit and should be copied from
326  the actual reactants. This is necessary due to a semantic difference
327  between the "reaction SMARTS" approach and the MDL RXN
328  approach:
329  In "reaction SMARTS", this reaction:
330  [C:1]-[Br:2].[O-:3]>>[C:1]-[O:3].[Br-:2]
331  applied to [CH4+]Br should yield [CH4+]O
332  Something similar drawn in an rxn file, and applied to
333  [CH4+]Br should yield [CH3]O.
334  In rxn there is no charge on the product C because nothing is
335  specified in the rxn file; in "SMARTS" the charge from the
336  actual reactants is not *removed* because no charge is
337  specified in the reaction.
338 
339  */
340  bool getImplicitPropertiesFlag() const { return df_implicitProperties; };
341  //! sets the implicit properties flag. See the documentation for
342  //! getImplicitProertiesFlag() for a discussion of what this means.
343  void setImplicitPropertiesFlag(bool val) { df_implicitProperties = val; };
344 
345  private:
346  bool df_needsInit;
347  bool df_implicitProperties;
348  MOL_SPTR_VECT m_reactantTemplates, m_productTemplates, m_agentTemplates;
349  ChemicalReaction &operator=(const ChemicalReaction &); // disable assignment
350 };
351 
352 //! tests whether or not the molecule has a substructure match
353 //! to any of the reaction's reactants
354 //! the \c which argument is used to return which of the reactants
355 //! the molecule matches. If there's no match, it is equal to the number
356 //! of reactants on return
358  const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which);
359 //! \overload
361  const ChemicalReaction &rxn, const ROMol &mol);
362 
363 //! tests whether or not the molecule has a substructure match
364 //! to any of the reaction's products
365 //! the \c which argument is used to return which of the products
366 //! the molecule matches. If there's no match, it is equal to the number
367 //! of products on return
369  const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which);
370 //! \overload
372  const ChemicalReaction &rxn, const ROMol &mol);
373 
374 //! tests whether or not the molecule has a substructure match
375 //! to any of the reaction's agents
376 //! the \c which argument is used to return which of the agents
377 //! the molecule matches. If there's no match, it is equal to the number
378 //! of agents on return
380  const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which);
381 //! \overload
383  const ChemicalReaction &rxn, const ROMol &mol);
384 
385 //! returns indices of the atoms in each reactant that are changed
386 //! in the reaction
387 /*!
388  \param rxn the reaction we are interested in
389 
390  \param mappedAtomsOnly if set, atoms that are not mapped will not be included
391  in
392  the list of changed atoms (otherwise they are automatically included)
393 
394  How are changed atoms recognized?
395  1) Atoms whose degree changes
396  2) Atoms whose bonding pattern changes
397  3) unmapped atoms (unless the mappedAtomsOnly flag is set)
398  4) Atoms connected to unmapped atoms
399  5) Atoms whose atomic number changes (unless the
400  corresponding product atom is a dummy)
401  6) Atoms with more than one atomic number query (unless the
402  corresponding product atom is a dummy)
403 
404  Note that the atomic number of a query atom depends on how it's constructed.
405  When coming from SMARTS: if the first query is an atomic label/number that
406  sets the atomic number, otherwise it's zero.
407  For example [O;$(OC)] is atomic number 8 while [$(OC);O] is atomic
408  number 0.
409  When coming from RXN: the atomic number of the atom in the rxn file sets
410  the value.
411  */
413 getReactingAtoms(const ChemicalReaction &rxn, bool mappedAtomsOnly = false);
414 
415 //! add the recursive queries to the reactants of a reaction
416 /*!
417  This does its work using RDKit::addRecursiveQueries()
418 
419  \param rxn the reaction we are interested in
420  \param queries - the dictionary of named queries to add
421  \param propName - the atom property to use to get query names
422  optional:
423  \param reactantLabels - to store pairs of (atom index, query string)
424  per reactant
425 
426  NOTES:
427  - existing query information, if present, will be supplemented (AND logic)
428  - non-query atoms will be replaced with query atoms using only the query
429  logic
430  - query names can be present as comma separated lists, they will then
431  be combined using OR logic.
432  - throws a KeyErrorException if a particular query name is not present
433  in \c queries
434 
435  */
437  ChemicalReaction &rxn, const std::map<std::string, ROMOL_SPTR> &queries,
438  const std::string &propName,
439  std::vector<std::vector<std::pair<unsigned int, std::string>>>
440  *reactantLabels = NULL);
441 
442 } // namespace RDKit
443 
444 namespace RDDepict {
445 //! \brief Generate 2D coordinates (a depiction) for a reaction
446 /*!
447 
448  \param rxn the reaction we are interested in
449 
450  \param spacing the spacing between components of the reaction
451 
452  \param updateProps if set, properties such as conjugation and
453  hybridization will be calculated for the reactant and product
454  templates before generating coordinates. This should result in
455  better depictions, but can lead to errors in some cases.
456 
457  \param canonOrient canonicalize the orientation so that the long
458  axes align with the x-axis etc.
459 
460  \param nFlipsPerSample - the number of rotatable bonds that are
461  flipped at random for each sample
462 
463  \param nSamples - the number of samples
464 
465  \param sampleSeed - seed for the random sampling process
466 
467  \param permuteDeg4Nodes - try permuting the drawing order of bonds around
468  atoms with four neighbors in order to improve the depiction
469 
470  for the other parameters see the documentation for compute2DCoords()
471 
472 */
474  RDKit::ChemicalReaction &rxn, double spacing = 2.0, bool updateProps = true,
475  bool canonOrient = false, unsigned int nFlipsPerSample = 0,
476  unsigned int nSamples = 0, int sampleSeed = 0,
477  bool permuteDeg4Nodes = false);
478 
479 } // namespace RDDepict
480 
481 #endif
RDKit::isMoleculeAgentOfReaction
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeAgentOfReaction(const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which)
RDKit::ChemicalReaction::endProductTemplates
MOL_SPTR_VECT::const_iterator endProductTemplates() const
Definition: Reaction.h:250
RDKit::ChemicalReaction::getReactants
const MOL_SPTR_VECT & getReactants() const
Definition: Reaction.h:234
RDKit::VECT_INT_VECT
std::vector< INT_VECT > VECT_INT_VECT
Definition: types.h:268
RDKit::ChemicalReaction::beginReactantTemplates
MOL_SPTR_VECT::iterator beginReactantTemplates()
Definition: Reaction.h:261
RDKit::ChemicalReaction::beginAgentTemplates
MOL_SPTR_VECT::const_iterator beginAgentTemplates() const
Definition: Reaction.h:254
RDKit::ChemicalReactionException
used to indicate an error in the chemical reaction engine
Definition: Reaction.h:46
RDKit::ChemicalReaction::getProducts
const MOL_SPTR_VECT & getProducts() const
Definition: Reaction.h:238
RDKit::RDProps::d_props
Dict d_props
Definition: RDProps.h:12
RDKit::ChemicalReaction::getImplicitPropertiesFlag
bool getImplicitPropertiesFlag() const
Definition: Reaction.h:340
RDKit::isMoleculeReactantOfReaction
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeReactantOfReaction(const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which)
RDKit::ROMol
Definition: ROMol.h:171
RDKitBase.h
pulls in the core RDKit functionality
RDKit::MOL_SPTR_VECT
std::vector< boost::shared_ptr< ROMol > > MOL_SPTR_VECT
Definition: FragCatParams.h:20
RDKit::ChemicalReactionException::ChemicalReactionException
ChemicalReactionException(const std::string msg)
construct with an error message
Definition: Reaction.h:52
RDKit::ChemicalReaction::ChemicalReaction
ChemicalReaction(const ChemicalReaction &other)
Definition: Reaction.h:125
RDKit::ChemicalReaction::beginReactantTemplates
MOL_SPTR_VECT::const_iterator beginReactantTemplates() const
Definition: Reaction.h:240
RDKit::ChemicalReaction::addAgentTemplate
unsigned int addAgentTemplate(ROMOL_SPTR mol)
Adds a new agent template.
Definition: Reaction.h:164
RDProps.h
RDKit::ChemicalReactionException::ChemicalReactionException
ChemicalReactionException(const char *msg)
construct with an error message
Definition: Reaction.h:50
RDKit::ChemicalReaction::endReactantTemplates
MOL_SPTR_VECT::const_iterator endReactantTemplates() const
Definition: Reaction.h:243
RDKit::ChemicalReactionException::message
const char * message() const
get the error message
Definition: Reaction.h:54
RDKit::ChemicalReaction::beginProductTemplates
MOL_SPTR_VECT::const_iterator beginProductTemplates() const
Definition: Reaction.h:247
RDKit::ChemicalReaction
This is a class for storing and applying general chemical reactions.
Definition: Reaction.h:119
RDKit::ChemicalReaction::getNumAgentTemplates
unsigned int getNumAgentTemplates() const
Definition: Reaction.h:287
RDKit::ChemicalReaction::addReactantTemplate
unsigned int addReactantTemplate(ROMOL_SPTR mol)
Adds a new reactant template.
Definition: Reaction.h:153
RDKit::ChemicalReaction::ChemicalReaction
ChemicalReaction()
Definition: Reaction.h:123
RDKit::RDProps
Definition: RDProps.h:10
RDKit::ChemicalReaction::endReactantTemplates
MOL_SPTR_VECT::iterator endReactantTemplates()
Definition: Reaction.h:264
RDKit::ChemicalReaction::addProductTemplate
unsigned int addProductTemplate(ROMOL_SPTR mol)
Adds a new product template.
Definition: Reaction.h:174
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::ChemicalReactionException::~ChemicalReactionException
~ChemicalReactionException()
Definition: Reaction.h:55
RDKit::ChemicalReaction::setImplicitPropertiesFlag
void setImplicitPropertiesFlag(bool val)
Definition: Reaction.h:343
RDKit::ChemicalReaction::getAgents
const MOL_SPTR_VECT & getAgents() const
Definition: Reaction.h:237
RDKit::ChemicalReaction::getNumProductTemplates
unsigned int getNumProductTemplates() const
Definition: Reaction.h:284
RDKit::ChemicalReaction::getNumReactantTemplates
unsigned int getNumReactantTemplates() const
Definition: Reaction.h:281
RDKit::getReactingAtoms
RDKIT_CHEMREACTIONS_EXPORT VECT_INT_VECT getReactingAtoms(const ChemicalReaction &rxn, bool mappedAtomsOnly=false)
RDKIT_CHEMREACTIONS_EXPORT
#define RDKIT_CHEMREACTIONS_EXPORT
Definition: export.h:60
RDKit::ChemicalReaction::beginProductTemplates
MOL_SPTR_VECT::iterator beginProductTemplates()
Definition: Reaction.h:268
RDKit::ReactionPickler
handles pickling (serializing) reactions
Definition: ReactionPickler.h:41
RDKit::addRecursiveQueriesToReaction
RDKIT_CHEMREACTIONS_EXPORT void addRecursiveQueriesToReaction(ChemicalReaction &rxn, const std::map< std::string, ROMOL_SPTR > &queries, const std::string &propName, std::vector< std::vector< std::pair< unsigned int, std::string >>> *reactantLabels=NULL)
add the recursive queries to the reactants of a reaction
RDDepict::compute2DCoordsForReaction
RDKIT_CHEMREACTIONS_EXPORT void compute2DCoordsForReaction(RDKit::ChemicalReaction &rxn, double spacing=2.0, bool updateProps=true, bool canonOrient=false, unsigned int nFlipsPerSample=0, unsigned int nSamples=0, int sampleSeed=0, bool permuteDeg4Nodes=false)
Generate 2D coordinates (a depiction) for a reaction.
RDKit::ChemicalReaction::isInitialized
bool isInitialized() const
Definition: Reaction.h:298
RDDepict
Definition: Reaction.h:444
RDKit::ChemicalReaction::endAgentTemplates
MOL_SPTR_VECT::iterator endAgentTemplates()
Definition: Reaction.h:278
RDKit::ChemicalReaction::endAgentTemplates
MOL_SPTR_VECT::const_iterator endAgentTemplates() const
Definition: Reaction.h:257
RDKit::ROMOL_SPTR
boost::shared_ptr< ROMol > ROMOL_SPTR
Definition: ChemTransforms.h:22
SubstructMatch.h
RDKit::ChemicalReaction::beginAgentTemplates
MOL_SPTR_VECT::iterator beginAgentTemplates()
Definition: Reaction.h:275
RDKit::isMoleculeProductOfReaction
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeProductOfReaction(const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which)
RDKit::ChemicalReaction::endProductTemplates
MOL_SPTR_VECT::iterator endProductTemplates()
Definition: Reaction.h:271
export.h