Skip to content

Commit

Permalink
Documentation update (#134)
Browse files Browse the repository at this point in the history
*  Update the documentation for nlesc-nano/data-CAT#25.
  • Loading branch information
BvB93 authored Jun 19, 2020
1 parent 3c28ea3 commit 3614fc4
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CAT/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""The **CAT** version."""

__version__ = '0.9.5'
__version__ = '0.9.6'
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_.
* WiP: Added an option the import pre-built quantum dots.


0.9.6
*****
* Updated the documentation for https://github.com/nlesc-nano/data-CAT/pull/25.


0.9.5
*****
* Fixed a bug where rdkit molecules were not properly converted into numpy arrays.
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


##############################
Compound Attachment Tool 0.9.5
Compound Attachment Tool 0.9.6
##############################

**CAT** is a collection of tools designed for the construction of various chemical compounds.
Expand Down
67 changes: 67 additions & 0 deletions docs/7_database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,85 @@ Index
OpenQD
OpenYaml

PDBContainer
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:: PDBContainer
:members: atoms, bonds, atom_count, bond_count, __getitem__, __len__, from_molecules, to_molecules, from_hdf5, to_hdf5

.. data:: DTYPE_ATOM
:type: Mapping[str, np.dtype]
:value: ...

A mapping representing the dtype of :attr:`PDBContainer.atoms`.

Most field names are based on to their, identically named, counterpart as produced by
:func:`readpdb()<scm.plams.interfaces.molecule.rdkit.readpdb>`,
the data in question being stored in the
:class:`Atom.properties.pdb_info<scm.plams.mol.atom.Atom>` block.

There are six exception to this general rule:

* ``x``, ``y`` & ``z``: Based on :class:`Atom.x<scm.plams.mol.atom.Atom>`,
:class:`Atom.y<scm.plams.mol.atom.Atom>` and :class:`Atom.z<scm.plams.mol.atom.Atom>`.
* ``symbol``: Based on :class:`Atom.symbol<scm.plams.mol.atom.Atom>`.
* ``charge``: Based on :class:`Atom.properties.charge<scm.plams.mol.atom.Atom>`.
* ``charge_float``: Based on :class:`Atom.properties.charge_float<scm.plams.mol.atom.Atom>`.

.. code:: python
mappingproxy({
'IsHeteroAtom': dtype('bool'),
'SerialNumber': dtype('int16'),
'Name': dtype('S4'),
'ResidueName': dtype('S3'),
'ChainId': dtype('S1'),
'ResidueNumber': dtype('int16'),
'x': dtype('float32'),
'y': dtype('float32'),
'z': dtype('float32'),
'Occupancy': dtype('float32'),
'TempFactor': dtype('float32'),
'symbol': dtype('S4'),
'charge': dtype('int8'),
'charge_float': dtype('float64')
})
.. data:: DTYPE_BOND
:type: Mapping[str, np.dtype]
:value: ...

A mapping representing the dtype of :attr:`PDBContainer.bonds`.

Field names are based on to their, identically named,
counterpart in :class:`~scm.plams.mol.bond.Bond`.

.. code:: python
mappingproxy({
'atom1': dtype('int32'),
'atom2': dtype('int32'),
'order': dtype('int8')
})
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the built documents.
release = '0.9.5' # The full version, including alpha/beta/rc tags.
release = '0.9.6' # The full version, including alpha/beta/rc tags.
version = release.rsplit('.', maxsplit=1)[0]


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'pydocstyle>=5.0.0',
'pytest-pydocstyle>=2.1',
'pytest-mock',
'data-CAT@git+https://github.com/nlesc-nano/data-CAT@master'
'data-CAT@git+https://github.com/nlesc-nano/data-CAT@devel'
]

if sys.version_info[1] > 6:
Expand Down

0 comments on commit 3614fc4

Please sign in to comment.