Computing RMSD efficiently with pyRMSD in python

From the pyRMSD github page:

pyRMSD is a small Python package that aims to offer an integrative and efficient way of performing RMSD calculations of large sets of structures. It is specially tuned to do fast collective RMSD calculations, as pairwise RMSD matrices.

A small tutorial for using it:

import pyRMSD.RMSDCalculator

The trajectory is given as a numpy array. The first dimension gives the frames, the second the atoms and the third the , , coordinates.

fittingCoordsets = traj.copy().reshape(50001,341,3) # the numpy array containing the trajectory
                                                    # for this exemple: 50001 frames, 341 atoms

And now we can compute the RMSD between the first frame 0 and the following ones with optimal alignment:

calculator = pyRMSD.RMSDCalculator.RMSDCalculator('QCP_OMP_CALCULATOR', fittingCoordsets)
out = calculator.oneVsTheOthers(0)
If you want to ask me a question or leave me a message add @bougui505 in your comment.