Loading...
Searching...
No Matches
reactionfacade.h
Go to the documentation of this file.
/**********************************************************************
reactionfacade.h - A facade class to help interrogate and manipulate
reactions
Copyright (C) 2018 by Noel M. O'Boyle
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_REACTIONFACADE_H
#define OB_REACTIONFACADE_H
namespace OpenBabel
{
class OBMol;
class OBAtom;
class OBReactionFacadePrivate;
enum OBReactionRole {
NO_REACTIONROLE,
REACTANT,
AGENT,
PRODUCT
};
class OBAPI OBReactionFacade
{
public:
OBReactionFacade(OBMol *mol);
~OBReactionFacade();
void AssignComponentIds(bool wipe = true);
OBReactionRole GetRole(OBAtom *atom);
unsigned int GetComponentId(OBAtom *atom);
void SetRole(OBAtom* atom, OBReactionRole rxnrole);
void SetComponentId(OBAtom* atom, unsigned int compid);
bool IsValid();
void AddComponent(OBMol *mol, OBReactionRole rxnrole);
void ClearInternalState();
bool GetComponent(OBMol *mol, OBReactionRole rxnrole, unsigned int num);
unsigned int NumComponents(OBReactionRole rxnrole);
bool ReassignComponent(OBReactionRole oldrole, unsigned int num, OBReactionRole newrole);
private:
OBReactionFacadePrivate *d;
};
} // namespace OpenBabel
#endif // OB_REACTIONFACADE_H
OpenBabel::OBAtom
Atom class.
Definition atom.h:72
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
OpenBabel::OBReactionFacade::SetComponentId
void SetComponentId(OBAtom *atom, unsigned int compid)
Definition reactionfacade.cpp:374
OpenBabel::OBReactionFacade::GetRole
OBReactionRole GetRole(OBAtom *atom)
Definition reactionfacade.cpp:358
OpenBabel::OBReactionFacade::GetComponent
bool GetComponent(OBMol *mol, OBReactionRole rxnrole, unsigned int num)
Definition reactionfacade.cpp:350
OpenBabel::OBReactionFacade::ReassignComponent
bool ReassignComponent(OBReactionRole oldrole, unsigned int num, OBReactionRole newrole)
Definition reactionfacade.cpp:370
OpenBabel::OBReactionFacade::SetRole
void SetRole(OBAtom *atom, OBReactionRole rxnrole)
Definition reactionfacade.cpp:378
OpenBabel::OBReactionFacade::AddComponent
void AddComponent(OBMol *mol, OBReactionRole rxnrole)
Definition reactionfacade.cpp:338
OpenBabel::OBReactionFacade::IsValid
bool IsValid()
Definition reactionfacade.cpp:362
OpenBabel::OBReactionFacade::ClearInternalState
void ClearInternalState()
Definition reactionfacade.cpp:346
OpenBabel::OBReactionFacade::OBReactionFacade
OBReactionFacade(OBMol *mol)
Definition reactionfacade.cpp:331
OpenBabel::OBReactionFacade::GetComponentId
unsigned int GetComponentId(OBAtom *atom)
Definition reactionfacade.cpp:354
OpenBabel::OBReactionFacade::NumComponents
unsigned int NumComponents(OBReactionRole rxnrole)
Definition reactionfacade.cpp:366
OpenBabel::OBReactionFacade::AssignComponentIds
void AssignComponentIds(bool wipe=true)
Definition reactionfacade.cpp:342
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
OpenBabel::OBReactionRole
OBReactionRole
Definition reactionfacade.h:33
OpenBabel::REACTANT
@ REACTANT
reactant
Definition reactionfacade.h:35
OpenBabel::AGENT
@ AGENT
agent, a term that includes solvents and catalysts
Definition reactionfacade.h:36
OpenBabel::NO_REACTIONROLE
@ NO_REACTIONROLE
no reaction role - useful for temporarily hiding a component
Definition reactionfacade.h:34
OpenBabel::PRODUCT
@ PRODUCT
product
Definition reactionfacade.h:37