Skip to content
Open
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 package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The rules for this file:
* 2.11.0

Fixes
* Fix doctests in pca.py for newer NumPy output format and testsetup blocks
(Issue #3925, PR #5301)
* Fixes TypeError with np.int64 indexing in GSD Reader (Issue #5224)
* Fixed bug in add_transformations allowing non-callable transformations
(Issue #2558, PR #2558)
Expand Down
24 changes: 12 additions & 12 deletions package/MDAnalysis/analysis/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,10 @@ def rmsip(self, other, n_components=None):

.. testsetup::

>>> import MDAnalysis as mda
>>> import MDAnalysis.analysis.pca as pca
>>> from MDAnalysis.tests.datafiles import PSF, DCD
>>> u = mda.Universe(PSF, DCD)
import MDAnalysis as mda
import MDAnalysis.analysis.pca as pca
from MDAnalysis.tests.datafiles import PSF, DCD
u = mda.Universe(PSF, DCD)


You can compare the RMSIP between different intervals of the same trajectory.
Expand All @@ -703,9 +703,9 @@ def rmsip(self, other, n_components=None):
>>> second_interval = pca.PCA(u, select="backbone").run(start=25, stop=50)
>>> last_interval = pca.PCA(u, select="backbone").run(start=75)
>>> round(first_interval.rmsip(second_interval, n_components=3), 6)
0.381476
np.float64(0.381476)
>>> round(first_interval.rmsip(last_interval, n_components=3), 6)
0.174782
np.float64(0.174782)


See also
Expand Down Expand Up @@ -870,10 +870,10 @@ def rmsip(a, b, n_components=None):

.. testsetup::

>>> import MDAnalysis as mda
>>> import MDAnalysis.analysis.pca as pca
>>> from MDAnalysis.tests.datafiles import PSF, DCD
>>> u = mda.Universe(PSF, DCD)
import MDAnalysis as mda
import MDAnalysis.analysis.pca as pca
from MDAnalysis.tests.datafiles import PSF, DCD
u = mda.Universe(PSF, DCD)


You can compare the RMSIP between different intervals of the same trajectory.
Expand All @@ -887,11 +887,11 @@ def rmsip(a, b, n_components=None):
>>> round(pca.rmsip(first_interval.results.p_components.T,
... second_interval.results.p_components.T,
... n_components=3), 6)
0.381476
np.float64(0.381476)
>>> round(pca.rmsip(first_interval.results.p_components.T,
... last_interval.results.p_components.T,
... n_components=3), 6)
0.174782
np.float64(0.174782)


.. versionadded:: 1.0.0
Expand Down
Loading