moleculekit.pdbx.reader.PdbxContainers module#

A collection of container classes supporting the PDBx/mmCIF storage model.

A base container class is defined which supports common features of data and definition containers. PDBx data files are organized in sections called data blocks which are mapped to data containers. PDBx dictionaries contain definition sections and data sections which are mapped to definition and data containes respectively.

Data in both PDBx data files and dictionaries are organized in data categories. In the PDBx syntax individual items or data identified by labels of the form ‘_categoryName.attributeName’. The terms category and attribute in PDBx jargon are analogous table and column in relational data model, or class and attribute in an object oriented data model.

The DataCategory class provides base storage container for instance data and definition meta data.

class moleculekit.pdbx.reader.PdbxContainers.CifName#

Bases: object

Class of utilities for CIF-style data names -

static attributePart(name)#
static categoryPart(name)#
class moleculekit.pdbx.reader.PdbxContainers.ContainerBase(name)#

Bases: object

Container base class for data and definition objects.

append(obj)#

Add the input object to the current object catalog. An existing object of the same name will be overwritten.

exists(name)#
getName()#
getObj(name)#
getObjNameList()#
getType()#
printIt(fh=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, type='brief')#
remove(curName)#

Revmove object by name. Return True on success or False otherwise.

rename(curName, newName)#

Change the name of an object in place -

replace(obj)#

Replace an existing object with the input object

setName(name)#
setType(type)#
class moleculekit.pdbx.reader.PdbxContainers.DataCategory(name, attributeNameList=None, rowList=None)#

Bases: DataCategoryBase

Methods for creating, accessing, and formatting PDBx cif data categories.

__getitem__(x)#

Implements list-type functionality - Implements op[x] for some special cases - x=integer - returns the row in category (normal list behavior) x=string - returns the value of attribute ‘x’ in first row.

append(row)#
appendAttribute(attributeName)#
appendAttributeExtendRows(attributeName)#
dumpIt(fh=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)#
getAttributeCount()#
getAttributeIndex(attributeName)#
getAttributeLengthMaximumList()#
getAttributeList()#
getAttributeListWithOrder()#
getAttributeValueMaxLengthList(steps=1)#
getCurrentAttribute()#
getFormatTypeList(steps=1)#
getFormatTypeListX()#
getFullRow(index)#

Return a full row based on the length of the the attribute list.

getIndex(attributeName)#
getItemNameList()#
getName()#
getRow(index)#
getRowCount()#
getRowIndex()#
getRowList()#
getValue(attributeName=None, rowIndex=None)#
getValueFormatted(attributeName=None, rowIndex=None)#
getValueFormattedByIndex(attributeIndex, rowIndex)#
hasAttribute(attributeName)#
invokeAttributeMethod(attributeName, type, method, db)#
invokeCategoryMethod(type, method, db)#
printIt(fh=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)#
removeRow(index)#
renameAttribute(curAttributeName, newAttributeName)#

Change the name of an attribute in place -

replaceSubstring(oldValue, newValue, attributeName)#
replaceValue(oldValue, newValue, attributeName)#
setValue(value, attributeName=None, rowIndex=None)#
class moleculekit.pdbx.reader.PdbxContainers.DataCategoryBase(name, attributeNameList=None, rowList=None)#

Bases: object

Base object definition for a data category -

get()#
setAttributeNameList(attributeNameList)#
setName(name)#
setRowList(rowList)#
class moleculekit.pdbx.reader.PdbxContainers.DataContainer(name)#

Bases: ContainerBase

Container class for DataCategory objects.

getGlobal()#
invokeDataBlockMethod(type, method, db)#
setGlobal()#
class moleculekit.pdbx.reader.PdbxContainers.DefinitionContainer(name)#

Bases: ContainerBase

isAttribute()#
isCategory()#
printIt(fh=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, type='brief')#