Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ b8fe34b73c9df9330c1608229b2f8cddc6e275b4
263bbe65047e535fbad981852ad9c7327826f93d
#5446
3160b8efe00c11ab4ebe4ad776ebdf96f090223f
#5564
7095f6200f7fb186962e60614db1c2be90feaa32
4 changes: 2 additions & 2 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
with:
options: "--check"
src: "./package"
version: "~= 24.0"
version: "~= 26.0"

- uses: psf/black@stable
with:
options: "--check"
src: "./testsuite"
version: "~= 24.0"
version: "~= 26.0"


pylint_check:
Expand Down
4 changes: 3 additions & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The rules for this file:

-------------------------------------------------------------------------------
??/??/?? IAlibay, sumitsaraswat362, BradyAJohnston, carlosvega, erikfransson,
orbeckst, jberg5
orbeckst, jberg5, jpkrowe

* 2.12.0

Expand Down Expand Up @@ -48,6 +48,8 @@ Changes
`lib.distances.apply_PBC` no longer defaults ``box`` to ``None`` (it was
always required) and ``return_distances`` in the capped distance functions
is annotated as ``bool`` (PR #5531)
* Codebase is now formatted with black version `26` (previously `24`)
(Issue #5553, PR #5564)

Deprecations

Expand Down
9 changes: 4 additions & 5 deletions package/MDAnalysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
When using MDAnalysis in published work, please cite

R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler,
D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein.
MDAnalysis: A Python package for the rapid analysis of molecular dynamics
simulations. In S. Benthall and S. Rostrup, editors, Proceedings of the 15th
Python in Science Conference, pages 98-105, Austin, TX, 2016. SciPy,
D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein.
MDAnalysis: A Python package for the rapid analysis of molecular dynamics
simulations. In S. Benthall and S. Rostrup, editors, Proceedings of the 15th
Python in Science Conference, pages 98-105, Austin, TX, 2016. SciPy,
doi:10.25080/majora-629e541a-00e

N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and
Expand Down Expand Up @@ -155,7 +155,6 @@
import logging
import warnings


logger = logging.getLogger("MDAnalysis.__init__")

from .version import __version__
Expand Down
5 changes: 3 additions & 2 deletions package/MDAnalysis/analysis/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
rotational superposition use the superposition keyword. This will calculate a
minimized RMSD between the reference and mobile structure::

>>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions,
>>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions,
... superposition=True)
6.809396586471815

Expand Down Expand Up @@ -138,7 +138,7 @@
>>> trj = mda.Universe(PSF, DCD) # trajectory of change 1AKE->4AKE
>>> alignment = align.AlignTraj(trj, ref, filename='rmsfit.dcd')
>>> alignment.run()
<MDAnalysis.analysis.align.AlignTraj object at ...>
<MDAnalysis.analysis.align.AlignTraj object at ...>

It is also possible to align two arbitrary structures by providing a
mapping between atoms based on a sequence alignment. This allows
Expand Down Expand Up @@ -190,6 +190,7 @@
.. autofunction:: get_matching_atoms

"""

import os.path
import warnings
import logging
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/analysis/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class MyAnalysis(AnalysisBase):
def get_supported_backends(cls):
return ('serial', 'multiprocessing', 'dask',)


def _get_aggregator(self):
return ResultsGroup(lookup={'timeseries': ResultsGroup.ndarray_vstack})

Expand All @@ -147,6 +147,7 @@ def _get_aggregator(self):
tools if only the single-frame analysis function needs to be written.

"""

import inspect
import itertools
import logging
Expand Down
9 changes: 5 additions & 4 deletions package/MDAnalysis/analysis/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class to calculate dihedral angles for a given set of atoms or residues
.. footbibliography::

"""

import logging
import warnings

Expand Down Expand Up @@ -404,9 +405,9 @@ def _single_frame(self):
# It is described in two degrees of freedom
# by the polar angle and azimuth
if self._root.dimensions is None:
(p0, p1, p2) = self._root.positions
p0, p1, p2 = self._root.positions
else:
(p0, p1, p2) = make_whole(self._root, inplace=False)
p0, p1, p2 = make_whole(self._root, inplace=False)
v01 = p1 - p0
v21 = p1 - p2
# Internal coordinates
Expand Down Expand Up @@ -546,8 +547,8 @@ def Cartesian(self, bat_frame):
"""
# Split the bat vector into more convenient variables
origin = bat_frame[:3]
(phi, theta, omega) = bat_frame[3:6]
(r01, r12, a012) = bat_frame[6:9]
phi, theta, omega = bat_frame[3:6]
r01, r12, a012 = bat_frame[6:9]
n_torsions = self._ag.n_atoms - 3
bonds = bat_frame[9 : n_torsions + 9]
angles = bat_frame[n_torsions + 9 : 2 * n_torsions + 9]
Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/analysis/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def is_any_closer(r, r0, dist=2.5):
.. footbibliography::

"""

import os
import errno
import warnings
Expand Down
23 changes: 11 additions & 12 deletions package/MDAnalysis/analysis/data/filenames.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

:mod:`MDAnalysis.analysis.data` contains data files that are used as part of
analysis. These can be experimental or theoretical data. Files are stored
inside the package and made accessible via variables in
inside the package and made accessible via variables in
:mod:`MDAnalysis.analysis.data.filenames`. These variables are documented
below, including references to the literature and where they are used inside
:mod:`MDAnalysis.analysis`.
Expand All @@ -51,20 +51,20 @@
ax.contourf(X, Y, Z, levels=[1, 17, 15000])

The given levels will draw contours that contain 90% and 99% of the data
points.The reference data are shown in
points.The reference data are shown in
:ref:`Ramachandran reference plot figure <figure-rama-ref-plot>`. An example
of analyzed data together with the reference data are shown in
:ref:`Ramachandran plot figure <figure-ramachandran>` as an example.


.. _figure-rama-ref-plot:

.. figure:: /images/rama_ref_plot.png
:scale: 80%
:alt: Ramachandran Ref Plot
Reference Ramachandran plot, with contours that contain 90%
("allowed region") and 99% ("generously allowed region") of the data points

Reference Ramachandran plot, with contours that contain 90%
("allowed region") and 99% ("generously allowed region") of the data points
from the reference data set.

.. data:: Janin_ref
Expand All @@ -84,8 +84,8 @@
ax.contourf(X, Y, Z, levels=[1, 6, 600])

The given levels will draw contours that contain 90% and 98% of the
data. The reference data are shown in
:ref:`Janin reference plot figure <figure-janin-ref-plot>`. An example of
data. The reference data are shown in
:ref:`Janin reference plot figure <figure-janin-ref-plot>`. An example of
analyzed data together with the reference data are shown in
:ref:`Janin plot figure<figure-janin-ref-plot>` as an example.

Expand All @@ -95,13 +95,12 @@
:scale: 85 %
:alt: Janin Ref Plot

Janin reference plot with contours that contain 90% ("allowed region") and
98% ("generously allowed region") of the data points from the reference data
Janin reference plot with contours that contain 90% ("allowed region") and
98% ("generously allowed region") of the data points from the reference data
set.

"""


__all__ = [
"Rama_ref",
"Janin_ref",
Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/analysis/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
.. _`gmx trjconv`: http://manual.gromacs.org/programs/gmx-trjconv.html

"""

import numpy as np
import sys
import os
Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/analysis/diffusionmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@

.. footbibliography::
"""

import logging
import warnings

Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/analysis/dihedrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
.. footbibliography::

"""

import numpy as np
import matplotlib.pyplot as plt

Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/analysis/encore/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

import numpy as np
import logging
import MDAnalysis as mda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

import numpy as np


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

import numpy as np
import warnings
import logging
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/analysis/encore/clustering/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

import numpy as np
from ..utils import ParallelCalculation, merge_universes
from .ClusterCollection import ClusterCollection
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/analysis/encore/confdistmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ class to compute an RMSD matrix in such a way is also available.
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

from joblib import Parallel, delayed
import numpy as np
from getpass import getuser
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/analysis/encore/covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

import numpy as np


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

import logging
import warnings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

"""

import numpy as np
from ..confdistmatrix import get_distance_matrix
from ..utils import ParallelCalculation, merge_universes
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/analysis/encore/similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
.. versionadded:: 0.16.0

.. deprecated:: 2.8.0
This module is deprecated in favour of the
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

Expand Down Expand Up @@ -170,6 +170,7 @@
.. All functions are included via automodule :members:.

"""

import warnings
import logging

Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/analysis/gnm.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
removed unused function :func:`backup_file`

"""

import itertools
import logging
import warnings
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/hbonds/hbond_autocorrel.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
:mod:`MDAnalysis.analysis.hydrogenbonds.hbond_autocorrel`

"""

import warnings

with warnings.catch_warnings():
Expand All @@ -57,7 +58,6 @@

from ..hydrogenbonds import hbond_autocorrel


find_hydrogen_donors = deprecate(
hbond_autocorrel.find_hydrogen_donors,
release="2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/helix_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

hel_xyz = hel.helix_analysis(u.atoms.positions, ref_axis=[0, 0, 1])


Classes
-------

Expand Down
Loading
Loading