OBReaction Class Reference

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

#include <reaction.h>

Inheritance diagram for OBReaction:

List of all members.

Public Member Functions

 OBReaction ()
int NumReactants () const
int NumProducts () const
void AddReactant (const std::tr1::shared_ptr< OBMol > sp)
void AddProduct (const std::tr1::shared_ptr< OBMol > sp)
void SetTransitionState (const std::tr1::shared_ptr< OBMol > sp)
void AddAgent (const std::tr1::shared_ptr< OBMol > sp)
std::tr1::shared_ptr< OBMolGetReactant (const unsigned i)
std::tr1::shared_ptr< OBMolGetProduct (const unsigned i)
std::tr1::shared_ptr< OBMolGetTransitionState () const
std::tr1::shared_ptr< OBMolGetAgent () 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)
virtual bool Clear ()
virtual OBBaseDoTransformations (const std::map< std::string, std::string > *)
template<class T>
T * CastAndClear (bool clear=true)
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)
unsigned int 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 (  )  [inline]


Member Function Documentation

int NumReactants (  )  const [inline]

int NumProducts (  )  const [inline]

void AddReactant ( const std::tr1::shared_ptr< OBMol sp  )  [inline]

void AddProduct ( const std::tr1::shared_ptr< OBMol sp  )  [inline]

void SetTransitionState ( const std::tr1::shared_ptr< OBMol sp  )  [inline]

void AddAgent ( const std::tr1::shared_ptr< OBMol sp  )  [inline]

std::tr1::shared_ptr<OBMol> GetReactant ( const unsigned  i  )  [inline]

std::tr1::shared_ptr<OBMol> GetProduct ( const unsigned  i  )  [inline]

std::tr1::shared_ptr<OBMol> GetTransitionState (  )  const [inline]

std::tr1::shared_ptr<OBMol> GetAgent (  )  const [inline]

std::string GetTitle (  )  const [inline]

std::string GetComment (  )  const [inline]

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

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

bool IsReversible (  )  const [inline]

void SetReversible ( bool  b = true  )  [inline]

static const char* ClassDescription (  )  [inline, static]

Returns:
A list of descriptions of command-line options for DoTransformations()

Reimplemented from OBBase.

bool Clear ( void   )  [virtual, inherited]

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 in OBAtom, OBMol, and OBResidue.

Referenced by OBResidue::Clear(), OBMol::Clear(), and OBAtom::Clear().

virtual OBBase* DoTransformations ( const std::map< std::string, std::string > *   )  [inline, virtual, inherited]

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()

Reimplemented in OBMol.

T* CastAndClear ( bool  clear = true  )  [inline, inherited]

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

bool HasData ( const char *  s  )  [inherited]

Returns:
whether the generic attribute/value pair exists

bool HasData ( const unsigned int  type  )  [inherited]

Returns:
whether the generic attribute/value pair exists, for a given OBGenericDataType

void DeleteData ( unsigned int  type  )  [inherited]

void DeleteData ( OBGenericData gd  )  [inherited]

Delete the given generic data from this object.

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

Delete all of the given generic data from this object.

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

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

void CloneData ( OBGenericData d  )  [inherited]

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

Since:
version 2.2

unsigned int DataSize (  )  const [inline, inherited]

Returns:
the number of OBGenericData items attached to this molecule.

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

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

std::vector< OBGenericData * > GetData ( DataOrigin  source  )  [inherited]

Returns:
all data with a specific origin, suitable for iterating

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

OBDataIterator BeginData (  )  [inline, inherited]

Returns:
An iterator pointing to the beginning of the data

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

OBDataIterator EndData (  )  [inline, inherited]

Returns:
An iterator pointing to the end of the data

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


Member Data Documentation


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