Open Babel  3.0
reactionfacade.h
Go to the documentation of this file.
1 /**********************************************************************
2 reactionfacade.h - A facade class to help interrogate and manipulate
3  reactions
4 
5 Copyright (C) 2018 by Noel M. O'Boyle
6 
7 This file is part of the Open Babel project.
8 For more information, see <http://openbabel.org/>
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation version 2 of the License.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 ***********************************************************************/
19 
20 #ifndef OB_REACTIONFACADE_H
21 #define OB_REACTIONFACADE_H
22 
23 namespace OpenBabel
24 {
25  class OBMol;
26  class OBAtom;
27  class OBReactionFacadePrivate;
28 
38  };
58  class OBAPI OBReactionFacade
59  {
60  public:
69  OBReactionFacade(OBMol *mol);
87  void AssignComponentIds(bool wipe = true);
91  OBReactionRole GetRole(OBAtom *atom);
95  unsigned int GetComponentId(OBAtom *atom);
99  void SetRole(OBAtom* atom, OBReactionRole rxnrole);
103  void SetComponentId(OBAtom* atom, unsigned int compid);
135  bool IsValid();
148  void AddComponent(OBMol *mol, OBReactionRole rxnrole);
160  void ClearInternalState();
173  bool GetComponent(OBMol *mol, OBReactionRole rxnrole, unsigned int num);
177  unsigned int NumComponents(OBReactionRole rxnrole);
192  bool ReassignComponent(OBReactionRole oldrole, unsigned int num, OBReactionRole newrole);
197  private:
198  OBReactionFacadePrivate *d;
199  };
200 } // namespace OpenBabel
201 #endif // OB_REACTIONFACADE_H
202 
product
Definition: reactionfacade.h:37
Molecule Class.
Definition: mol.h:118
agent, a term that includes solvents and catalysts
Definition: reactionfacade.h:36
Facade to simplify manipulation of reactions stored as OBMol objects.
Definition: reactionfacade.h:58
no reaction role - useful for temporarily hiding a component
Definition: reactionfacade.h:34
reactant
Definition: reactionfacade.h:35
OBReactionRole
Definition: reactionfacade.h:33
Global namespace for all Open Babel code.
Definition: alias.h:22
Atom class.
Definition: atom.h:71