From 66f8c8aa6f79fa6f5dcc050395521d1131e786fc Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Fri, 22 Jul 2016 17:20:20 +0200 Subject: [PATCH] Restore doc pages for XTC and TRR Fixes #855 Also delete obsolete doc files for xdrfile. --- package/MDAnalysis/coordinates/TRR.py | 19 ++++++++-- package/MDAnalysis/coordinates/XTC.py | 37 ++++++++++++------- .../documentation_pages/coordinates/TRR.rst | 1 + .../documentation_pages/coordinates/XTC.rst | 1 + .../coordinates/xdrfile.rst | 30 --------------- .../coordinates/xdrfile/TRR.rst | 1 - .../coordinates/xdrfile/XTC.rst | 1 - .../coordinates/xdrfile/core.rst | 1 - .../coordinates/xdrfile/libxdrfile2.rst | 1 - .../coordinates/xdrfile/statno.rst | 1 - .../coordinates_modules.rst | 1 - 11 files changed, 41 insertions(+), 53 deletions(-) delete mode 100644 package/doc/sphinx/source/documentation_pages/coordinates/xdrfile.rst delete mode 100644 package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/TRR.rst delete mode 100644 package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/XTC.rst delete mode 100644 package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/core.rst delete mode 100644 package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/libxdrfile2.rst delete mode 100644 package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/statno.rst diff --git a/package/MDAnalysis/coordinates/TRR.py b/package/MDAnalysis/coordinates/TRR.py index 67a9764cb74..8c13541b38b 100644 --- a/package/MDAnalysis/coordinates/TRR.py +++ b/package/MDAnalysis/coordinates/TRR.py @@ -13,6 +13,17 @@ # MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. # J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787 # +""" +TRR trajectory files --- :mod:`MDAnalysis.coordinates.TRR` +========================================================== + +Read and write GROMACS TRR trajectories. + +See Also +-------- +MDAnalysis.coordinates.XTC: Read and write GROMACS XTC trajectory files. +""" + from .XDR import XDRBaseReader, XDRBaseWriter from ..lib.formats.libmdaxdr import TRRFile from ..lib.mdamath import triclinic_vectors, triclinic_box @@ -28,8 +39,8 @@ class TRRWriter(XDRBaseWriter): corresponding value will be used as the lambda value for written TRR file. If None is found the lambda is set to 0. - Parameter - --------- + Parameters + ---------- filename : str filename of the trajectory n_atoms : int @@ -100,8 +111,8 @@ class TRRReader(XDRBaseReader): The lambda value is written in the data dictionary of the returned TimeStep - Parameter - --------- + Parameters + ---------- filename : str filename of the trajectory convert_units : bool (optional) diff --git a/package/MDAnalysis/coordinates/XTC.py b/package/MDAnalysis/coordinates/XTC.py index 7644b09c1e4..9d79baf30a4 100644 --- a/package/MDAnalysis/coordinates/XTC.py +++ b/package/MDAnalysis/coordinates/XTC.py @@ -13,6 +13,17 @@ # MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. # J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787 # +""" +XTC trajectory files --- :mod:`MDAnalysis.coordinates.XTC` +========================================================== + +Read and write GROMACS XTC trajectories. + +See Also +-------- +MDAnalysis.coordinates.TRR: Read and write GROMACS TRR trajectory files. +""" + from .XDR import XDRBaseReader, XDRBaseWriter from ..lib.formats.libmdaxdr import XTCFile from ..lib.mdamath import triclinic_vectors, triclinic_box @@ -26,15 +37,15 @@ class XTCWriter(XDRBaseWriter): they require significantly less disk space and the loss of precision is usually not a problem. - Parameter - --------- - filename : str + Parameters + ---------- + filename: str filename of the trajectory - n_atoms : int + n_atoms: int number of atoms to write - convert_units : bool (optional) + convert_units: bool (optional) convert into MDAnalysis units - precision : float (optional) + precision: float (optional) set precision of saved trjactory to this number of decimal places. """ format = 'XTC' @@ -52,7 +63,7 @@ def write_next_timestep(self, ts): Parameters ---------- - ts : TimeStep + ts: TimeStep See Also -------- @@ -83,15 +94,15 @@ class XTCReader(XDRBaseReader): require significantly less disk space and the loss of precision is usually not a problem. - Parameter - --------- - filename : str + Parameters + ---------- + filename: str filename of the trajectory - convert_units : bool (optional) + convert_units: bool (optional) convert into MDAnalysis units - sub : atomgroup (optional) + sub: atomgroup (optional) Yeah what is that exactly - refresh_offsets : bool (optional) + refresh_offsets: bool (optional) Recalculate offsets for random access from file. If ``False`` try to retrieve offsets from hidden offsets file. diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/TRR.rst b/package/doc/sphinx/source/documentation_pages/coordinates/TRR.rst index fdd582b3699..aa2b6a1117c 100644 --- a/package/doc/sphinx/source/documentation_pages/coordinates/TRR.rst +++ b/package/doc/sphinx/source/documentation_pages/coordinates/TRR.rst @@ -1 +1,2 @@ .. automodule:: MDAnalysis.coordinates.TRR + :members: diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/XTC.rst b/package/doc/sphinx/source/documentation_pages/coordinates/XTC.rst index 866c80a06d2..9e2f6d05c26 100644 --- a/package/doc/sphinx/source/documentation_pages/coordinates/XTC.rst +++ b/package/doc/sphinx/source/documentation_pages/coordinates/XTC.rst @@ -1 +1,2 @@ .. automodule:: MDAnalysis.coordinates.XTC + :members: diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile.rst b/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile.rst deleted file mode 100644 index 95d59a3ba25..00000000000 --- a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile.rst +++ /dev/null @@ -1,30 +0,0 @@ -NumPy access to Gromacs XDR trajectories --- :mod:`MDAnalysis.coordinates.xdrfile` -================================================================================== - -Gromacs_ trajectory formats are based on the XDR_ (eXternal Data -Representation) format. Within this module, classes are provided to -access frames of Gromacs :mod:`~MDAnalysis.coordinates.XTC` or -:mod:`~MDAnalysis.coordinates.TRR` trajectories. Relevant data -(positions, velocities, forces, box dimensions) are made available as -NumPy_ arrays. The module also contains low-level code in -:mod:`~MDAnalysis.coordinates.xdrfile.libxdrfile2` that performs the -actual file access and includes some additions such as trajectory -indices that provide random access for the Gromacs trajectories (which -is not available with current standard Gromacs tools). - -.. _Gromacs: http://www.gromacs.org -.. _XDR: http://en.wikipedia.org/wiki/External_Data_Representation -.. _numpy: http://www.numpy.org/ - -.. rubric:: Contents - -.. toctree:: - :maxdepth: 1 - - xdrfile/XTC - xdrfile/TRR - xdrfile/core - xdrfile/libxdrfile2 - xdrfile/statno - - diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/TRR.rst b/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/TRR.rst deleted file mode 100644 index fdcc6f56a5c..00000000000 --- a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/TRR.rst +++ /dev/null @@ -1 +0,0 @@ -.. automodule:: MDAnalysis.coordinates.xdrfile.TRR diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/XTC.rst b/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/XTC.rst deleted file mode 100644 index 0be332cc167..00000000000 --- a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/XTC.rst +++ /dev/null @@ -1 +0,0 @@ -.. automodule:: MDAnalysis.coordinates.xdrfile.XTC diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/core.rst b/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/core.rst deleted file mode 100644 index 639a19dee7a..00000000000 --- a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/core.rst +++ /dev/null @@ -1 +0,0 @@ -.. automodule:: MDAnalysis.coordinates.xdrfile.core diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/libxdrfile2.rst b/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/libxdrfile2.rst deleted file mode 100644 index 9a25ff2c9da..00000000000 --- a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/libxdrfile2.rst +++ /dev/null @@ -1 +0,0 @@ -.. automodule:: MDAnalysis.coordinates.xdrfile.libxdrfile2 diff --git a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/statno.rst b/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/statno.rst deleted file mode 100644 index 711d4a327aa..00000000000 --- a/package/doc/sphinx/source/documentation_pages/coordinates/xdrfile/statno.rst +++ /dev/null @@ -1 +0,0 @@ -.. automodule:: MDAnalysis.coordinates.xdrfile.statno diff --git a/package/doc/sphinx/source/documentation_pages/coordinates_modules.rst b/package/doc/sphinx/source/documentation_pages/coordinates_modules.rst index 44a4dff49b7..1b0ecf45d8b 100644 --- a/package/doc/sphinx/source/documentation_pages/coordinates_modules.rst +++ b/package/doc/sphinx/source/documentation_pages/coordinates_modules.rst @@ -49,6 +49,5 @@ functionality should first read the :ref:`Trajectory API`. coordinates/base coordinates/core - coordinates/xdrfile coordinates/pdbextensions