MDAnalysis is a Python library to analyze molecular dynamics trajectories.





GitHub Stars



Last Commit

11d ago











MDAnalysis Repository README

|numfocus| |build| |travis| |cov| [*]_

|docs| |devdocs| |usergroup| |developergroup| |anaconda| |mybinder|

MDAnalysis_ is a Python library for the analysis of computer simulations of many-body systems at the molecular scale, spanning use cases from interactions of drugs with proteins to novel materials. It is widely used in the scientific community and is written by scientists for scientists.

It works with a wide range of popular simulation packages including Gromacs, Amber, NAMD, CHARMM, DLPoly, HooMD, LAMMPS and many others — see the lists of supported trajectory formats and topology formats. MDAnalysis also includes widely used analysis algorithms in the MDAnalysis.analysis module.

.. _numfocus-fiscal-sponsor-attribution:

The MDAnalysis project uses an open governance model and is fiscally sponsored by NumFOCUS. Consider making a tax-deductible donation_ to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

.. image:: :alt: NumFOCUS (Fiscally Sponsored Project) :target: :align: center

This project is bound by a Code of Conduct_.


If you use MDAnalysis in your project consider lettting your users and the world know about it by displaying the MDAnalysis badge! Embedding code_ is available for different markups.

Example analysis script

.. code:: python

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())


New users should read the Quickstart Guide and might want to look at our videos, in which core developers explain various aspects of MDAnalysis.

All users should read the User Guide_.

Developers may also want to refer to the MDAnalysis API docs_.

A growing number of tutorials_ are available that explain how to conduct RMSD calculations, structural alignment, distance and contact analysis, and many more.

Installation and availability

The latest release can be installed via pip or conda as described in the Installation Quick Start_.

Source code is hosted in a git repository at and is available under the GNU General Public License, version 2 (see the file LICENSE_).


Please report bugs or enhancement requests through the Issue Tracker. Questions can also be asked on the user mailing list.

If you are a new developer who would like to start contributing to MDAnalysis get in touch on the developer mailing list. To set up a development environment and run the test suite read the developer guide.


When using MDAnalysis in published work, please cite the following two papers:

  • R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler, D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein. MDAnalysis: A Python package for the rapid analysis of molecular dynamics simulations. In S. Benthall and S. Rostrup, editors, Proceedings of the 15th Python in Science Conference, pages 102-109, Austin, TX, 2016. SciPy. doi:10.25080/Majora-629e541a-00e_

  • N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. J. Comput. Chem. 32 (2011), 2319--2327. doi:10.1002/jcc.21787_

For citations of included algorithms and sub-modules please see the references_.

.. Footnotes

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

.. NumFOCUS: .. _open governance model: .. _tax-deductible donation: .. Code of Conduct: .. trajectory formats: .. _topology formats: .. _MDAnalysis: .. _LICENSE: .. Installation Quick Start: .. MDAnalysis.analysis: .. tutorials: .. videos: .. Quickstart Guide: .. User Guide: .. MDAnalysis API docs: .. Issue Tracker: .. user mailing list: .. developer guide: .. developer mailing list: .. 10.1002/jcc.21787: .. 10.25080/Majora-629e541a-00e: .. _references: .. _Embedding code:

.. |usergroup| image:: :alt: User Google Group :target:

.. |developergroup| image:: :alt: Developer Google Group :target:

.. |docs| image:: :alt: Documentation (latest release) :target:

.. |devdocs| image:: :alt: Documentation (development version) :target:

.. |numfocus| image:: :alt: Powered by NumFOCUS :target:

.. |build| image:: :alt: Github Actions Build Status :target:

.. |travis| image:: :alt: Travis CI Build Status :target:

.. |cov| image:: :alt: Coverage Status :target:

.. |anaconda| image:: :alt: Anaconda :target:

.. |mybinder| image:: :alt: My Binder :target:


Rate & Review

Great Documentation0
Easy to Use0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Unwelcoming Community0