66 void SetAlias(
const std::string& alias) {_alias = alias;}
67 void SetAlias(
const char* alias) {_alias = alias;}
70 std::string GetAlias(
bool rightAligned =
false)
const;
73 std::string
GetColor()
const {
return _color; }
76 void SetColor(std::string color){ _color = color; }
78 bool IsExpanded()
const {
return !_expandedatoms.empty(); }
82 static void RevertToAliasForm(
OBMol& mol);
85 bool Expand(
OBMol& mol,
const unsigned int atomindex);
87 #ifdef HAVE_SHARED_POINTER 88 static bool AddAliases(
OBMol* pmol);
95 bool FormulaParse(
OBMol& mol,
const unsigned atomindex);
98 void AddExpandedAtom(
int id);
101 void DeleteExpandedAtoms(
OBMol& mol);
105 std::string right_form;
109 typedef std::map<std::string, AliasItem> SuperAtomTable;
111 static bool LoadFile(SuperAtomTable& table);
112 static SuperAtomTable& table()
114 static SuperAtomTable t;
119 bool FromNameLookup(
OBMol& mol,
const unsigned int atomindex);
120 #ifdef HAVE_SHARED_POINTER 121 typedef std::vector< std::pair<std::string, obsharedptr<OBSmartsPattern> > > SmartsTable;
122 static bool LoadFile(SmartsTable& smtable);
std::vector< unsigned long > _expandedatoms
Definition: alias.h:57
Base class for generic data.
Definition: base.h:188
const unsigned int AliasDataType
Definition: alias.h:33
bool IsExpanded() const
Definition: alias.h:78
std::string _right_form
Definition: alias.h:56
std::string _alias
Definition: alias.h:55
Molecule Class.
Definition: mol.h:118
std::string GetColor() const
Return the color which has been assigned to this alias.
Definition: alias.h:73
void SetAlias(const std::string &alias)
Add an alias.
Definition: alias.h:66
AliasData()
Definition: alias.h:61
SMARTS (SMiles ARbitrary Target Specification) substructure searching.
Definition: parsmart.h:154
void SetAlias(const char *alias)
Definition: alias.h:67
void SetColor(std::string color)
Assign a color to this alias.
Definition: alias.h:76
virtual OBGenericData * Clone(OBBase *) const
Definition: alias.h:63
std::string _color
Definition: alias.h:58
Handle generic data classes. Custom data for atoms, bonds, etc.
Base Class.
Definition: base.h:239
Indicate atoms as aliases for larger functional groups.
Definition: alias.h:52
Global namespace for all Open Babel code.
Definition: alias.h:22