Open Babel  3.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
OBReaction Class Reference

#include <reaction.h>

Inheritance diagram for OBReaction:
OBBase

Public Member Functions

 OBReaction ()
 
int NumReactants () const
 
int NumProducts () const
 
int NumAgents () const
 
void AddReactant (const obsharedptr< OBMol > sp)
 
void AddProduct (const obsharedptr< OBMol > sp)
 
void SetTransitionState (const obsharedptr< OBMol > sp)
 
void AddAgent (const obsharedptr< OBMol > sp)
 
obsharedptr< OBMolGetReactant (const unsigned i)
 
obsharedptr< OBMolGetProduct (const unsigned i)
 
obsharedptr< OBMolGetAgent (const unsigned i)
 
obsharedptr< OBMolGetTransitionState () const
 
std::string GetTitle () const
 
std::string GetComment () const
 
void SetTitle (const std::string &title)
 
void SetComment (const std::string &comment)
 
bool IsReversible () const
 
void SetReversible (bool b=true)
 
bool Clear ()
 
virtual OBBaseDoTransformations (const std::map< std::string, std::string > *, OBConversion *)
 
template<class T >
T * CastAndClear (bool clear=true)
 
virtual const char * GetTitle (bool replaceNewlines=true) const
 
virtual void SetTitle (const char *)
 
Generic data handling methods (via OBGenericData)
bool HasData (const std::string &)
 
bool HasData (const char *)
 
bool HasData (const unsigned int type)
 
void DeleteData (unsigned int type)
 
void DeleteData (OBGenericData *)
 
void DeleteData (std::vector< OBGenericData *> &)
 
bool DeleteData (const std::string &s)
 
void SetData (OBGenericData *d)
 
void CloneData (OBGenericData *d)
 
size_t DataSize () const
 
OBGenericDataGetData (const unsigned int type)
 
OBGenericDataGetData (const std::string &)
 
OBGenericDataGetData (const char *)
 
std::vector< OBGenericData * > & GetData ()
 
std::vector< OBGenericData * > GetData (DataOrigin source)
 
std::vector< OBGenericData * > GetAllData (const unsigned int type)
 
OBDataIterator BeginData ()
 
OBDataIterator EndData ()
 

Static Public Member Functions

static const char * ClassDescription ()
 

Protected Attributes

std::vector< OBGenericData * > _vdata
 

Detailed Description

Used to store chemical reactions (i.e., reactants -> products)

Reactants and products stored as smart pointers to molecules stored elsewhere.

For performing actual reaction transformations (i.e., deleting atoms, changing bonds, etc.) use the OBChemTsfm class.

Constructor & Destructor Documentation

◆ OBReaction()

OBReaction ( )
inline

Member Function Documentation

◆ NumReactants()

int NumReactants ( ) const
inline

◆ NumProducts()

int NumProducts ( ) const
inline

◆ NumAgents()

int NumAgents ( ) const
inline

◆ AddReactant()

void AddReactant ( const obsharedptr< OBMol sp)
inline

◆ AddProduct()

void AddProduct ( const obsharedptr< OBMol sp)
inline

◆ SetTransitionState()

void SetTransitionState ( const obsharedptr< OBMol sp)
inline

◆ AddAgent()

void AddAgent ( const obsharedptr< OBMol sp)
inline

◆ GetReactant()

obsharedptr<OBMol> GetReactant ( const unsigned  i)
inline

◆ GetProduct()

obsharedptr<OBMol> GetProduct ( const unsigned  i)
inline

◆ GetAgent()

obsharedptr<OBMol> GetAgent ( const unsigned  i)
inline

◆ GetTransitionState()

obsharedptr<OBMol> GetTransitionState ( ) const
inline

◆ GetTitle() [1/2]

std::string GetTitle ( ) const
inline

◆ GetComment()

std::string GetComment ( ) const
inline

◆ SetTitle() [1/2]

void SetTitle ( const std::string &  title)
inline

◆ SetComment()

void SetComment ( const std::string &  comment)
inline

◆ IsReversible()

bool IsReversible ( ) const
inline

◆ SetReversible()

void SetReversible ( bool  b = true)
inline

◆ ClassDescription()

static const char* ClassDescription ( )
inlinestatic

◆ Clear()

bool Clear ( void  )
inlinevirtual

Clear any and all data associated with this object.

This method can be called by OBConversion::Read() before reading data. Derived classes should be sure to call OBBase::Clear() to remove inherited generic data.

Returns
Whether the call was successful.
Since
version 2.1.

Reimplemented from OBBase.

◆ DoTransformations()

virtual OBBase* DoTransformations ( const std::map< std::string, std::string > *  ,
OBConversion  
)
inlinevirtualinherited

Perform a set of transformations specified by the user

Typically these are program options to filter or modify an object For example, see OBMol::DoTransformations() and OBMol::ClassDescription() Base type does nothing

Reimplemented in OBMol.

◆ CastAndClear()

T* CastAndClear ( bool  clear = true)
inlineinherited

By default clears the object. Called from ReadMolecule of most format classes.

◆ GetTitle() [2/2]

virtual const char* GetTitle ( bool  replaceNewlines = true) const
inlinevirtualinherited

Base type does nothing Made virtual around r3535 to simplify code which passes around OBBase*.

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

◆ SetTitle() [2/2]

virtual void SetTitle ( const char *  )
inlinevirtualinherited

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

◆ HasData() [1/3]

bool HasData ( const std::string &  s)
inherited

◆ HasData() [2/3]

bool HasData ( const char *  s)
inherited
Returns
whether the generic attribute/value pair exists

◆ HasData() [3/3]

bool HasData ( const unsigned int  type)
inherited
Returns
whether the generic attribute/value pair exists, for a given OBGenericDataType

◆ DeleteData() [1/4]

void DeleteData ( unsigned int  type)
inherited

◆ DeleteData() [2/4]

void DeleteData ( OBGenericData gd)
inherited

Delete the given generic data from this object.

◆ DeleteData() [3/4]

void DeleteData ( std::vector< OBGenericData *> &  vg)
inherited

Delete all of the given generic data from this object.

◆ DeleteData() [4/4]

bool DeleteData ( const std::string &  s)
inherited

Deletes the generic data with the specified attribute, returning false if not found.

◆ SetData()

void SetData ( OBGenericData d)
inlineinherited

◆ CloneData()

void CloneData ( OBGenericData d)
inherited

Adds a copy of a data object; does nothing if d == NULL

Since
version 2.2

Referenced by AliasData::Expand().

◆ DataSize()

size_t DataSize ( ) const
inlineinherited
Returns
the number of OBGenericData items attached to this molecule.

◆ GetData() [1/5]

OBGenericData * GetData ( const unsigned int  type)
inherited

◆ GetData() [2/5]

OBGenericData * GetData ( const std::string &  s)
inherited
Returns
any data matching the given attribute name or NULL if nothing matches
the value given an attribute name

◆ GetData() [3/5]

OBGenericData * GetData ( const char *  s)
inherited
Returns
any data matching the given attribute name or NULL if nothing matches
the value given an attribute name

◆ GetData() [4/5]

std::vector<OBGenericData*>& GetData ( )
inlineinherited
Returns
all data, suitable for iterating

Referenced by OBMol::GetEnergies(), OBMol::GetEnergy(), and OBMol::SetEnergies().

◆ GetData() [5/5]

std::vector< OBGenericData * > GetData ( DataOrigin  source)
inherited
Returns
all data with a specific origin, suitable for iterating

◆ GetAllData()

std::vector< OBGenericData * > GetAllData ( const unsigned int  type)
inherited
Returns
the all matching data for a given type from OBGenericDataType or an empty vector if nothing matches
Since
version 2.2

Referenced by OpenBabel::CanonicalLabels(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoAtoms(), OBBuilder::CorrectStereoBonds(), OpenBabel::DeleteStereoOnAtom(), and OBMol::operator+=().

◆ BeginData()

OBDataIterator BeginData ( )
inlineinherited
Returns
An iterator pointing to the beginning of the data

Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().

◆ EndData()

OBDataIterator EndData ( )
inlineinherited
Returns
An iterator pointing to the end of the data

Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().

Member Data Documentation

◆ _vdata

std::vector<OBGenericData*> _vdata
protectedinherited

Custom data.

Referenced by OBMol::OBMol().


The documentation for this class was generated from the following file: