![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Data structure for the storage of imported MMCIF data (see [MMCIF]). More...
Inheritance diagram for CDPL.Biomol.MMCIFData:Classes | |
| class | Category |
| A single mmCIF data category, holding an ordered list of data items (columns). More... | |
| class | Item |
| A single data item (column) of an mmCIF category, holding an ordered list of string values. More... | |
Public Member Functions | |
| None | __init__ () |
Constructs an empty MMCIFData instance with an empty data-block ID. | |
| None | __init__ (MMCIFData data) |
Initializes a copy of the MMCIFData instance data. More... | |
| None | __init__ (str id) |
Constructs an empty MMCIFData instance with the data-block ID id. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| str | getID () |
| Returns the mmCIF data-block ID. More... | |
| None | setID (str id) |
| Sets the mmCIF data-block ID to id. More... | |
| int | getNumCategories () |
| Returns the number of categories in the data record. More... | |
| MMCIFData | assign (MMCIFData data) |
Replaces the current state of self with a copy of the state of the MMCIFData instance data. More... | |
| None | swap (MMCIFData data) |
| Swaps the contents of this data record with those of data. More... | |
| None | clear () |
| Removes all categories from the data record (without changing the data-block ID). | |
| Category | findCategory (str name) |
Returns a mutable reference to the category with name name, or nullptr if no matching category exists. More... | |
| Category | addCategory (str name, bool front=False) |
| Adds a new (empty) category with name name to the data record. More... | |
| Category | getCategory (str name) |
| Returns a reference to the category with name name. More... | |
| Category | getCategory (int index) |
| Returns a reference to the category at the zero-based index index. More... | |
| Category | lastCategory () |
| Returns a mutable reference to the last category of the data record. More... | |
| bool | removeCategory (str name) |
| Removes the category with name name. More... | |
| None | removeCategory (int index) |
| Removes the category at the zero-based index index. More... | |
| int | __len__ () |
| Category | __getitem__ (str name) |
| Category | __getitem__ (int index) |
| bool | __delitem__ (str name) |
| None | __delitem__ (int index) |
| bool | __contains__ (str name) |
Returns the result of the membership test operation name in self. More... | |
| object | __str__ () |
Returns a string representation of the MMCIFData instance. More... | |
Properties | |
| objectID = property(getObjectID) | |
| numCategories = property(getNumCategories) | |
| id = property(getID, setID) | |
Data structure for the storage of imported MMCIF data (see [MMCIF]).
| None CDPL.Biomol.MMCIFData.__init__ | ( | MMCIFData | data | ) |
Initializes a copy of the MMCIFData instance data.
| data | The MMCIFData instance to copy. |
| None CDPL.Biomol.MMCIFData.__init__ | ( | str | id | ) |
Constructs an empty MMCIFData instance with the data-block ID id.
| id | The mmCIF data-block ID. |
| int CDPL.Biomol.MMCIFData.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python MMCIFData instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two MMCIFData instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| str CDPL.Biomol.MMCIFData.getID | ( | ) |
Returns the mmCIF data-block ID.
| None CDPL.Biomol.MMCIFData.setID | ( | str | id | ) |
Sets the mmCIF data-block ID to id.
| id | The new data-block ID. |
| int CDPL.Biomol.MMCIFData.getNumCategories | ( | ) |
Returns the number of categories in the data record.
Replaces the current state of self with a copy of the state of the MMCIFData instance data.
| data | The MMCIFData instance to copy. |
| None CDPL.Biomol.MMCIFData.swap | ( | MMCIFData | data | ) |
Swaps the contents of this data record with those of data.
| data | The other data record to swap with. |
| Category CDPL.Biomol.MMCIFData.findCategory | ( | str | name | ) |
Returns a mutable reference to the category with name name, or nullptr if no matching category exists.
| name | The mmCIF category name (without the leading underscore). |
nullptr. | Category CDPL.Biomol.MMCIFData.addCategory | ( | str | name, |
| bool | front = False |
||
| ) |
Adds a new (empty) category with name name to the data record.
If a category with the given name already exists, no new category is added and a reference to the existing category is returned.
| name | The mmCIF category name (without the leading underscore). |
| front | If True, the new category is inserted at the front of the category list. If False, it is appended. |
| Category CDPL.Biomol.MMCIFData.getCategory | ( | str | name | ) |
Returns a reference to the category with name name.
| name | The mmCIF category name (without the leading underscore). |
| Base.ItemNotFound | if no matching category exists. |
| Category CDPL.Biomol.MMCIFData.getCategory | ( | int | index | ) |
Returns a reference to the category at the zero-based index index.
| index | The zero-based category index. |
| Base.IndexError | if the number of categories is zero or index is not in the range [0, getNumCategories() - 1]. |
| Category CDPL.Biomol.MMCIFData.lastCategory | ( | ) |
Returns a mutable reference to the last category of the data record.
| Base.OperationFailed | if the data record is empty. |
| bool CDPL.Biomol.MMCIFData.removeCategory | ( | str | name | ) |
Removes the category with name name.
| name | The mmCIF category name (without the leading underscore). |
True if a matching category was removed, and False if no such category existed. | None CDPL.Biomol.MMCIFData.removeCategory | ( | int | index | ) |
Removes the category at the zero-based index index.
| index | The zero-based category index. |
| Base.IndexError | if the number of categories is zero or index is not in the range [0, getNumCategories() - 1]. |
| int CDPL.Biomol.MMCIFData.__len__ | ( | ) |
| Category CDPL.Biomol.MMCIFData.__getitem__ | ( | str | name | ) |
| name |
| Category CDPL.Biomol.MMCIFData.__getitem__ | ( | int | index | ) |
| index |
| bool CDPL.Biomol.MMCIFData.__delitem__ | ( | str | name | ) |
| name |
| None CDPL.Biomol.MMCIFData.__delitem__ | ( | int | index | ) |
| index |
| bool CDPL.Biomol.MMCIFData.__contains__ | ( | str | name | ) |
Returns the result of the membership test operation name in self.
| name | The value to test for membership. |
| object CDPL.Biomol.MMCIFData.__str__ | ( | ) |
Returns a string representation of the MMCIFData instance.