|
76 | 76 | >>> ref = mda.Universe(PDB_small) |
77 | 77 | >>> mobile = mda.Universe(PSF, DCD) |
78 | 78 | >>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions) |
79 | | - 28.20178579474479 |
| 79 | + np.float64(28.20178579474479) |
80 | 80 |
|
81 | 81 | Note that in this example translations have not been removed. In order |
82 | 82 | to look at the pure rotation one needs to superimpose the centres of |
83 | 83 | mass (or geometry) first:: |
84 | 84 |
|
85 | 85 | >>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions, center=True) |
86 | | - 21.892591663632704 |
| 86 | + np.float64(21.892591663632704) |
87 | 87 |
|
88 | 88 | This has only done a translational superposition. If you want to also do a |
89 | 89 | rotational superposition use the superposition keyword. This will calculate a |
|
126 | 126 | >>> ref = mda.Universe(PSF, PDB_small) |
127 | 127 | >>> mobile = mda.Universe(PSF, DCD) # we use the first frame |
128 | 128 | >>> align.alignto(mobile, ref, select="protein and name CA", weights="mass") |
129 | | - (21.892591663632704, 6.809396586471809) |
| 129 | + (np.float64(21.892591663632704), 6.809396586471809) |
130 | 130 |
|
131 | 131 | This will change *all* coordinates in *mobile* so that the protein |
132 | 132 | C-alpha atoms are optimally superimposed (translation and rotation). |
|
137 | 137 | >>> ref = mda.Universe(PSF, PDB_small) # reference structure 1AKE |
138 | 138 | >>> trj = mda.Universe(PSF, DCD) # trajectory of change 1AKE->4AKE |
139 | 139 | >>> alignment = align.AlignTraj(trj, ref, filename='rmsfit.dcd') |
140 | | - >>> alignment.run() |
141 | | - <MDAnalysis.analysis.align.AlignTraj object at ...> |
| 140 | + >>> _ = alignment.run() |
| 141 | +
|
142 | 142 |
|
143 | 143 | It is also possible to align two arbitrary structures by providing a |
144 | 144 | mapping between atoms based on a sequence alignment. This allows |
|
0 commit comments