Blog

Release 0.17.0

With the new year comes also a new release of MDAnalysis. This release fixes bugs, removes deprecated code, and adds support for new file formats. The biggest changes however aim at making MDAnalysis more sustainable in the long run. The release note lists all the changes in this version.

This release of MDAnalysis comes with a long awaited change: MDAnalysis now officially supports Python 3.4 and newer! We cannot be your excuse to stick with Python 2 anymore. Nevertheless, Python 2.7 remains supported for the foreseeable future. The port to Python 3 was a long process that started in 2015 and was completed by Tyler Reddy and Richard Gowers thanks to a grant awarded by NumFOCUS. To complete the port, the handling of the DCD format, used by, e.g., CHARMM and NAMD, had to be completely rewritten, a big task carried out by Tyler Reddy and Max Linke during the last year. So this release brings a fresh DCD reader and a new low level library (libdcd) to manipulate DCD files.

An other change to stay up to date was supported by Google Summer of Code. GSoC student Utkarsh Bansal ported our tests from nose to pytest. Sadly, nose is now deprecated by lack of maintainers. While we liked nose and are grateful to its developers, we had to move away from it. We chose pytest as a replacement as it has a vibrant community and many great features. Utkarsh not only made the tests run under the new framework but he also applied the pytest recommended idioms wherever possible. As a result, our code coverage increased to 91% and the tests run significantly faster.

We added support for three new trajectory and topology formats. The TXYZ and ARC files from Tinker and the GSD format of HOOMD. Learn more about these file formats in our documentation. If instead your prefer Amber’s netcdf4 trajectories, you should experience a performance gain when reading such trajectories. Gromacs users may notice that the parser for the TPR format now exposes molecule names under the moltype attribute of atoms and residues, it also makes it easier to split atom groups by molecules.

It is also now possible to create Universes withot existing topology and coordinate files via the Universe.empty class method. This should allow more possibilities in creating input files for simulations from a Python interface.

import MDAnalysis as mda

# `empty` classmethod does not require filenames
u = mda.Universe.empty(100, trajectory=True)
# can add the required attributes to the new Universe
u.add_TopologyAttr('names')
u.add_TopologyAttr('masses')

# ... position atoms, assign names etc

# then finally export to any supported format
u.atoms.write('system.gro')

A new tool makes an entrance in the analysis module tanks to Zhiyi Wu. It is now possible to follow water bridges between two selections using the WaterBridgeAnalysis module. Read the documentation of the module to learn more about it.

With this release, we introduced some deprecations. In HydrogenBondAnalysis, the keyword detect_hydrogen="heuristic" is deprecated in favor of detect_hydrogen="distance". Indeed, the former may not find all the hydrogens, making the latter safer to use. In the result of the same analysis, the column “donor_id”x and “acceptor_idx”, that start counting at 1, are deprecated in favor of “donor_index” and “acceptor_index, respectively, that start counting at 0. Finally, throughout the code base, the use of the format keyword of timeseries is deprecated and renamed order, which reflects better the use of the keyword to set the order of output columns. We plan on removing the deprecated code with the version 1.0 of MDAnalysis. For the list of deprecations we removed in this version, consult the release note.

We also have various speed improvements in the whole library. To ensure that MDAnalysis keeps getting faster Tyler Reddy has worked on developing asv benchmarks. The benchmarks can be found in Benchmark repo.

You should also experience a performance gain of about 20 % when running GNM analyses. For performance we also started experimenting with implementing multi core analysis in PMDA. This release contains fixes to enable the use of PMDA.

Fifteen people contributed to this release, among which five were first time contributors. Thank you to all contributors and welcome to Nestor Wendt, Micaela Mata, Sören von Bülow, Ruggero Cortini and Jose Borreguuero.

Upgrade

You can upgrade with pip install --upgrade MDAnalysis. If you use the conda package manager run conda update -c conda-forge mdanalysis.

Release 0.16.2

Just a few weeks after our last release, we are releasing MDAnalysis version 0.16.2. The release notes list the full details of the changes in this version. This version fixes some bugs, but it mostly introduces deprecation warnings for changes that will occur in subsequent versions.

The first feature to be deprecated is the Timeseries module that will be removed in version 0.17.0. The MDAnalysis.analysis.base.analysis_class function can be used to replace the deprecated Timeseries. analysis_class was introduced in version 0.16.0 and you can read more about it in a previous blog post.

Instant selectors are also deprecated and will be removed in release 1.0. These shortcuts allow you to access segments, residues, or atoms using there names as attribute. For instance, such selectors allow you to access a segment called “SYSTEM” from a universe u by calling u.SYSTEM, or to select all the lysine of a residue group rg by calling rg.LYS. Although these shortcuts used to be reasonably useful for interactive work, they also introduce unexpected behaviours for a Python object, and are fragile mechanisms that are difficult to maintain. You can read the discussion in issue 1377 to learn how to replace the different selectors.

Finally, the global flags will disappear in release 1.0 to be replaced with more granular keyword arguments in the appropriate methods. The flags introduce a global state that could make MDAnalysis scripts run differently for different users and could thus lead to difficult to reproduce results. The discussion about removing the flags is happening in issue 782.

Removing outdated code allows us to keep MDAnalysis robust and consistent as we prepare for 1.0 when the user interface will become frozen. We are confident that these features were not much used or have better replacement. Come to the mailing lists or our github repository to join the conversation.

Thank you to all the contributors who reported issues or contributed code to this version. Thank you also to Dominik ‘Rathann’ Mierzejewski for his first contribution to the code base.

Upgrade

You can upgrade with pip install --upgrade MDAnalysis . If you use the conda package manager run conda update -c conda-forge mdanalysis

Release 0.16.1

We have just released MDAnalysis version 0.16.1. This release is dedicated to purely fixing bugs, thank you to everyone who helped us identify these! For full details of the bugs fixed, see the release notes.

Thank you also to our four new contributors, Jon Kapla, Sang Young Noh, Andrew William King and Kathleen Clark.

Besides the bug fixes we updated the style (PR 1126) of our docs so that they match with the website.

Upgrade

You can upgrade with pip install --upgrade MDAnalysis . If you use the conda package manager run conda update -c conda-forge mdanalysis