#include <openbabel/alias.h>
Public Member Functions | |
AliasData () | |
virtual OBGenericData * | Clone (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 |
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.
AliasData | ( | ) | [inline] |
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] |
Set the attribute (key), which can be used to retrieve this data.
Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(), OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().
void SetOrigin | ( | const DataOrigin | s | ) | [inline, inherited] |
Set the origin of this data, which can be used to filter the data.
Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(), OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().
virtual const std::string& GetAttribute | ( | ) | const [inline, virtual, inherited] |
Referenced by OBMoleculeFormat::MakeCombinedMolecule().
unsigned int GetDataType | ( | ) | const [inline, inherited] |
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] |
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] |
source of data for accounting
Referenced by OBChiralData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(), OBConformerData::operator=(), and OBSymmetryData::operator=().