Open Babel
3.0
|
#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 (bool rightAligned=false) const |
std::string | GetColor () const |
void | SetColor (std::string color) |
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 |
Static Public Member Functions | |
static void | RevertToAliasForm (OBMol &mol) |
Protected Attributes | |
std::string | _alias |
std::string | _right_form |
std::vector< unsigned long > | _expandedatoms |
std::string | _color |
std::string | _attr |
unsigned int | _type |
DataOrigin | _source |
Indicate atoms as aliases for larger functional groups.
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, COOH, etc.
If the alias has not been interpreted chemically (expanded), 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 (which formats, etc. should normally do immediately), 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 ids of the atoms to which the alias is an alternative.
|
inline |
|
inlinevirtual |
Reimplemented from OBGenericData.
|
inline |
Add an alias.
Referenced by AliasData::RevertToAliasForm().
|
inline |
std::string GetAlias | ( | bool | rightAligned = false | ) | const |
/return value of alias or its version intended to be connected at its right hand end.
Referenced by OBDepict::DrawMolecule().
|
inline |
Return the color which has been assigned to this alias.
Referenced by OBDepict::DrawMolecule().
|
inline |
Assign a color to this alias.
|
inline |
Referenced by OBDepict::DrawMolecule(), and AliasData::RevertToAliasForm().
|
static |
Converts all the expanded aliases in a molecule to the alias form. Note that this deletes atoms and bonds. Use only as a preparation for display.
bool Expand | ( | OBMol & | mol, |
const unsigned int | atomindex | ||
) |
Interprets the alias text and adds atoms as appropriate to mol.
|
inlineinherited |
Set the attribute (key), which can be used to retrieve this data.
Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::ComparePairSecond(), OBMol::DoTransformations(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBForceField::GetAtomTypes(), OBMol::GetFormula(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().
|
inlineinherited |
Set the origin of this data, which can be used to filter the data.
Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::ComparePairSecond(), OBMol::DoTransformations(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(), OBMol::GetLSSR(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().
|
inlinevirtualinherited |
Referenced by OpenBabel::extract_thermochemistry(), and OBMoleculeFormat::MakeCombinedMolecule().
|
inlineinherited |
|
inlinevirtualinherited |
Base class returns a default value (the attribute type) but should never be called.
Reimplemented in OBPairData, and OBCommentData.
Referenced by OBDepict::AddAtomLabels(), OBDepict::DrawMolecule(), OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().
|
inlinevirtualinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
attribute tag (e.g., "UnitCell", "Comment" or "Author")
Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().
|
protectedinherited |
attribute type – declared for each subclass
Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().
|
protectedinherited |
source of data for accounting
Referenced by OBConformerData::operator=(), OBSymmetryData::operator=(), OBTorsionData::operator=(), and OBAngleData::operator=().