Skip to content

Commit 6162231

Browse files
committed
Docs: Fix doctest failures in align.py
1 parent 9cbc8ea commit 6162231

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

package/MDAnalysis/analysis/align.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@
7676
>>> ref = mda.Universe(PDB_small)
7777
>>> mobile = mda.Universe(PSF, DCD)
7878
>>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions)
79-
28.20178579474479
79+
np.float64(28.20178579474479)
8080
8181
Note that in this example translations have not been removed. In order
8282
to look at the pure rotation one needs to superimpose the centres of
8383
mass (or geometry) first::
8484
8585
>>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions, center=True)
86-
21.892591663632704
86+
np.float64(21.892591663632704)
8787
8888
This has only done a translational superposition. If you want to also do a
8989
rotational superposition use the superposition keyword. This will calculate a
@@ -126,7 +126,7 @@
126126
>>> ref = mda.Universe(PSF, PDB_small)
127127
>>> mobile = mda.Universe(PSF, DCD) # we use the first frame
128128
>>> align.alignto(mobile, ref, select="protein and name CA", weights="mass")
129-
(21.892591663632704, 6.809396586471809)
129+
(np.float64(21.892591663632704), 6.809396586471809)
130130
131131
This will change *all* coordinates in *mobile* so that the protein
132132
C-alpha atoms are optimally superimposed (translation and rotation).
@@ -137,8 +137,8 @@
137137
>>> ref = mda.Universe(PSF, PDB_small) # reference structure 1AKE
138138
>>> trj = mda.Universe(PSF, DCD) # trajectory of change 1AKE->4AKE
139139
>>> alignment = align.AlignTraj(trj, ref, filename='rmsfit.dcd')
140-
>>> alignment.run()
141-
<MDAnalysis.analysis.align.AlignTraj object at ...>
140+
>>> _ = alignment.run()
141+
142142
143143
It is also possible to align two arbitrary structures by providing a
144144
mapping between atoms based on a sequence alignment. This allows

0 commit comments

Comments
 (0)