diff --git a/.travis.yml b/.travis.yml index 123e5ae8e32..ad445469e60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ env: - BUILD_DOCS=false - PYTHON_VERSION=2.7 - MAIN_CMD="python ./testsuite/MDAnalysisTests/mda_nosetests --processes=2 --process-timeout=400 --no-open-files --with-timer --timer-top-n 50" - - MAIN_CMD_OPTIONS="" + - SETUP_CMD="" - COVERALLS=false - BUILD_CMD="pip install -v package/ && pip install testsuite/" - CONDA_DEPENDENCIES="mmtf-python nose=1.3.7 mock six biopython networkx cython joblib nose-timer" @@ -33,14 +33,15 @@ env: - CONDA_CHANNEL_PRIORITY=True - NUMPY_VERSION=stable matrix: - - NAME='minimal' PYTHON_VERSION=2.7 MAIN_CMD_OPTIONS='--with-memleak' + - NAME='minimal' PYTHON_VERSION=2.7 SETUP_CMD='--with-memleak' matrix: fast_finish: true include: - os: linux env: NAME="Doc" - MAIN_CMD="cd package && python setup.py build_sphinx" + MAIN_CMD="cd package && python setup.py" + SETUP_CMD="build_sphinx" BUILD_DOCS=true BUILD_CMD="cd ${TRAVIS_BUILD_DIR}/package && python setup.py build_ext --inplace" CONDA_DEPENDENCIES=${CONDA_ALL_DEPENDENCIES} @@ -54,7 +55,7 @@ matrix: - os: linux env: NAME='full' - MAIN_CMD_OPTIONS='--with-coverage --cover-package MDAnalysis' + SETUP_CMD='--with-coverage --cover-package MDAnalysis' CONDA_DEPENDENCIES=${CONDA_ALL_DEPENDENCIES} COVERALLS='true' @@ -83,14 +84,13 @@ install: HOLE_BINDIR="${HOME}/${MDA_OPTPACKAGES}/hole2/exe"; \ export PATH=${PATH}:${HOLE_BINDIR}; \ fi - - if [[ $BUILD_DOCS == "true" ]] ; then conda install sphinx=1.5.1; fi - eval $BUILD_CMD script: - cd ${TRAVIS_BUILD_DIR} - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ulimit -S -n 2048; fi - - echo $MAIN_CMD $MAIN_CMD_OPTIONS - - eval $MAIN_CMD $MAIN_CMD_OPTIONS + - echo $MAIN_CMD $SETUP_CMD + - eval $MAIN_CMD $SETUP_CMD after_success: - if [[ $COVERALLS == 'true' ]]; then coveralls; fi diff --git a/package/.pylintrc b/package/.pylintrc index 3463e32a3dc..ab966147016 100644 --- a/package/.pylintrc +++ b/package/.pylintrc @@ -118,7 +118,6 @@ enable=abstract-class-instantiated, invalid-slots, invalid-slots-object, invalid-star-assignment-target, - invalid-unary-operand-type, logging-format-truncated, logging-not-lazy, logging-too-few-args, @@ -156,7 +155,6 @@ enable=abstract-class-instantiated, old-octal-literal, old-raise-syntax, parameter-unpacking, - raising-bad-type, raising-non-exception, raising-string, raw_input-builtin, @@ -270,6 +268,8 @@ enable=abstract-class-instantiated, # used-before-assignment, # wildcard-import, # wrong-import-order, + # invalid-unary-operand-type, + # raising-bad-type, [REPORTS] diff --git a/package/CHANGELOG b/package/CHANGELOG index 0090ff835c7..f1f48bab57d 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -24,8 +24,12 @@ Enhancements * Residues with the same residue ids are not merged by default now (apply to PDB, GRO) (Issue #1306) +Fixes + * Various documentation sphinx errors (PR #1312) + Changes * Enable various pylint warnings to increase python 3 compatibility + * Change Mathjax cdn (Issue #1313) 04/10/17 kain88-de, fiona-naughton, richardjgowers, tyler.je.reddy, jdetle euhruska, orbeckst, rbrtdlg, jbarnoud, wouterboomsma, shanmbic, diff --git a/package/MDAnalysis/analysis/align.py b/package/MDAnalysis/analysis/align.py index 7918c77ff0a..d4d24f78fbf 100644 --- a/package/MDAnalysis/analysis/align.py +++ b/package/MDAnalysis/analysis/align.py @@ -552,20 +552,21 @@ def __init__(self, mobile, reference, select='all', filename=None, Notes ----- - If set to `verbose=False`, it is recommended to wrap the statement in a - ``try ... finally`` to guarantee restoring of the log level in the - case of an exception. + - If set to ``verbose=False``, it is recommended to wrap the statement in a + ``try ... finally`` to guarantee restoring of the log level in the + case of an exception. + - The ``in_memory`` option changes the `mobile` universe to an + in-memory representation (see :mod:`MDAnalysis.coordinates.memory`) + for the remainder of the Python session. If ``mobile.trajectory`` is + already a :class:`MemoryReader` then it is *always* treated as if + ``in_memory`` had been set to ``True``. - The `in_memory` option changes the `mobile` universe to an in-memory - representation (see :mod:`MDAnalysis.coordinates.memory`) for the - remainder of the Python session. If ``mobile.trajectory```is already a - :class:`MemoryReader` then it is *always* treated as if `in_memory` had - been set to ``True``. .. versionchanged:: 0.16.0 - new general 'weights' kwarg replace mass_weights, deprecated 'mass_weights' + new general ``weights`` kwarg replace ``mass_weights`` + .. deprecated:: 0.16.0 - Instead of ``mass_weighted=True`` use new ``weights='mass'` + Instead of ``mass_weighted=True`` use new ``weights='mass'`` """ select = rms.process_selection(select) diff --git a/package/MDAnalysis/analysis/contacts.py b/package/MDAnalysis/analysis/contacts.py index 2325573614e..64f4eb93206 100644 --- a/package/MDAnalysis/analysis/contacts.py +++ b/package/MDAnalysis/analysis/contacts.py @@ -536,7 +536,6 @@ def q1q2(u, selection='all', radius=4.5, # until then it remains because we don't have the functionality # elsewhere. -@deprecate(new_name="Contacts", message="This class will be removed in 0.17") class ContactAnalysis(object): """Perform a native contact analysis ("q1-q2"). @@ -564,48 +563,47 @@ class ContactAnalysis(object): accessible as the attribute :attr:`ContactAnalysis.timeseries`. + Parameters + ---------- + topology : filename as str + topology file + trajectory : filename as str + trajectory + ref1 : filename or ``None``, optional + structure of the reference conformation 1 (pdb); if ``None`` the + *first* frame of the trajectory is chosen + ref2 : filename or ``None``, optional + structure of the reference conformation 2 (pdb); if ``None`` the + *last* frame of the trajectory is chosen + radius : float, optional, default 8 A + contacts are deemed any Ca within radius + targetdir : path, optional, default ``.`` + output files are saved in this directory + infix : string, optional + additional tag string that is inserted into the output filename of + the data file + selection : string, optional, default ``"name CA"`` + MDAnalysis selection string that selects the particles of + interest; the default is to only select the C-alpha atoms + in `ref1` and `ref2` + + .. Note:: If `selection` produces more than one atom per + residue then you will get multiple contacts per + residue unless you also set `centroids` = ``True`` + centroids : bool + If set to ``True``, use the centroids for the selected atoms on a + per-residue basis to compute contacts. This allows, for instance + defining the sidechains as `selection` and then computing distances + between sidechain centroids. + .. deprecated:: 0.15.0 """ + @deprecate(new_name="Contacts", message="This class will be removed in 0.17") def __init__(self, topology, trajectory, ref1=None, ref2=None, radius=8.0, targetdir=os.path.curdir, infix="", force=False, selection="name CA", centroids=False): - """ - Parameters - ---------- - topology : filename as str - topology file - trajectory : filename as str - trajectory - ref1 : filename or ``None``, optional - structure of the reference conformation 1 (pdb); if ``None`` the - *first* frame of the trajectory is chosen - ref2 : filename or ``None``, optional - structure of the reference conformation 2 (pdb); if ``None`` the - *last* frame of the trajectory is chosen - radius : float, optional, default 8 A - contacts are deemed any Ca within radius - targetdir : path, optional, default ``.`` - output files are saved in this directory - infix : string, optional - additional tag string that is inserted into the output filename of - the data file - selection : string, optional, default ``"name CA"`` - MDAnalysis selection string that selects the particles of - interest; the default is to only select the C-alpha atoms - in `ref1` and `ref2` - - .. Note:: If `selection` produces more than one atom per - residue then you will get multiple contacts per - residue unless you also set `centroids` = ``True`` - centroids : bool - If set to ``True``, use the centroids for the selected atoms on a - per-residue basis to compute contacts. This allows, for instance - defining the sidechains as `selection` and then computing distances - between sidechain centroids. - - """ self.topology = topology self.trajectory = trajectory @@ -834,7 +832,6 @@ def plot(self, **kwargs): ylabel(r"$q_2$") -@deprecate(new_name="Contacts", message="This class will be removed in 0.17") class ContactAnalysis1(object): """Perform a very flexible native contact analysis with respect to a single reference. @@ -900,6 +897,7 @@ class ContactAnalysis1(object): .. deprecated:: 0.15.0 """ + @deprecate(new_name="Contacts", message="This class will be removed in 0.17") def __init__(self, *args, **kwargs): """Calculate native contacts within a group or between two groups. diff --git a/package/MDAnalysis/analysis/diffusionmap.py b/package/MDAnalysis/analysis/diffusionmap.py index d305d51bb69..b05a5078bbe 100644 --- a/package/MDAnalysis/analysis/diffusionmap.py +++ b/package/MDAnalysis/analysis/diffusionmap.py @@ -115,6 +115,7 @@ map method. The :class:`DistanceMatrix` exists in :mod:`~MDAnalysis.analysis.diffusionmap` and can be passed as an initialization argument for :class:`DiffusionMap`. + >>> import MDAnalysis as mda >>> import MDAnalysis.analysis.diffusionmap as diffusionmap >>> from MDAnalysis.tests.datafiles import PSF, DCD diff --git a/package/MDAnalysis/analysis/gnm.py b/package/MDAnalysis/analysis/gnm.py index c13b8fdcef9..b4a39065028 100644 --- a/package/MDAnalysis/analysis/gnm.py +++ b/package/MDAnalysis/analysis/gnm.py @@ -24,7 +24,7 @@ #Ben Hall (benjamin.a.hall@ucl.ac.uk) is to blame #Copyright 2011; Consider under GPL v2 or later -""" +r""" Elastic network analysis of MD trajectories --- :mod:`MDAnalysis.analysis.gnm` ============================================================================== @@ -37,21 +37,22 @@ An example is provided in the MDAnalysis Cookbook_, listed as GNMExample_. -.. GNMExample_: https://github.com/MDAnalysis/MDAnalysisCookbook/blob/master/examples/GNMExample.py -.. Cookbook_: https://github.com/MDAnalysis/MDAnalysisCookbook +.. _GNMExample: https://github.com/MDAnalysis/MDAnalysisCookbook/blob/master/examples/GNMExample.py +.. _Cookbook: https://github.com/MDAnalysis/MDAnalysisCookbook The basic approach is to pass a trajectory to :class:`GNMAnalysis` and then run the analysis:: - u = MDAnalysis.Universe(PSF, DCD) - C = MDAnalysis.analysis.gnm.GNMAnalysis(u, ReportVector="output.txt") + u = MDAnalysis.Universe(PSF, DCD) + C = MDAnalysis.analysis.gnm.GNMAnalysis(u, ReportVector="output.txt") + + C.run() + output = zip(*C.results) - C.run() - output = zip(*C.results) + with open("eigenvalues.dat", "w") as outputfile: + for item in output[1]: + outputfile.write(item + "\n") - with open("eigenvalues.dat", "w") as outputfile: - for item in output[1]: - outputfile.write(item + "\n") The results are found in :attr:`GNMAnalysis.results`, which can be used for further processing (see [Hall2007]_). @@ -181,7 +182,10 @@ class GNMAnalysis(object): `Bonus_groups` is contained in `selection` as this could lead to double counting. No checks are applied. Default is ``None``. - .. SeeAlso:: :class:`closeContactGNMAnalysis` + See Also + -------- + :class:`closeContactGNMAnalysis` + .. versionchanged:: 0.16.0 Made :meth:`generate_output` a private method :meth:`_generate_output`. @@ -337,13 +341,18 @@ class closeContactGNMAnalysis(GNMAnalysis): the atoms that form a contact. MassWeight : bool (deprecated, optional) if set to ``True`` equivalent to `weights` set to "size". - .. Note:: This option does not perform a true mass weighting but - weighting by the number of atoms in each residue; the name - of the parameter exists for historical reasons and will - be removed in 0.17.0. Until then, setting `MassWeight` to - anything but ``None`` will override `weights`. - .. SeeAlso:: :class:`GNMAnalysis` + Notes + ----- + The `MassWeight` option does not perform a true mass weighting but + weighting by the number of atoms in each residue; the name of the parameter + exists for historical reasons and will be removed in 0.17.0. Until then, + setting `MassWeight` to anything but ``None`` will override `weights`. + + See Also + -------- + :class:`GNMAnalysis` + .. versionchanged:: 0.16.0 Made :meth:`generate_output` a private method :meth:`_generate_output`. diff --git a/package/MDAnalysis/analysis/hbonds/hbond_analysis.py b/package/MDAnalysis/analysis/hbonds/hbond_analysis.py index 6c8156f75ac..88d8880486d 100644 --- a/package/MDAnalysis/analysis/hbonds/hbond_analysis.py +++ b/package/MDAnalysis/analysis/hbonds/hbond_analysis.py @@ -21,7 +21,7 @@ # # Hydrogen Bonding Analysis -""" +r""" Hydrogen Bond analysis --- :mod:`MDAnalysis.analysis.hbonds.hbond_analysis` =========================================================================== @@ -283,6 +283,7 @@ class HydrogenBondAnalysis_OtherFF(HydrogenBondAnalysis): ], ... ] + The time of each step is not stored with each hydrogen bond frame but in :attr:`~HydrogenBondAnalysis.timesteps`. @@ -467,7 +468,7 @@ def __init__(self, universe, selection1='protein', selection2='all', selection1_ Parameters ---------- - universe : universe + universe : Universe Universe object selection1 : str (optional) Selection string for first selection ['protein'] @@ -1019,14 +1020,15 @@ def generate_table(self): 2. "acceptor_idx" 3. "donor_index" 4. "acceptor_index" - 4. "donor_resnm" - 5. "donor_resid" - 6. "donor_atom" - 7. "acceptor_resnm" - 8. "acceptor_resid" - 9. "acceptor_atom" - 10. "distance" - 11. "angle" + 5. "donor_resnm" + 6. "donor_resid" + 7. "donor_atom" + 8. "acceptor_resnm" + 9. "acceptor_resid" + 10. "acceptor_atom" + 11. "distance" + 12. "angle" + .. _recsql: http://pypi.python.org/pypi/RecSQL """ diff --git a/package/MDAnalysis/analysis/leaflet.py b/package/MDAnalysis/analysis/leaflet.py index 78594e82252..71595045cb1 100644 --- a/package/MDAnalysis/analysis/leaflet.py +++ b/package/MDAnalysis/analysis/leaflet.py @@ -45,7 +45,7 @@ (slow) heuristic method to find the best cut off for the LeafletFinder algorithm. -.. MDAnalysisCookbook_: https://github.com/MDAnalysis/MDAnalysisCookbook/tree/master/examples +.. _MDAnalysisCookbook: https://github.com/MDAnalysis/MDAnalysisCookbook/tree/master/examples Algorithm diff --git a/package/MDAnalysis/analysis/pca.py b/package/MDAnalysis/analysis/pca.py index b0453b0ae72..553f89125c6 100644 --- a/package/MDAnalysis/analysis/pca.py +++ b/package/MDAnalysis/analysis/pca.py @@ -67,6 +67,7 @@ PCA class. First load all modules and test data + >>> import MDAnalysis as mda >>> import MDAnalysis.analysis.pca as pca >>> from MDAnalysis.tests.datafiles import PSF, DCD @@ -74,6 +75,7 @@ Given a universe containing trajectory data we can perform Principal Component Analyis by using the class :class:`PCA` and retrieving the principal components. + >>> u = mda.Universe(PSF, DCD) >>> PSF_pca = pca.PCA(u, select='backbone') >>> PSF_pca.run() @@ -117,8 +119,10 @@ class PCA(AnalysisBase): After initializing and calling method with a universe or an atom group, principal components ordering the atom coordinate data by decreasing variance will be available for analysis. As an example: + >>> pca = PCA(universe, select='backbone').run() >>> pca_space = pca.transform(universe.select_atoms('backbone'), 3) + generates the principal components of the backbone of the atomgroup and then transforms those atomgroup coordinates by the direction of those variances. Please refer to the :ref:`PCA-tutorial` for more detailed @@ -151,7 +155,6 @@ class PCA(AnalysisBase): used for the calculation in :meth:`PCA.run` and project it onto the principal components. - Notes ----- Computation can be speed up by supplying a precalculated mean structure diff --git a/package/MDAnalysis/analysis/psa.py b/package/MDAnalysis/analysis/psa.py index d013f0682d1..e5c8a68b533 100644 --- a/package/MDAnalysis/analysis/psa.py +++ b/package/MDAnalysis/analysis/psa.py @@ -1978,14 +1978,14 @@ def get_num_atoms(self): """Return the number of atoms used to construct the :class:`Path` instances in :class:`PSA`. - .. note:: - Must run :meth:`PSAnalysis.generate_paths` prior to calling this - method. - Returns ------- - int - the number of atoms in :class:`PSA`'s :class:`Path`s' + the number of atoms + + Note + ---- + Must run :meth:`PSAnalysis.generate_paths` prior to calling this + method. """ if self.natoms is None: err_str = "No path data; do 'PSAnalysis.generate_paths()' first." diff --git a/package/MDAnalysis/analysis/waterdynamics.py b/package/MDAnalysis/analysis/waterdynamics.py index fdfae89c70f..81ceb579d4f 100644 --- a/package/MDAnalysis/analysis/waterdynamics.py +++ b/package/MDAnalysis/analysis/waterdynamics.py @@ -74,9 +74,6 @@ 10.1063/1.3657408 - -.. _examples: - Example use of the analysis classes ----------------------------------- @@ -865,9 +862,9 @@ class AngularDistribution(object): universe : Universe Universe object selection : str - Selection string to evaluate its angular distribution [‘byres name OH2’] + Selection string to evaluate its angular distribution ['byres name OH2'] bins : int (optional) - Number of bins to create the histogram by means of :func:`numpy.histogram [40] + Number of bins to create the histogram by means of :func:`numpy.histogram` axis : {'x', 'y', 'z'} (optional) Axis to create angle with the vector (HH, OH or dipole) and calculate cosine theta ['z']. diff --git a/package/MDAnalysis/auxiliary/__init__.py b/package/MDAnalysis/auxiliary/__init__.py index 3b32e9cd3f8..c6e891c75b7 100644 --- a/package/MDAnalysis/auxiliary/__init__.py +++ b/package/MDAnalysis/auxiliary/__init__.py @@ -497,6 +497,7 @@ :class:`~MDAnalysis.auxiliary.base.AuxFileReader` extends :class:`~MDAnalysis.auxiliary.base.AuxReader` by providing the following (these may be overwritten by subclasses as appropriate): + ``__init__(auxfile, **kwargs)`` Open *auxfile* and any additional processing of *kwargs*. diff --git a/package/MDAnalysis/auxiliary/base.py b/package/MDAnalysis/auxiliary/base.py index 5364feb540d..945c6a34421 100644 --- a/package/MDAnalysis/auxiliary/base.py +++ b/package/MDAnalysis/auxiliary/base.py @@ -66,7 +66,7 @@ def __init__(cls, name, bases, classdict): class AuxStep(object): - """ Base class for auxiliary timesteps. + """Base class for auxiliary timesteps. Stores the auxiliary data for the current auxiliary step. On creation, ``step`` is set to -1. @@ -82,11 +82,11 @@ class AuxStep(object): determine from auxiliary data; otherwise defaults to 0 ps. Ignored if ``constant_dt`` is False. time_selector: optional - Key to select 'time' value from the full set of data read for each step, - if time selection is enabled; type will vary depending on the auxiliary - data format (see individual AuxReader documentation). - If ``None`` (default value), time is instead calculated as:: - time = step * dt + initial_time + Key to select 'time' value from the full set of data read for each + step, if time selection is enabled; type will vary depending on the + auxiliary data format (see individual AuxReader documentation). If + ``None`` (default value), time is instead calculated as: ``time = step + * dt + initial_time`` data_selector: optional Key(s) to select auxiliary data values of interest from the full set of data read for each step, if data selection is enabled by the reader; @@ -97,13 +97,13 @@ class AuxStep(object): (Default: True) Set to False if ``dt`` is not constant throughout the auxiliary data set, in which case a valid ``time_selector`` must be provided. - Attributes ---------- step : int Number of the current auxiliary step (0-based). - """ + + """ def __init__(self, dt=1, initial_time=0, time_selector=None, data_selector=None, constant_dt=True): self.step = -1 diff --git a/package/MDAnalysis/coordinates/GRO.py b/package/MDAnalysis/coordinates/GRO.py index 1aae2da2acc..302b15a0e41 100644 --- a/package/MDAnalysis/coordinates/GRO.py +++ b/package/MDAnalysis/coordinates/GRO.py @@ -40,8 +40,7 @@ xyz An atom line without velocities. Requires that the 'resid', 'resname', 'name', 'index' and 'pos' keys be supplied. - Eg: fmt['xyz'].format(resid=1, resname='SOL', name='OW2', index=2, - pos=(0.0, 1.0, 2.0)) + Eg: fmt['xyz'].format(resid=1, resname='SOL', name='OW2', index=2, pos=(0.0, 1.0, 2.0)) xyz_v As above, but with velocities. Needs an additional keyword 'vel'. @@ -267,10 +266,13 @@ def write(self, obj): ----------- obj : AtomGroup / Universe / Timestep + Note + ---- The GRO format only allows 5 digits for resid and atom number. If these number become larger than 99,999 then this routine will chop off the leading digits. + .. versionchanged:: 0.7.6 resName and atomName are truncated to a maximum of 5 characters .. versionchanged:: 0.16.0 diff --git a/package/MDAnalysis/coordinates/LAMMPS.py b/package/MDAnalysis/coordinates/LAMMPS.py index 297dbef40d2..afb62f42538 100644 --- a/package/MDAnalysis/coordinates/LAMMPS.py +++ b/package/MDAnalysis/coordinates/LAMMPS.py @@ -51,12 +51,12 @@ :class:`~MDAnalysis.topology.LAMMPSParser.DATAParser`) together with a LAMMPS DCD with "*real*" provide the keyword *format="LAMMPS*":: ->>> u = MDAnalysis.Universe("lammps.data", "lammps_real.dcd", format="LAMMPS") + >>> u = MDAnalysis.Universe("lammps.data", "lammps_real.dcd", format="LAMMPS") If the trajectory uses *units nano* then use :: ->>> u = MDAnalysis.Universe("lammps.data", "lammps_nano.dcd", format="LAMMPS", -... lengthunit="nm", timeunit="ns") + >>> u = MDAnalysis.Universe("lammps.data", "lammps_nano.dcd", format="LAMMPS", + ... lengthunit="nm", timeunit="ns") To scan through a trajectory to find a desirable frame and write to a LAMMPS data file, diff --git a/package/MDAnalysis/coordinates/MMTF.py b/package/MDAnalysis/coordinates/MMTF.py index f506665f8b5..87ad92fcc7e 100644 --- a/package/MDAnalysis/coordinates/MMTF.py +++ b/package/MDAnalysis/coordinates/MMTF.py @@ -23,8 +23,8 @@ """MMTF trajectory reader --- :mod:`MDAnalysis.coordinates.MMTF` ================================================================ -Reads coordinates data from the `Macromolecular Transmission Format -(MMTF) format`_. This should generally be a quicker alternative to PDB. +Reads coordinates data from the Macromolecular Transmission Format format +(MMTF_). This should generally be a quicker alternative to PDB. .. versionadded:: 0.16.0 @@ -35,7 +35,8 @@ :members: .. autofunction:: fetch_mmtf -.. _Macromolecular Transmission Format (MMTF) format: https://mmtf.rcsb.org/ +.. _MMTF: https://mmtf.rcsb.org/ + """ from __future__ import absolute_import @@ -53,10 +54,8 @@ def _parse_mmtf(fn): class MMTFReader(base.SingleFrameReaderBase): - """Topology parser for the MMTF_ format. + """Topology parser for the Macromolecular Transmission Format format (MMTF_). - .. _Macromolecular Transmission Format (MMTF) format: - https://mmtf.rcsb.org/ """ format = 'MMTF' diff --git a/package/MDAnalysis/coordinates/PDB.py b/package/MDAnalysis/coordinates/PDB.py index 86cbeba7fae..6f2318cc0dd 100644 --- a/package/MDAnalysis/coordinates/PDB.py +++ b/package/MDAnalysis/coordinates/PDB.py @@ -55,7 +55,7 @@ W.close() It is important to *always close the trajectory* when done because only at this -step is the final END_ record written, which is required by the `PDB +step is the final END_ record written, which is required by the `PDB 3.2 standard`_. @@ -72,7 +72,7 @@ ----------------------------------------- A pure-Python implementation for PDB files commonly encountered in MD simulations comes under the names :class:`PDBReader` and -:class:`PDBWriter`. It only implements a subset of the `PDB standard`_ +:class:`PDBWriter`. It only implements a subset of the `PDB 3.2 standard`_ (for instance, it does not deal with insertion codes) and also allows some typical enhancements such as 4-letter resids (introduced by CHARMM/NAMD). @@ -140,6 +140,9 @@ The "permissive" flag is not used anymore (and effectively defaults to True); it will be completely removed in 0.16.0. + +.. _`PDB 3.2 standard`: + http://www.wwpdb.org/documentation/format32/v3.2.html """ from __future__ import absolute_import @@ -1030,8 +1033,6 @@ class MultiPDBWriter(PDBWriter): *multiframe* = ``True``), consisting of multiple models (using the MODEL_ and ENDMDL_ records). - .. _`PDB 3.2 standard`: - http://www.wwpdb.org/documentation/format32/v3.2.html .. _MODEL: http://www.wwpdb.org/documentation/format32/sect9.html#MODEL .. _ENDMDL: http://www.wwpdb.org/documentation/format32/sect9.html#ENDMDL diff --git a/package/MDAnalysis/coordinates/PDBQT.py b/package/MDAnalysis/coordinates/PDBQT.py index 2749fa651b7..2e0a40ba18d 100644 --- a/package/MDAnalysis/coordinates/PDBQT.py +++ b/package/MDAnalysis/coordinates/PDBQT.py @@ -230,11 +230,12 @@ def write(self, selection, frame=None): frame : int, optional optionally move to *frame* before writing - .. Note:: + Note + ---- + The first letter of the + :attr:`~MDAnalysis.core.groups.Atom.segid` is used as the PDB + chainID. - The first letter of the - :attr:`~MDAnalysis.core.groups.Atom.segid` is used as the PDB - chainID. .. versionchanged:: 0.11.0 Frames now 0-based instead of 1-based diff --git a/package/MDAnalysis/coordinates/PQR.py b/package/MDAnalysis/coordinates/PQR.py index cc62d48d3ad..181ef6272fa 100644 --- a/package/MDAnalysis/coordinates/PQR.py +++ b/package/MDAnalysis/coordinates/PQR.py @@ -77,9 +77,9 @@ *whitespace* separation between *all* entries). The chainID is optional and can be omitted:: -ATOM 1 N MET 1 -11.921 26.307 10.410 -0.3000 1.8500 -ATOM 36 NH1 ARG 2 -6.545 25.499 3.854 -0.8000 1.8500 -ATOM 37 HH11 ARG 2 -6.042 25.480 4.723 0.4600 0.2245 + ATOM 1 N MET 1 -11.921 26.307 10.410 -0.3000 1.8500 + ATOM 36 NH1 ARG 2 -6.545 25.499 3.854 -0.8000 1.8500 + ATOM 37 HH11 ARG 2 -6.042 25.480 4.723 0.4600 0.2245 .. Warning:: Fields *must be white-space separated* or data are read @@ -202,11 +202,12 @@ def write(self, selection, frame=None): Parameters ---------- - selection + selection : AtomGroup or Universe MDAnalysis AtomGroup or Universe frame : int, optional optionally move to frame number *frame* + .. versionchanged:: 0.11.0 Frames now 0-based instead of 1-based """ diff --git a/package/MDAnalysis/coordinates/XYZ.py b/package/MDAnalysis/coordinates/XYZ.py index 144e0a95f1d..02e08348f4f 100644 --- a/package/MDAnalysis/coordinates/XYZ.py +++ b/package/MDAnalysis/coordinates/XYZ.py @@ -408,7 +408,7 @@ def Writer(self, filename, n_atoms=None, **kwargs): See Also -------- - :class: `XYZWriter` + :class:`XYZWriter` """ if n_atoms is None: n_atoms = self.n_atoms diff --git a/package/MDAnalysis/coordinates/chain.py b/package/MDAnalysis/coordinates/chain.py index e419bfd588e..0497f333ba6 100644 --- a/package/MDAnalysis/coordinates/chain.py +++ b/package/MDAnalysis/coordinates/chain.py @@ -94,11 +94,9 @@ def __init__(self, filenames, **kwargs): names in either plain file names format or ``(filename, format)`` tuple combination. This allows explicit setting of the format for each individual trajectory file. - skip : int, optional skip step (also passed on to the individual trajectory readers); must be same for all trajectories - dt : float, optional Passed to individual trajectory readers to enforce a common time difference between frames, in MDAnalysis time units. If not set, each @@ -106,15 +104,15 @@ def __init__(self, filenames, **kwargs): files, or set to the reader's default) when reporting frame times; note that this might lead an inconsistent time difference between frames. - **kwargs : dict, optional all other keyword arguments are passed on to each trajectory reader unchanged + .. versionchanged:: 0.8 - The *delta* keyword was added. + The ``delta`` keyword was added. .. versionchanged:: 0.13 - The *delta* keyword was deprecated in favor of using *dt*. + The ``delta`` keyword was deprecated in favor of using ``dt``. """ super(ChainReader, self).__init__() diff --git a/package/MDAnalysis/coordinates/core.py b/package/MDAnalysis/coordinates/core.py index d50924daa06..fbd918b03fe 100644 --- a/package/MDAnalysis/coordinates/core.py +++ b/package/MDAnalysis/coordinates/core.py @@ -103,15 +103,10 @@ def writer(filename, n_atoms=None, **kwargs): a multiframe writer and then fall back to single frame [``None``] kwargs : optional Keyword arguments for the writer; all trajectory Writers accept - at least - *start* - starting time [0] - *step* - step size in frames [1] - *dt* - length of time between two frames, in ps [1.0] - Some readers accept additional arguments, which need to be looked - up in the documentation of the reader. + ``start``: starting time [0], ``step``: step size in frames [1], + ``dt``: length of time between two frames, in ps [1.0] Some readers + accept additional arguments, which need to be looked up in the + documentation of the reader. Returns ------- @@ -123,8 +118,10 @@ def writer(filename, n_atoms=None, **kwargs): MDAnalysis.coordinates.XTC.XTCWriter : Gromacs XTC trajectories MDAnalysis.coordinates.TRR.TRRWriter : Gromacs TRR trajectories + .. versionchanged:: 0.7.6 Added *multiframe* keyword. See also :func:`get_writer_for`. + """ Writer = get_writer_for(filename, format=kwargs.pop('format', None), multiframe=kwargs.pop('multiframe', None)) diff --git a/package/MDAnalysis/core/groups.py b/package/MDAnalysis/core/groups.py index 44f124bb20b..6ec7b43dffd 100644 --- a/package/MDAnalysis/core/groups.py +++ b/package/MDAnalysis/core/groups.py @@ -648,16 +648,17 @@ def bbox(self, **kwargs): If ``True``, move all atoms within the primary unit cell before calculation. [``False``] - .. note:: - The :class:`MDAnalysis.core.flags` flag *use_pbc* when set to - ``True`` allows the *pbc* flag to be used by default. - Returns ------- corners : array 2x3 array giving corners of bounding box as [[xmin, ymin, zmin], [xmax, ymax, zmax]]. + Note + ---- + The :class:`MDAnalysis.core.flags` flag *use_pbc* when set to + ``True`` allows the *pbc* flag to be used by default. + .. versionadded:: 0.7.2 .. versionchanged:: 0.8 Added *pbc* keyword @@ -683,10 +684,6 @@ def bsphere(self, **kwargs): If ``True``, move all atoms within the primary unit cell before calculation. [``False``] - .. note:: - The :class:`MDAnalysis.core.flags` flag *use_pbc* when set to - ``True`` allows the *pbc* flag to be used by default. - Returns ------- R : float @@ -694,6 +691,11 @@ def bsphere(self, **kwargs): center : array Coordinates of sphere center as ``[xcen,ycen,zcen]``. + Note + ---- + The :class:`MDAnalysis.core.flags` flag *use_pbc* when set to + ``True`` allows the *pbc* flag to be used by default. + .. versionadded:: 0.7.3 .. versionchanged:: 0.8 Added *pbc* keyword @@ -2089,7 +2091,7 @@ def write(self, filename=None, file_format="PDB", Parameters ---------- filename : str, optional - ``None``: create TRJNAME_FRAME.FORMAT from filenamefmt [``None``] + ``None``: create TRJNAME_FRAME.FORMAT from filenamefmt [``None``] file_format : str, optional PDB, CRD, GRO, VMD (tcl), PyMol (pml), Gromacs (ndx) CHARMM (str) Jmol (spt); case-insensitive and can also be supplied as the @@ -2098,13 +2100,12 @@ def write(self, filename=None, file_format="PDB", format string for default filename; use substitution tokens 'trjname' and 'frame' ["%(trjname)s_%(frame)d"] bonds : str, optional - how to handle bond information, especially relevant for PDBs; - default is ``"conect"``. - * ``"conect"``: write only the CONECT records defined in the original - file - * ``"all"``: write out all bonds, both the original defined and those - guessed by MDAnalysis - * ``None``: do not write out bonds + how to handle bond information, especially relevant for PDBs. + ``"conect"``: write only the CONECT records defined in the original + file. ``"all"``: write out all bonds, both the original defined and + those guessed by MDAnalysis. ``None``: do not write out bonds. + Default os ``"conect"``. + .. versionchanged:: 0.9.0 Merged with write_selection. This method can now write both diff --git a/package/MDAnalysis/core/topology.py b/package/MDAnalysis/core/topology.py index edc5d397406..2c11d2f3632 100644 --- a/package/MDAnalysis/core/topology.py +++ b/package/MDAnalysis/core/topology.py @@ -151,8 +151,12 @@ class TransTable(object): Parameters ---------- - n_atoms, n_residues, n_segments : int - number of atoms, residues, segments in topology + n_atoms : int + number of atoms in topology + n_residues : int + number of residues in topology + n_segments : int + number of segments in topology atom_resindex : 1-D array resindex for each atom in the topology; the number of unique values in this array must be <= `n_residues`, and the array must be length @@ -165,8 +169,12 @@ class TransTable(object): Attributes ---------- - n_atoms, n_residues, n_segments : int - number of atoms, residues, segments in topology + n_atoms : int + number of atoms in topology + n_residues : int + number of residues in topology + n_segments : int + number of segments in topology size tuple describing the shape of the TransTable @@ -428,24 +436,29 @@ class Topology(object): to residues, residues to segments, and vice-versa, are handled internally by this object. - Parameters - ---------- - n_atoms, n_residues, n_segments : int - number of atoms, residues, segments in topology; there must be at least - 1 element of each level in the system - attrs : TopologyAttr objects - components of the topology to be included - atom_resindex : array - 1-D array giving the resindex of each atom in the system - residue_segindex : array - 1-D array giving the segindex of each residue in the system - """ def __init__(self, n_atoms=1, n_res=1, n_seg=1, attrs=None, atom_resindex=None, residue_segindex=None): + """ + Parameters + ---------- + n_atoms : int + number of atoms in topology. Must be larger then 1 at each level + n_residues : int + number of residues in topology. Must be larger then 1 at each level + n_segments : int + number of segments in topology. Must be larger then 1 at each level + attrs : TopologyAttr objects + components of the topology to be included + atom_resindex : array + 1-D array giving the resindex of each atom in the system + residue_segindex : array + 1-D array giving the segindex of each residue in the system + + """ self.tt = TransTable(n_atoms, n_res, n_seg, atom_resindex=atom_resindex, residue_segindex=residue_segindex) diff --git a/package/MDAnalysis/core/topologyattrs.py b/package/MDAnalysis/core/topologyattrs.py index ba421c85d06..90535b582eb 100644 --- a/package/MDAnalysis/core/topologyattrs.py +++ b/package/MDAnalysis/core/topologyattrs.py @@ -1362,7 +1362,7 @@ class Bonds(_Connection): Must be initialised by a list of zero based tuples. These indices refer to the atom indices. - Eg: [(0, 1), (1, 2), (2, 3)] + E.g., ` [(0, 1), (1, 2), (2, 3)]` Also adds the `bonded_atoms`, `fragment` and `fragments` attributes. @@ -1416,8 +1416,7 @@ class Angles(_Connection): """Angles between three atoms Initialise with a list of 3 long tuples - Eg: - [(0, 1, 2), (1, 2, 3), (2, 3, 4)] + E.g., `[(0, 1, 2), (1, 2, 3), (2, 3, 4)]` These indices refer to the atom indices. """ diff --git a/package/MDAnalysis/core/topologyobjects.py b/package/MDAnalysis/core/topologyobjects.py index cc77bb14453..5d8a794d472 100644 --- a/package/MDAnalysis/core/topologyobjects.py +++ b/package/MDAnalysis/core/topologyobjects.py @@ -332,15 +332,6 @@ class TopologyDict(object): topologydict = TopologyDict(members) - Arguments - --------- - *members* - A list of :class:`TopologyObject` instances - - Returns - ------- - *topologydict* - A specialised dictionary of the topology instances passed to it TopologyDicts are also built lazily from a :class:`TopologyGroup.topDict` attribute. @@ -378,6 +369,12 @@ class TopologyDict(object): Two :class:`TopologyDict` instances can be combined using addition and it will not create any duplicate bonds in the process. + Arguments + --------- + members : + A list of :class:`TopologyObject` instances + + .. versionadded:: 0.8 .. versionchanged:: 0.9.0 Changed initialisation to use a list of :class:`TopologyObject` @@ -624,6 +621,7 @@ def atomgroup_intersection(self, ag, **kwargs): Only retrieve bonds which are completely contained within the AtomGroup. [``False``] + .. versionadded:: 0.9.0 """ # Issue #780 - if self is empty, return self to avoid invalid mask diff --git a/package/MDAnalysis/core/universe.py b/package/MDAnalysis/core/universe.py index 067efc331e3..05fb4d47f9f 100644 --- a/package/MDAnalysis/core/universe.py +++ b/package/MDAnalysis/core/universe.py @@ -141,7 +141,7 @@ class Universe(object): Parameters ---------- - topology : filename, Topology object or stream + topology : str, Topology object or stream A CHARMM/XPLOR PSF topology file, PDB file or Gromacs GRO file; used to define the list of atoms. If the file includes bond information, partial charges, atom masses, ... then these data will be available to diff --git a/package/MDAnalysis/lib/NeighborSearch.py b/package/MDAnalysis/lib/NeighborSearch.py index 0bd1ae9ddda..81d9e190753 100644 --- a/package/MDAnalysis/lib/NeighborSearch.py +++ b/package/MDAnalysis/lib/NeighborSearch.py @@ -68,7 +68,7 @@ def search(self, atoms, radius, level='A'): Parameters ---------- - atoms : AtomGroup or Atom + atoms : AtomGroup, MDAnalysis.core.groups.Atom list of atoms radius : float Radius for search in Angstrom. diff --git a/package/MDAnalysis/lib/c_distances.pyx b/package/MDAnalysis/lib/c_distances.pyx index b3c4c35d4f5..d3f39029713 100644 --- a/package/MDAnalysis/lib/c_distances.pyx +++ b/package/MDAnalysis/lib/c_distances.pyx @@ -23,7 +23,7 @@ """ Distance calculation library --- :mod:`MDAnalysis.lib.c_distances` -================================================================= +================================================================== Serial versions of all distance calculations """ diff --git a/package/MDAnalysis/lib/c_distances_openmp.pyx b/package/MDAnalysis/lib/c_distances_openmp.pyx index 6b3b9e74705..6424d2215b1 100644 --- a/package/MDAnalysis/lib/c_distances_openmp.pyx +++ b/package/MDAnalysis/lib/c_distances_openmp.pyx @@ -23,7 +23,7 @@ """ Parallel distance calculation library --- :mod:`MDAnalysis.lib.c_distances_openmp` -================================================================================= +================================================================================== Contains OpenMP versions of the contents of "calc_distances.h" diff --git a/package/MDAnalysis/lib/formats/libmdaxdr.pyx b/package/MDAnalysis/lib/formats/libmdaxdr.pyx index ba204904e39..bcba535a34a 100644 --- a/package/MDAnalysis/lib/formats/libmdaxdr.pyx +++ b/package/MDAnalysis/lib/formats/libmdaxdr.pyx @@ -502,7 +502,7 @@ cdef class TRRFile(_XDRFile): Parameters ---------- - xyz : ndarray, shape=(n_atoms, 3) + xyz : ndarray, shape=(`n_atoms`, 3) cartesion coordinates box : ndarray, shape=(3, 3) Box vectors for this frame @@ -685,7 +685,7 @@ cdef class XTCFile(_XDRFile): Parameters ---------- - xyz : ndarray, shape=(n_atoms, 3) + xyz : ndarray, shape=(`n_atoms`, 3) cartesion coordinates box : ndarray, shape=(3, 3) Box vectors for this frame diff --git a/package/MDAnalysis/lib/util.py b/package/MDAnalysis/lib/util.py index a8ded68d246..85284ca98bc 100644 --- a/package/MDAnalysis/lib/util.py +++ b/package/MDAnalysis/lib/util.py @@ -559,28 +559,26 @@ def __init__(self, stream, filename, reset=True, close=False): the keyword *reset* is set to ``False``. If rewinding fails, a :class:`MDAnalysis.StreamWarning` is issued. - .. Note:: - - By default, this stream will *not* be closed by :keyword:`with` and - :meth:`close` (see there) unless the *close* keyword is set to - ``True``. - - Arguments - --------- + Parameters + ---------- stream : stream - an open stream (e.g. :class:`file` or :func:`cStringIO.StringIO`) + an open stream (e.g. :class:`file` or :func:`cStringIO.StringIO`) filename : str - the filename that should be associated with the stream - - Keywords - -------- - reset : boolean, default ``True`` - start the stream from the beginning (either :meth:`reset` or :meth:`seek`) - when the class instance is constructed - close : booelan, default ``True`` - close the stream when a :keyword:`with` block exits or when - :meth:`close` is called; note that the default is **not to close - the stream** + the filename that should be associated with the stream + reset : bool + start the stream from the beginning (either :meth:`reset` or :meth:`seek`) + when the class instance is constructed + close : bool + close the stream when a :keyword:`with` block exits or when + :meth:`close` is called; note that the default is **not to close + the stream** + + Notes + ----- + By default, this stream will *not* be closed by :keyword:`with` and + :meth:`close` (see there) unless the `close` keyword is set to + ``True``. + .. versionadded:: 0.9.0 """ diff --git a/package/MDAnalysis/topology/TPRParser.py b/package/MDAnalysis/topology/TPRParser.py index f2eae75326e..90cb748425a 100644 --- a/package/MDAnalysis/topology/TPRParser.py +++ b/package/MDAnalysis/topology/TPRParser.py @@ -152,7 +152,7 @@ class TPRParser(TopologyReaderBase): - """Read topology information from a Gromacs_ TPR_ file. + """Read topology information from a Gromacs_ `TPR file`_. .. _Gromacs: http://www.gromacs.org .. _TPR file: http://manual.gromacs.org/current/online/tpr.html diff --git a/package/MDAnalysis/topology/guessers.py b/package/MDAnalysis/topology/guessers.py index 639e9b93e9a..68fc1f84fe2 100644 --- a/package/MDAnalysis/topology/guessers.py +++ b/package/MDAnalysis/topology/guessers.py @@ -113,7 +113,7 @@ def guess_atom_element(atomname): return atomname[0] -def guess_bonds(atoms, coords, **kwargs): +def guess_bonds(atoms, coords, box=None, **kwargs): r"""Guess if bonds exist between two atoms based on their distance. Bond between two atoms is created, if the two atoms are within @@ -135,21 +135,18 @@ def guess_bonds(atoms, coords, **kwargs): fudge_factor : float, optional The factor by which atoms must overlap eachother to be considered a bond. Larger values will increase the number of bonds found. [0.72] - vdwradii : dict, optional To supply custom vdwradii for atoms in the algorithm. Must be a dict of format {type:radii}. The default table of van der Waals radii is hard-coded as :data:`MDAnalysis.topology.tables.vdwradii`. Any user defined vdwradii passed as an argument will supercede the table values. [``None``] - lower_bound : float, optional The minimum bond length. All bonds found shorter than this length will be ignored. This is useful for parsing PDB with altloc records where atoms with altloc A and B maybe very close together and there should be no chemical bond between them. [0.1] - - box : dimensions, optional + box : array_like, optional Bonds are found using a distance search, if unit cell information is given, periodic boundary conditions will be considered in the distance search. [``None``] @@ -203,7 +200,8 @@ def guess_bonds(atoms, coords, **kwargs): lower_bound = kwargs.get('lower_bound', 0.1) - box = kwargs.get('box', None) + if box is not None: + box = np.asarray(box) # to speed up checking, calculate what the largest possible bond # atom that would warrant attention. diff --git a/package/MDAnalysis/visualization/__init__.py b/package/MDAnalysis/visualization/__init__.py index aec0554fca2..24c0fd27743 100644 --- a/package/MDAnalysis/visualization/__init__.py +++ b/package/MDAnalysis/visualization/__init__.py @@ -26,7 +26,7 @@ ================================================================ """ from __future__ import absolute_import -__all__ = ['streamlines', 'streamlines_3D'] +from . import streamlines +from . import streamlines_3D -import streamlines -import streamlines_3D +__all__ = ['streamlines', 'streamlines_3D'] diff --git a/package/MDAnalysis/visualization/streamlines.py b/package/MDAnalysis/visualization/streamlines.py index fa21b823bc3..4b4d2d3cf75 100644 --- a/package/MDAnalysis/visualization/streamlines.py +++ b/package/MDAnalysis/visualization/streamlines.py @@ -170,7 +170,7 @@ def produce_list_centroids_this_frame(list_indices_in_polygon): def generate_streamlines(coordinate_file_path, trajectory_file_path, grid_spacing, MDA_selection, start_frame, end_frame, xmin, xmax, ymin, ymax, maximum_delta_magnitude, num_cores='maximum'): - '''Produce the x and y components of a 2D streamplot data set. + """Produce the x and y components of a 2D streamplot data set. :Parameters: **coordinate_file_path** : str @@ -234,10 +234,10 @@ def generate_streamlines(coordinate_file_path, trajectory_file_path, grid_spacin .. image:: testing_streamline.png .. [Chavent2014] Chavent, M.\*, Reddy, T.\*, Dahl, C.E., Goose, J., Jobard, B., and Sansom, M.S.P. (2014) - Methodologies for the analysis of instantaneous lipid diffusion in MD simulations of large membrane systems. - *Faraday Discussions* **169**: **Accepted** + Methodologies for the analysis of instantaneous lipid diffusion in MD simulations of large membrane systems. + *Faraday Discussions* **169**: **Accepted** - ''' + """ # work out the number of cores to use: if num_cores == 'maximum': num_cores = multiprocessing.cpu_count() # use all available cores diff --git a/package/doc/sphinx/source/conf.py b/package/doc/sphinx/source/conf.py index 8e5a0284532..73a1e484f9f 100644 --- a/package/doc/sphinx/source/conf.py +++ b/package/doc/sphinx/source/conf.py @@ -58,8 +58,9 @@ def __getattr__(cls, name): # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'sphinx.ext.napoleon',] -mathjax_path = 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' + 'sphinx.ext.napoleon', 'sphinx.ext.todo'] + +mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/package/doc/sphinx/source/documentation_pages/analysis/encore.rst b/package/doc/sphinx/source/documentation_pages/analysis/encore.rst index ac2123acffe..a7b8e3ee86d 100644 --- a/package/doc/sphinx/source/documentation_pages/analysis/encore.rst +++ b/package/doc/sphinx/source/documentation_pages/analysis/encore.rst @@ -10,8 +10,8 @@ .. versionadded:: 0.16.0 The module contains implementations of similarity measures between protein -ensembles described in [Lindorff-Larsen2009]_. The implementation and examples -are described in [Tiberti2015]_. +ensembles described in [Lindorff-Larsen2009_doc]_. The implementation and examples +are described in [Tiberti2015_doc]_. The module includes facilities for handling ensembles and trajectories through the :class:`Universe` class, performing clustering or dimensionality reduction @@ -34,7 +34,7 @@ as well as two methods to evaluate the convergence of trajectories: + **Dimensionality-reduction based convergence evaluation** : :func:`~MDAnalysis.analysis.encore.similarity.dres_convergence` -When using this module in published work please cite [Tiberti2015]_. +When using this module in published work please cite [Tiberti2015_doc]_. Modules @@ -55,7 +55,6 @@ Modules References ---------- -.. [Lindorff-Larsen2009] Similarity Measures for Protein Ensembles. Lindorff-Larsen, K. Ferkinghoff-Borg, J. PLoS ONE 2008, 4, e4203. - -.. [Tiberti2015] ENCORE: Software for Quantitative Ensemble.. Comparison. Matteo Tiberti, Elena Papaleo, Tone Bengtsen, Wouter Boomsma, Kresten Lindorff- Larsen. PLoS Comput Biol. 2015, 11, e1004415 +.. [Lindorff-Larsen2009_doc] Similarity Measures for Protein Ensembles. Lindorff-Larsen, K. Ferkinghoff-Borg, J. PLoS ONE 2008, 4, e4203. +.. [Tiberti2015_doc] ENCORE: Software for Quantitative Ensemble.. Comparison. Matteo Tiberti, Elena Papaleo, Tone Bengtsen, Wouter Boomsma, Kresten Lindorff- Larsen. PLoS Comput Biol. 2015, 11, e1004415 diff --git a/package/doc/sphinx/source/documentation_pages/analysis_modules.rst b/package/doc/sphinx/source/documentation_pages/analysis_modules.rst index d1982e281c0..7da649d8683 100644 --- a/package/doc/sphinx/source/documentation_pages/analysis_modules.rst +++ b/package/doc/sphinx/source/documentation_pages/analysis_modules.rst @@ -75,7 +75,6 @@ Nucleic acids :maxdepth: 1 analysis/nuclinfo - analysis/legacy/x3dna Polymers ======== diff --git a/package/doc/sphinx/source/documentation_pages/lib/c_distances.rst b/package/doc/sphinx/source/documentation_pages/lib/c_distances.rst index ad0d800efd5..962e1d9055a 100644 --- a/package/doc/sphinx/source/documentation_pages/lib/c_distances.rst +++ b/package/doc/sphinx/source/documentation_pages/lib/c_distances.rst @@ -1,2 +1,2 @@ -.. automodule:: MDAnalysis.lib._distances +.. automodule:: MDAnalysis.lib.c_distances :members: diff --git a/package/doc/sphinx/source/documentation_pages/lib/c_distances_openmp.rst b/package/doc/sphinx/source/documentation_pages/lib/c_distances_openmp.rst index ab1af2de950..d03ca6e6f7f 100644 --- a/package/doc/sphinx/source/documentation_pages/lib/c_distances_openmp.rst +++ b/package/doc/sphinx/source/documentation_pages/lib/c_distances_openmp.rst @@ -1,2 +1,2 @@ -.. automodule:: MDAnalysis.lib._distances_openmp +.. automodule:: MDAnalysis.lib.c_distances_openmp :members: diff --git a/package/doc/sphinx/source/documentation_pages/references.rst b/package/doc/sphinx/source/documentation_pages/references.rst index eec47bfa642..3df14b09839 100644 --- a/package/doc/sphinx/source/documentation_pages/references.rst +++ b/package/doc/sphinx/source/documentation_pages/references.rst @@ -48,18 +48,18 @@ code (:mod:`MDAnalysis.analysis.align`) that uses the :mod:`~MDAnalysis.core.qcprot` module please also cite [Theobald2005]_ and [Liu2010]_. -.. [Theobald2005] Douglas L. Theobald. Rapid calculation of RMSD using a +.. [Theobald2005b] Douglas L. Theobald. Rapid calculation of RMSD using a quaternion-based characteristic polynomial. *Acta Crystallographica A* **61** (2005), 478-480. -.. [Liu2010] Pu Liu, Dmitris K. Agrafiotis, and Douglas L. Theobald. Fast +.. [Liu2010b] Pu Liu, Dmitris K. Agrafiotis, and Douglas L. Theobald. Fast determination of the optimal rotational matrix for macromolecular superpositions. *J. Comput. Chem.* **31** (2010), 1561–1563. If you use the helix analysis algorithm HELANAL_ in :mod:`MDAnalysis.analysis.helanal` please cite [Bansal2000]_. -.. [Bansal2000] Bansal M, Kumar S, Velavan R. HELANAL — A program to +.. [Bansal2000b] Bansal M, Kumar S, Velavan R. HELANAL — A program to characterise helix geometry in proteins. *J. Biomol. Struct. Dyn.* **17** (2000), 811–819 @@ -68,14 +68,14 @@ If you use the helix analysis algorithm HELANAL_ in If you use the GNM trajectory analysis code in :mod:`MDAnalysis.analysis.gnm` please cite [Hall2007]_. -.. [Hall2007] Benjamin A. Hall, Samantha L. Kaye, Andy Pang, Rafael Perera, and +.. [Hall2007b] Benjamin A. Hall, Samantha L. Kaye, Andy Pang, Rafael Perera, and Philip C. Biggin. Characterization of Protein Conformational States by Normal-Mode Frequencies. *JACS* **129** (2007), 11394–11401. If you use the water analysis code in :mod:`MDAnalysis.analysis.waterdynamics` please cite [Araya-Secchi2014]_. -.. [Araya-Secchi2014] R. Araya-Secchi., Tomas Perez-Acle, Seung-gu Kang, Tien +.. [Araya-Secchi2014b] R. Araya-Secchi., Tomas Perez-Acle, Seung-gu Kang, Tien Huynh, Alejandro Bernardin, Yerko Escalona, Jose-Antonio Garate, Agustin D. Martinez, Isaac E. Garcia, Juan C. Saez, Ruhong Zhou. Characterization of a novel water pocket inside the human Cx26 @@ -84,7 +84,7 @@ If you use the water analysis code in If you use the Path Similarity Analysis (PSA) code in :mod:`MDAnalysis.analysis.psa` please cite [Seyler2015]_. -.. [Seyler2015] Seyler SL, Kumar A, Thorpe MF, Beckstein O. Path Similarity +.. [Seyler2015b] Seyler SL, Kumar A, Thorpe MF, Beckstein O. Path Similarity Analysis: A Method for Quantifying Macromolecular Pathways. *PLoS Comput Biol* **11** (2015), e1004568. doi: `10.1371/journal.pcbi.1004568`_ @@ -93,7 +93,7 @@ If you use the Path Similarity Analysis (PSA) code in If you use the implementation of the ENCORE ensemble analysis in :mod:`MDAnalysis.analysis.encore` please cite [Tiberti2015]_. -.. [Tiberti2015] M. Tiberti, E. Papaleo, T. Bengtsen, W. Boomsma, +.. [Tiberti2015b] M. Tiberti, E. Papaleo, T. Bengtsen, W. Boomsma, and K. Lindorff-Larsen. ENCORE: Software for quantitative ensemble comparison. *PLoS Comput Biol*, **11** (2015), e1004415. doi: `10.1371/journal.pcbi.1004415`_ diff --git a/package/setup.cfg b/package/setup.cfg index 039cda196f0..9d74e31fb86 100644 --- a/package/setup.cfg +++ b/package/setup.cfg @@ -13,4 +13,4 @@ universal = 1 all-files = 1 source-dir = doc/sphinx/source build-dir = doc/html -#warning-is-error = 1 +warning-is-error = 1