MDAnalysis User Guide
MDAnalysis is a Python toolkit to analyze molecular dynamics trajectories generated by a wide range of popular simulation packages including DL_Poly, CHARMM, Amber, NAMD, LAMMPS, and Gromacs. (See the lists of supported trajectory formats and topology formats.)
import MDAnalysis as mda # Load simulation results with a single line u = mda.Universe('topol.tpr','traj.trr') # Select atoms ag = u.select_atoms('name OH') # Atom data made available as Numpy arrays ag.positions ag.velocities ag.forces # Iterate through trajectories for ts in u.trajectory: print(ag.center_of_mass())
There are also a number of tutorials on the MDAnalysis homepage that explain how to conduct RMSD calculations, Alignment and more features of MDAnalysis.