From b165a74471e05d78559e8e7925ef50bfba24de90 Mon Sep 17 00:00:00 2001 From: Bas van Beek Date: Tue, 16 Jun 2020 17:30:52 +0200 Subject: [PATCH] Update documentation for https://github.com/nlesc-nano/data-CAT/pull/25 --- docs/7_database.rst | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/docs/7_database.rst b/docs/7_database.rst index 2dc7c4b1..89a62f5c 100755 --- a/docs/7_database.rst +++ b/docs/7_database.rst @@ -77,18 +77,80 @@ Index OpenQD OpenYaml + PDBTuple + DTYPE_ATOM + DTYPE_BOND + API --- .. autoclass:: Database :members: + .. autoclass:: DFProxy + .. autoclass:: OpenLig :members: :inherited-members: + .. autoclass:: OpenQD :members: :inherited-members: + .. autoclass:: OpenYaml :members: :inherited-members: + +.. autoclass:: PDBTuple + :members: + +.. data:: DTYPE_ATOM + :value: pandas.DataFrame(...) + + A :class:`pandas.DataFrame` representing the dtype of :attr:`PDBTuple.atoms`. + + Most field names are based on to their, identically named, counterpart as produced by + :func:`readpdb()`, + the data in question being stored in the + :class:`Atom.properties.pdb_info` block. + + There are four exception to this general rule: + + * ``coords``: Based on :class:`Atom.coords`. + * ``symbol``: Based on :class:`Atom.symbol`. + * ``charge``: Based on :class:`Atom.properties.charge`. + * ``charge_float``: Based on :class:`Atom.properties.charge_float`. + + .. code:: python + + >>> from dataCAT import DTYPE_ATOM + >>> print(DTYPE_ATOM) # doctest: +SKIP + dtype shape + name + IsHeteroAtom bool 0 + SerialNumber int16 0 + Name |S4 0 + ResidueName |S3 0 + ChainId |S1 0 + ResidueNumber int16 0 + coords float32 3 + Occupancy float32 0 + TempFactor float32 0 + symbol |S4 0 + charge int8 0 + charge_float float64 0 + + +.. data:: DTYPE_BOND + :value: pandas.DataFrame(...) + + A :class:`pandas.DataFrame` representing the dtype of :attr:`PDBTuple.bonds`. + + .. code:: python + + >>> from dataCAT import DTYPE_BOND + >>> print(DTYPE_BOND) + dtype shape + name + atoms int32 2 + order int8 0