AliasData Class Reference

Indicate atoms as aliases for larger functional groups. More...

#include <openbabel/alias.h>

Inheritance diagram for AliasData:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 AliasData ()
virtual OBGenericDataClone (OBBase *) const
void SetAlias (const std::string &alias)
void SetAlias (const char *alias)
std::string GetAlias () const
void SetExpandedAtoms (std::vector< unsigned int > &atoms)
std::vector< unsigned int > GetExpandedAtoms () const
bool IsExpanded () const
bool Expand (OBMol &mol, const unsigned int atomindex)
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

Protected Attributes

std::string _alias
std::vector< unsigned int > _expandedatoms
std::string _attr
unsigned int _type
DataOrigin _source


Detailed Description

Indicate atoms as aliases for larger functional groups.

Since:
version 2.2
An object of this class can be attached to an OBAtom if it is considered to be a placeholder for an alias, such as Ph, Ser, etc.

If the alias has not been interpreted chemically, the element type of the placeholder atom should be set to Xx so that the molecule is not interpreted incorrectly by formats which do not consider this class.

If the alias has been interpreted chemically, the alias may remain as extra information or as a hint for an alternative representation, for example to a chemical drawing program. The _expandedatoms vector would then contains the indices of the atoms to which the alias is an alternative.


Constructor & Destructor Documentation

AliasData (  )  [inline]


Member Function Documentation

virtual OBGenericData* Clone ( OBBase  )  const [inline, virtual]

Reimplemented from OBGenericData.

void SetAlias ( const std::string &  alias  )  [inline]

Add an alias.

void SetAlias ( const char *  alias  )  [inline]

std::string GetAlias (  )  const [inline]

Return value of alias.

void SetExpandedAtoms ( std::vector< unsigned int > &  atoms  )  [inline]

Add the indices of the atoms that could or do replace the alias.

std::vector<unsigned int> GetExpandedAtoms (  )  const [inline]

Return the indices of the atoms that the alias could or does replace.

bool IsExpanded (  )  const [inline]

bool Expand ( OBMol mol,
const unsigned int  atomindex 
)

void SetAttribute ( const std::string &  v  )  [inline, inherited]

void SetOrigin ( const DataOrigin  s  )  [inline, inherited]

virtual const std::string& GetAttribute (  )  const [inline, virtual, inherited]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType (  )  const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue (  )  const [inline, virtual, inherited]

Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, and OBPairData.

Referenced by OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

virtual DataOrigin GetOrigin (  )  const [inline, virtual, inherited]


Member Data Documentation

std::string _alias [protected]

Referenced by AliasData::Expand().

std::vector<unsigned int> _expandedatoms [protected]

Referenced by AliasData::Expand().

std::string _attr [protected, inherited]

attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]

attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]


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