An object-oriented toolkit to analyze molecular dynamics trajectories generated by CHARMM, Gromacs, NAMD, LAMMPS, or Amber.

python, science, molecular-dynamics, computational-chemistry, molecular-simulation, molecular-dynamics-simulation, trajectory-analysis, mdanalysis
pip install MDAnalysis==2.0.0b0


MDAnalysis Repository README

Build Status Coverage Status [*]

Documentation (latest release) Documentation (development version) User Google Group Developer Google Group Anaconda My Binder

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

# Iterate through trajectories
for ts in u.trajectory:

There are also a number of tutorials on the MDAnalysis homepage that explain how to conduct RMSD calculations, Alignment and more features of MDAnalysis.

Source code

Source code is hosted in a git repository at

and is available under the GNU General Public License, version 2 (see the file LICENSE).

This is the top level of the master repository. It contains

  1. the MDAnalysis toolkit source files in the directory

  2. the unit tests together with any input files required for running those tests in the directory


The directory maintainer contains scripts only needed for maintaining releases and are not generally useful for the user or the typical developer.

(For more details on the directory layout see Issue 87 on the MDAnalysis issue tracker.)

Guide for Developers

To setup a development environment and run the testsuite you can use this guide. If you are a new developer who would like to start contributing to MDAnalysis as a start you can increase our code coverage, the guides explain how to find uncovered code.

[*] build: Unit testing is for the whole package; coverage is shown for the core library modules and the analysis modules.