20 Apr 2019
While our documentation is mostly focused on using MDAnalysis for exploratory
analysis it is equally well suited to build your own analysis library on top of
it. Below is a list of all projects we know about that use MDAnalysis.
-
nglview: nglview is a tool to visualize
trajectories in jupyter notebooks.
-
mda-pymol:
MDAnalysis has been embedded into PyMOL to read many different MD formats
directly
-
pydiffusion: Analyze the
rotational diffusion of your molecules.
-
pytim: Pytim is a package based on
MDAnalysis for the identification and analysis of surface molecules in
configuration files or in trajectories from molecular dynamics simulations.
-
pycontact: Analysis of
non-covalent interactions in MD trajectories.
-
pyPcazip:
A PCA-based toolkit for compression and analysis of molecular simulation data
-
RotamerConvolveMD:
Analysis of molecular dynamics trajectories or conformational ensembles in
terms of spin-label distances as probed in double electron-electron resonance
(DEER) experiments.
-
PBxplore: PBxplore is a suite of
tools dedicated to Protein Block (PB) analysis.
-
cgheliparm: Scripts used to analyze
dsDNA structures from Martini MD simulations.
-
accelerated_sampling_with_autoencoder:
This is the framework for running accelerated sampling with data-augmented
autoencoders.
Distributions
MDAnalysis is also included in NMRBox a distribution of
common software to analyze NMR measurements.
If you know of other tools that are build on MDAnalysis please share them with
us on Twitter.
04 Mar 2019
MDAnalysis has been accepted as a sub-org of the NumFOCUS foundation,
for Google Summer of Code 2019. If you are interested in working with us
this summer as a student read the advice and links below and write to us on the
mailing list.
We are looking forward to all applications from interested students
(undergraduate and postgraduate).
The application window deadline is April 9, 2019 at 18:00 (UTC). As
part of the application process you must familiarize yourself with Google
Summer of Code 2019.
Apply as soon as possible; the application window opens on March 25,
2019 but you should start engaging with us sooner than that: read on.
Project Ideas
We have listed several possible projects for you to work on on our
wiki.
Alternatively if you have your own idea about a potential project
we’d love to work with you to develop this idea; please write to us on the
developer list to discuss it there.
You must meet our own requirements if you want to be a student with MDAnalysis
this year (read all the docs behind these links!). You must also meet the
eligibility criteria.
The MDAnalysis community values diversity and is committed to
providing a productive, harassment-free to every member. Our Code of
Conduct explains the values that we as a community uphold. Every
member (and every GSoC student) agrees to follow the Code of
Conduct.
As a start to get familiar with MDAnalysis and open source development you
should follow these steps:
Complete the Tutorial
We have a tutorial explaining the basics of MDAnalysis. You should go through
the tutorial at least once to understand how MDAnalysis is used.
Introduce yourself to us
Introduce yourself on the mailing list. Tell us what you plan to work
on during the summer or what you have already done with MDAnalysis.
Close an issue of MDAnalysis
You must have at least one commit in the development branch of
MDAnalysis in order to be eligible, i.e.. you must demonstrate that
you have been seriously engaged with the MDAnalysis project.
We have a list of easy bugs to work on in our issue tracker on
GitHub. We also appreciate if you write more tests or update/improve
our documentation. To start developing for MDAnalysis have a look at
our guide for developers and write us on the
mailing list if you have more questions about setting up a
development environment.
— @richardjgowers, @jbarnoud, @micaela-matta, @orbeckst
01 Dec 2018
A new version of MDAnalysis has been released!
Or rather, three new releases in quick succession, so we just talk about all of them in a single post.
This version brings a multitude of fixes, deprecations, and new features including exciting additions from one of our two 2018 Google Summer of Code students (other cool new features from GSOC2018 will be unveiled in the next release…) and one NSF REU student as well as full Windows support.
Some highlights are given below, whilst the release notes list all the changes in this version.
GSoC 2018: Capped Distance Searches
GSoC student Ayush Suhane (@ayushsuhane) worked on integrating faster distance search algorithms (such as the grid search in the new MDAnalysis.lib.nsgrid
neighbor search library and periodic KDTrees) for limited distance searches. His work improved many distance search based analysis methods like the calculation of radial distribution functions. There are now two new low-level functions MDAnalysis.lib.distances.capped_distance
and MDAnalysis.lib.distances.self_capped_distance
, which find all pairwise distances between particles up to a given maximum distance. By specifying a maximum distance to the search, it is possible to optimize the search, leading to greatly improved performance especially in larger systems.
For example to find all contacts between oxygen and hydrogen up to 5.0 Å
from MDAnalysisTests.datafiles import PSF, DCD
import MDAnalysis as mda
from MDAnalysis.lib.distances import capped_distance
u = mda.Universe(PSF, DCD)
oxy = u.select_atoms('name O*')
hyd = u.select_atoms('name H*')
idx, dists = capped_distance(oxy.positions, hyd.positions, box=u.dimensions, max_cutoff=5.0)
Unlike distance_array
,
which returns a matrix of every pairwise distance,
here a sparse representation is returned,
where idx
is a (n, 2)
array of the indices of the atoms
and dists
is the distance between these atoms.
For full details on the implementation of this and the expected performance improvements
see Ayush’s post on faster distance search algorithms.
Analysis improvements
NSF REU student Henry Mull implemented a new analysis module MDAnalysis.analysis.dihedrals
which includes analysis classes for
-
fast dihedral angle calculation (useful for featurization and dimensionality reduction in dihedral space as well as conformational analysis),
-
Ramachandran analysis (protein backbone dihedrals) including functions and data to plot allowed and generously allowed regions,
-
Janin analysis (protein sidechain dihedrals)

Irfan Alibay improved the density_from_Universe()
function, which now allows the user to exactly specify the region in which a density should be calculated.
In this way, it becomes easier to calculate densities on identical grids for different simulations so that these densities can be compared more easily.
Shujie Fan added site specific radial distribution function analysis. The InterRDF_s()
function calculates the radial distribution function relative to a single or a few particles (a “site”).
The function helps with the analysis of the coordination of ions and ligands in binding sites of proteins or other biomolecules, for instance, the distribution of oxygen ligand atoms around sodium ions.
Importantly, many of these sites can be computed at the same time, which improves performance because the most time consuming part of almost all analysis tasks, the loading of the trajectory data from disk into memory, only has to be done once, and then multiple computations can be performed with the data in memory.
Windows support
Since 0.19.2, Windows is fully supported under Python 3.4+ (Python 2.7 is not officially supported because of technical difficulties, which we decided not to address because of limited developer time and the fact that Python 3 is now the recommended version of Python).
For Windows we recommend the conda installation.
If you want to install with pip
or from source then you will need the full Microsoft developer environment with Microsoft Visual C++ 14.0.
Improvements to file readers
- For the LAMMPS dump reader one can now pass an
atom_style
keyword argument to specify what is on each line, for instance, atom_style = 'id type charge x y z'
. This provides much greater flexibility to read different dump files.
- The ChainReader with argument
continuous=True
can now correctly handle continuous XTC or TRR trajectories that were split into multiple files with Gromacs gmx mdrun -noappend
; in particular it will handle overlapping frames in such a way that only the last generated frame is included and the trajectory contains strictly monotonously increasing time steps. This means, Gromacs folks will never have to manually concatenate their trajectories for use with MDAnalysis.
- When slicing a trajectory as with
traj = u.trajectory[start:stop:step]
then this returns now a trajectory slice object (an iterable), which can be passed around and then iterated over: essentially, it’s a trajectory that knows that it should only deliver a subset of frames. Functions like len(traj)
are also fast (O(1)), very similar to how Python 3’s range()
object functions. See FrameIterators for more details.
- The MemoryReader is now a full first-class citizen in MDAnalysis, which can keep coordinates and velocities, forces, box dimensions in memory. It is a versatile swiss-army knife, both for fast analysis and also visualization with nglview (e.g., fit trajectory in memory, then visualize).
- new hybrid36 PDB-like format
- The Gromacs TPR parser now reads SETTLE constraints.
- The Amber top parser reads bonds/angles/dihedrals.
-
guess_bonds
(thanks to above methods)
- geometry selections faster (thanks to above)
-
make_whole
(C++ rewrite)
- fragment finding (C++ rewrite)
- improvements to AtomGroup internals
Deprecations
This release brings a few new deprecations as the package heads towards a final API:
-
start
/stop
/step
are deprecated in the initialization of Analysis classes. These parameters should instead be given to the run() method of the class.
- Almost all “
save()
”, “save_results()
”, “save_table()
” methods in analysis classes.
- Deprecated use of
core.flags
, the deprecation messages for this give advice
on how to replace this functionality.
- Default
filename
directory of align.AlignTraj
is deprecated and will change in 1.0 to the current directory.
Author statistics
Altogether this represents the work of 16 contributors from around the world,
and featured the work of five new contributors:
Upgrading to MDAnalysis version 0.19.x
To get all these features run either conda update -c conda-forge mdanalysis
or pip install --upgrade MDAnalysis
.
— The MDAnalysis Team