Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# MDAnalysis.core.qcprot.CalcRMSDRotationalMatrix

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

```        a = a - numpy.average(a, axis=0, weights=weights)
b = b - numpy.average(b, axis=0, weights=weights)
return qcp.CalcRMSDRotationalMatrix(a.T.astype(numpy.float64),b.T.astype(numpy.float64),
a.shape, None, relative_weights)

```
```                # so that R acts **to the left** and can be broadcasted; we're saving
# one transpose. [orbeckst])
rmsd[k, 2] = qcp.CalcRMSDRotationalMatrix(ref_coordinates_T_64,
traj_coordinates.T.astype(numpy.float64),
natoms, rot, weight)
```
```                # 2) calculate secondary RMSDs
for igroup, (refpos, atoms) in enumerate(izip(groupselections_ref_coords_T_64, self.groupselections_atoms), 3):
rmsd[k, igroup] = qcp.CalcRMSDRotationalMatrix(refpos,
atoms['mobile'].positions.T.astype(numpy.float64),
atoms['mobile'].numberOfAtoms(), None, weight)
else:
# only calculate RMSD by setting the Rmatrix to None
# (no need to carry out the rotation as we already get the optimum RMSD)
rmsd[k, 2] = qcp.CalcRMSDRotationalMatrix(ref_coordinates_T_64,
```

```        weights = numpy.asarray(weights)/numpy.mean(weights)
rot = numpy.zeros(9, dtype=numpy.float64)
rmsd = qcp.CalcRMSDRotationalMatrix(a.T.astype(numpy.float64), b.T.astype(numpy.float64),
b.shape, rot, weights)
return numpy.matrix(rot.reshape(3,3)), rmsd
```
```        # so that R acts **to the left** and can be broadcasted; we're saving
# one transpose. [orbeckst])
rmsd[k] = qcp.CalcRMSDRotationalMatrix(ref_coordinates.T.astype(numpy.float64),
traj_coordinates.T.astype(numpy.float64),
natoms, rot, weight)
```

```