diff --git a/package/AUTHORS b/package/AUTHORS index 5dc7f25fde4..0e1b5d77b83 100644 --- a/package/AUTHORS +++ b/package/AUTHORS @@ -230,6 +230,7 @@ Chronological list of authors - Geongi Moon - Sumit Gupta - Heet Vekariya + - Lawson Woods - Johannes Stöckelmaier - Jenna M. Swarthout Goddard diff --git a/package/CHANGELOG b/package/CHANGELOG index 065c762e2cf..c42a1f4edb0 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -15,8 +15,8 @@ The rules for this file: ------------------------------------------------------------------------------- ??/??/?? IAlibay, ianmkenney, PicoCentauri, pgbarletta, p-j-smith, - richardjgowers, lilyminium, ALescoulie, hmacdope, HeetVekariya, - JoStoe, jennaswa + richardjgowers, lilyminium, ALescoulie, hmacdope, HeetVekariya, + JoStoe, jennaswa, ljwoods2 * 2.7.0 @@ -33,6 +33,8 @@ Fixes RMSD of None * Fixes hydrogenbonds tutorial path to point to hbonds (Issue #4285, PR #4286) * Fix atom charge reading in PDBQT parser (Issue #4282, PR #4283) + * Fix doctests failing from separated blocks of imports and + execution and incorrectly formatted test output (Issue #3925, PR #4366) Enhancements * Added a reader for GROMOS11 TRC trajectories (PR #4292 , Issue #4291) diff --git a/package/MDAnalysis/analysis/atomicdistances.py b/package/MDAnalysis/analysis/atomicdistances.py index e13c9543bd4..59638dbaf8c 100644 --- a/package/MDAnalysis/analysis/atomicdistances.py +++ b/package/MDAnalysis/analysis/atomicdistances.py @@ -67,44 +67,44 @@ We will calculate the distances between an atom group of atoms 101-105 and an atom group of atoms 4001-4005 with periodic boundary conditions. -To select these atoms: +To select these atoms: :: >>> u = mda.Universe(GRO, XTC) >>> ag1 = u.atoms[100:105] >>> ag2 = u.atoms[4000:4005] We can run the calculations using any variable of choice such as -``my_dists`` and access our results using ``my_dists.results``: +``my_dists`` and access our results using ``my_dists.results``: :: >>> my_dists = ad.AtomicDistances(ag1, ag2).run() >>> my_dists.results array([[37.80813681, 33.2594864 , 34.93676414, 34.51183299, 34.96340209], - [27.11746625, 31.19878079, 31.69439435, 32.63446126, 33.10451345], - [23.27210749, 30.38714688, 32.48269361, 31.91444505, 31.84583838], - [18.40607922, 39.21993135, 39.33468192, 41.0133789 , 39.46885946], - [26.26006981, 37.9966713 , 39.14991106, 38.13423586, 38.95451427], - [26.83845081, 34.66255735, 35.59335027, 34.8926705 , 34.27175056], - [37.51994763, 38.12161091, 37.56481743, 36.8488121 , 35.75278065], - [37.27275501, 37.7831456 , 35.74359073, 34.54893794, 34.76495816], - [38.76272761, 41.31816555, 38.81588421, 39.82491432, 38.890219 ], - [39.20012515, 40.00563374, 40.83857688, 38.77886735, 41.45775864]]) + [27.11746625, 31.19878079, 31.69439435, 32.63446126, 33.10451345], + [23.27210749, 30.38714688, 32.48269361, 31.91444505, 31.84583838], + [18.40607922, 39.21993135, 39.33468192, 41.0133789 , 39.46885946], + [26.26006981, 37.9966713 , 39.14991106, 38.13423586, 38.95451427], + [26.83845081, 34.66255735, 35.59335027, 34.8926705 , 34.27175056], + [37.51994763, 38.12161091, 37.56481743, 36.8488121 , 35.75278065], + [37.27275501, 37.7831456 , 35.74359073, 34.54893794, 34.76495816], + [38.76272761, 41.31816555, 38.81588421, 39.82491432, 38.890219 ], + [39.20012515, 40.00563374, 40.83857688, 38.77886735, 41.45775864]]) To do the computation without periodic boundary conditions, we can enter the keyword argument ``pbc=False`` after ``ag2``. The result is different -in this case: +in this case: :: >>> my_dists_nopbc = ad.AtomicDistances(ag1, ag2, pbc=False).run() >>> my_dists_nopbc.results array([[37.80813681, 33.2594864 , 34.93676414, 34.51183299, 34.96340209], - [27.11746625, 31.19878079, 31.69439435, 32.63446126, 33.10451345], - [23.27210749, 30.38714688, 32.482695 , 31.91444505, 31.84583838], - [18.40607922, 39.21992825, 39.33468192, 41.0133757 , 39.46885946], - [26.26006981, 37.99666906, 39.14990985, 38.13423708, 38.95451311], - [26.83845081, 34.66255625, 35.59335027, 34.8926705 , 34.27174827], - [51.86981409, 48.10347964, 48.39570072, 49.14423513, 50.44804292], - [37.27275501, 37.7831456 , 35.74359073, 34.54893794, 34.76495816], - [56.39657447, 41.31816555, 38.81588421, 39.82491432, 38.890219 ], - [39.20012515, 40.00563374, 40.83857688, 38.77886735, 41.45775864]]) + [27.11746625, 31.19878079, 31.69439435, 32.63446126, 33.10451345], + [23.27210749, 30.38714688, 32.482695 , 31.91444505, 31.84583838], + [18.40607922, 39.21992825, 39.33468192, 41.0133757 , 39.46885946], + [26.26006981, 37.99666906, 39.14990985, 38.13423708, 38.95451311], + [26.83845081, 34.66255625, 35.59335027, 34.8926705 , 34.27174827], + [51.86981409, 48.10347964, 48.39570072, 49.14423513, 50.44804292], + [37.27275501, 37.7831456 , 35.74359073, 34.54893794, 34.76495816], + [56.39657447, 41.31816555, 38.81588421, 39.82491432, 38.890219 ], + [39.20012515, 40.00563374, 40.83857688, 38.77886735, 41.45775864]]) """ @@ -112,8 +112,6 @@ from MDAnalysis.lib.distances import calc_bonds - -import warnings import logging from .base import AnalysisBase diff --git a/package/doc/sphinx/source/documentation_pages/overview.rst b/package/doc/sphinx/source/documentation_pages/overview.rst index daf3cc9a1d4..dce93410f5d 100644 --- a/package/doc/sphinx/source/documentation_pages/overview.rst +++ b/package/doc/sphinx/source/documentation_pages/overview.rst @@ -120,7 +120,7 @@ over time:: < DCDReader '/..../MDAnalysis/tests/data/adk_dims.dcd' with 98 frames of 3341 atoms (0 fixed) > Finally, the :meth:`MDAnalysis.Universe.select_atoms` method generates a new -:class:`~MDAnalysis.core.groups.AtomGroup` according to a selection criterion +:class:`~MDAnalysis.core.groups.AtomGroup` according to a selection criterion:: >>> calphas = u.select_atoms("name CA") >>> print(calphas)