Difference between revisions of "Generic Data"
Line 5: | Line 5: | ||
* Integer ''type'' keys | * Integer ''type'' keys | ||
− | Generic data is stored internally as an array/vector, so access to a particular key is faster through use of the integer type, defined in the [http://openbabel.sourceforge.net/api/namespaceOpenBabel_1_1OBGenericDataType.shtml OBGenericDataType] namespace. However, arbitrary string keys can be specified, particularly with the OBPairData class, which is designed for assigning textual key/value pairs. | + | Generic data is stored internally as an array/vector, so access to a particular key is faster through use of the integer type, defined in the [http://openbabel.sourceforge.net/api/namespaceOpenBabel_1_1OBGenericDataType.shtml OBGenericDataType] namespace. However, arbitrary string keys can be specified, particularly with the [[Pair Data|OBPairData]] class, which is designed for assigning textual key/value pairs. |
==Defined Attribute Keys== | ==Defined Attribute Keys== | ||
Currently defined text attribute keys by the Open Babel library include: | Currently defined text attribute keys by the Open Babel library include: | ||
− | + | * Comment | |
+ | * Conformers | ||
+ | * ExternalBondData | ||
+ | * PairData | ||
+ | * Symmetry | ||
* UnitCell | * UnitCell | ||
* UndefinedData | * UndefinedData | ||
+ | * VirtualBondData | ||
==Defined Type Keys== | ==Defined Type Keys== |
Latest revision as of 13:49, 19 October 2006
The OBGenericData class and its subclasses are mechanisms for storing arbitrary data inside an atom, a bond, a residue, a molecule -- almost any object in Open Babel.
Two key points are needed when discussing generic data classes. Accessing generic data can occur by two different mechanisms:
- String attributes
- Integer type keys
Generic data is stored internally as an array/vector, so access to a particular key is faster through use of the integer type, defined in the OBGenericDataType namespace. However, arbitrary string keys can be specified, particularly with the OBPairData class, which is designed for assigning textual key/value pairs.
Defined Attribute Keys
Currently defined text attribute keys by the Open Babel library include:
- Comment
- Conformers
- ExternalBondData
- PairData
- Symmetry
- UnitCell
- UndefinedData
- VirtualBondData
Defined Type Keys
Current OBGenericDataType integer keys are defined in the API documentation.