GSoC Projects

Python Software Foundation Google Summer of Code 2016

We are happy to anounce that MDAnalysis is hosting two GSoC students for the PSF this year, Fiona Naughton and John Detlefs.

Fiona Naughton: Umbrella simulations with MDAnalysis

Fiona Naughton

Umbrella Sampling is an MD technique which involves performing a series of simulations in which a reaction coordinate , such as the distance between two molecules, is restrained to different values. A method to analyse the combination of the simulations is weighted histogram analysis method (WHAM). Fiona will work on adding WHAM to the analysis module to calculate different observables.

Fiona Naughton is doing a PhD in Biochemistry at the University of Oxford with the Structural Bioinformatics and Computational Biochemistry Unit, studying protein/membrane interactions through molecular dynamics simulations. She has started her own blog and can be found on github under @fiona-naughton. She plans to continue to a career in the same field and outside academia enjoys reading, baking and handicraft.

John Detlefs: Dimensionality Reduction

John Detlefs

MD-simulations produce data with several thousand dimensions, from which we want to learn something new about how proteins work and how they interact with each other. Fortunaly for us in a lot of cases one or two dimensions are enough to describe a specific function of a protein. Dimensionionality reduction algorithms help us to find projections into low dimensional subspaces that capture the relevant motions. John has chosen to implement principal component analysis and diffusion maps.

John Detlefs is a Mathematics and Chemistry double major at California Polytechnic State University, San Luis Obispo. His blog can be found on his website and on github he is @jdetle. When not contributing to MDAnalysis, John can be found reading a good book or enjoying one of the many outdoor activities California has to offer. After graduating in June 2016, John plans on pursuing a career in scientific computing.

In the next weeks they will both further refine their projects and setup personal blogs to update anyone interested about their progress during the summer. We plan to have all discussions public on the devel mailinglist.


Official Conda Builds

Starting today MDAnalysis is officially building conda packages. The package are published in the MDAnalysis organization on The conda package includes the MDAnalysis packages as well as the MDAnalysisTests package.

To install MDAnalysis with conda use:

conda config --add channels MDAnalysis
conda install mdanalysis

If you later want to update to the next release use:

conda update mdanalysis

Currently we only support linux 64bit builds for conda. OSX users still have to use pip. We plan to support OSX in the future as well; we’d appreciate any help here.

The GridDataFormats package is also available through conda on OSX and linux.


Molecular visualization in the Jupyter Notebook with nglview

nglview is a Python package that makes it easy to visualize molecular systems, including trajectories, directly in the Jupyter Notebook. The recent 0.4.0 release of nglview brings a convenient interface for visualizing MDAnalysis Universe and AtomGroup objects directly:

import MDAnalysis as mda
import nglview as nv
from nglview.datafiles import PDB, XTC

u = mda.Universe(PDB, XTC)

protein = u.select_atoms('protein')

Although we could use the full Universe, selecting a subset of the atoms as an AtomGroup will give better performance when viewing the trajectory interactively. We can feed this directly to the nglview.show_mdanalysis function to produce the Jupyter widget:

w = nv.show_mdanalysis(protein)

This will give something like this in the notebook itself:

The notebook widget (you’ll have to try it yourself to see — what you see above is a limited view but you can still rotate and zoom the molecule) also lets you select atoms by clicking on the molecule, add custom representations to atom selections, and interactively view different frames of the trajectory, both programmatically and with a graphical slider. Be sure to double-click the notebook viewer widget to have a look at everything in a lovely full-screen view, too!

nglview is just a pip install away:

pip install nglview

Give it a try, and be sure to thank Alexander Rose (@arose) and Hai Nguyen (@hainm) for pushing this project forward!