Data Types

A module with various data-types used throughout Data-CAT.

Index

ATOMS_DTYPE

The datatype of PDBContainer.atoms

BONDS_DTYPE

The datatype of PDBContainer.bonds

ATOM_COUNT_DTYPE

The datatype of PDBContainer.atom_count

BOND_COUNT_DTYPE

The datatype of PDBContainer.bond_count

LIG_IDX_DTYPE

The datatype of PDBContainer.index as used by the ligand database

QD_IDX_DTYPE

The datatype of PDBContainer.index as used by the QD database

BACKUP_IDX_DTYPE

The default datatype of PDBContainer.index

DT_DTYPE

The datatype of the "date" dataset created by create_hdf5_log()

VERSION_DTYPE

The datatype of the "version" dataset created by create_hdf5_log()

INDEX_DTYPE

The datatype of the "index" dataset created by create_hdf5_log()

MSG_DTYPE

The datatype of the "message" dataset created by create_hdf5_log()

API

dataCAT.dtype.ATOMS_DTYPE : numpy.dtype = ...

The datatype of PDBContainer.atoms

.

Most field names are based on to their, identically named, counterpart as produced by readpdb(), the data in question being stored in the Atom.properties.pdb_info block.

There are six exception to this general rule:

>>> from dataCAT.dtype import ATOMS_DTYPE

>>> print(repr(ATOMS_DTYPE))  
dtype([('IsHeteroAtom', '?'),
       ('SerialNumber', '<i2'),
       ('Name', 'S4'),
       ('ResidueName', 'S3'),
       ('ChainId', 'S1'),
       ('ResidueNumber', '<i2'),
       ('x', '<f4'),
       ('y', '<f4'),
       ('z', '<f4'),
       ('Occupancy', '<f4'),
       ('TempFactor', '<f4'),
       ('symbol', 'S4'),
       ('charge', 'i1'),
       ('charge_float', '<f8')])
dataCAT.dtype.BONDS_DTYPE : numpy.dtype = ...

The datatype of PDBContainer.bonds

.

Field names are based on to their, identically named, counterpart in plams.Bond.

>>> from dataCAT.dtype import BONDS_DTYPE

>>> print(repr(BONDS_DTYPE))  
dtype([('atom1', '<i4'),
       ('atom2', '<i4'),
       ('order', 'i1')])
dataCAT.dtype.ATOM_COUNT_DTYPE : numpy.dtype = ...

The datatype of PDBContainer.atom_count

.

>>> from dataCAT.dtype import ATOM_COUNT_DTYPE

>>> print(repr(ATOM_COUNT_DTYPE))
dtype('int32')
dataCAT.dtype.BOND_COUNT_DTYPE : numpy.dtype = ...

The datatype of PDBContainer.bond_count

.

>>> from dataCAT.dtype import BOND_COUNT_DTYPE

>>> print(repr(BOND_COUNT_DTYPE))
dtype('int32')
dataCAT.dtype.LIG_IDX_DTYPE : numpy.dtype = ...

The datatype of PDBContainer.index as used by the ligand database

.

>>> import h5py
>>> from dataCAT.dtype import LIG_IDX_DTYPE

>>> print(repr(LIG_IDX_DTYPE))  
dtype([('ligand', 'O'),
       ('ligand anchor', 'O')])

>>> h5py.check_string_dtype(LIG_IDX_DTYPE.fields['ligand'][0])
string_info(encoding='ascii', length=None)

>>> h5py.check_string_dtype(LIG_IDX_DTYPE.fields['ligand anchor'][0])
string_info(encoding='ascii', length=None)
dataCAT.dtype.QD_IDX_DTYPE : numpy.dtype = ...

The datatype of PDBContainer.index as used by the QD database

.

>>> import h5py
>>> from dataCAT.dtype import QD_IDX_DTYPE

>>> print(repr(QD_IDX_DTYPE))  
dtype([('core', 'O'),
       ('core anchor', 'O'),
       ('ligand', 'O'),
       ('ligand anchor', 'O')])

>>> h5py.check_string_dtype(QD_IDX_DTYPE.fields['core'][0])
string_info(encoding='ascii', length=None)

>>> h5py.check_string_dtype(QD_IDX_DTYPE.fields['core anchor'][0])
string_info(encoding='ascii', length=None)

>>> h5py.check_string_dtype(QD_IDX_DTYPE.fields['ligand'][0])
string_info(encoding='ascii', length=None)

>>> h5py.check_string_dtype(QD_IDX_DTYPE.fields['ligand anchor'][0])
string_info(encoding='ascii', length=None)
dataCAT.dtype.BACKUP_IDX_DTYPE : numpy.dtype = ...

The default datatype of PDBContainer.index

.

>>> from dataCAT.dtype import BACKUP_IDX_DTYPE

>>> print(repr(BACKUP_IDX_DTYPE))
dtype('int32')
dataCAT.dtype.DT_DTYPE : numpy.dtype = ...

The datatype of the "date" dataset created by create_hdf5_log()

.

Field names are based on their, identically named, counterpart in the datetime class.

>>> from dataCAT.dtype import DT_DTYPE

>>> print(repr(DT_DTYPE))  
dtype([('year', '<i2'),
       ('month', 'i1'),
       ('day', 'i1'),
       ('hour', 'i1'),
       ('minute', 'i1'),
       ('second', 'i1'),
       ('microsecond', '<i4')])
dataCAT.dtype.VERSION_DTYPE : numpy.dtype = ...

The datatype of the "version" dataset created by create_hdf5_log()

.

Field names are based on their, identically named, counterpart in the nanoutils.VersionInfo namedtuple.

>>> from dataCAT.dtype import VERSION_DTYPE

>>> print(repr(VERSION_DTYPE))  
dtype([('major', 'i1'),
       ('minor', 'i1'),
       ('micro', 'i1')])
dataCAT.dtype.INDEX_DTYPE : numpy.dtype = ...

The datatype of the "index" dataset created by create_hdf5_log()

.

Used for representing a ragged array of 32-bit integers.

>>> import h5py
>>> from dataCAT.dtype import INDEX_DTYPE

>>> print(repr(INDEX_DTYPE))
dtype('O')

>>> h5py.check_vlen_dtype(INDEX_DTYPE)
dtype('int32')
dataCAT.dtype.MSG_DTYPE : numpy.dtype = ...

The datatype of the "message" dataset created by create_hdf5_log()

.

Used for representing variable-length ASCII strings.

>>> import h5py
>>> from dataCAT.dtype import MSG_DTYPE

>>> print(repr(MSG_DTYPE))
dtype('O')

>>> h5py.check_string_dtype(MSG_DTYPE)
string_info(encoding='ascii', length=None)
dataCAT.dtype.FORMULA_DTYPE : numpy.dtype = ...

The datatype of the "/ligand/properties/formula" dataset.

.

Used for representing variable-length ASCII strings.

>>> import h5py
>>> from dataCAT.dtype import FORMULA_DTYPE

>>> print(repr(FORMULA_DTYPE))
dtype('O')

>>> h5py.check_string_dtype(FORMULA_DTYPE)
string_info(encoding='ascii', length=None)
dataCAT.dtype.LIG_COUNT_DTYPE : numpy.dtype = ...

The datatype of the "/qd/properties/ligand count" dataset.

.

>>> from dataCAT.dtype import LIG_COUNT_DTYPE

>>> print(repr(LIG_COUNT_DTYPE))
dtype('int32')