Release 0.16.010 Apr 2017
We have just released MDAnalysis version 0.16.0. This release contains new features as well as bug fixes. Highlights are listed below but for more details see the release notes.
This is the biggest release we ever had with tons of new features. It includes a rewrite of the topology system, the work of our GSoC students Fiona Naughton (@fiona-naughton) and John Detlefs (@jdetle), a complete new ensemble analysis with encore and much more. In total 28 people contributed 1904 commits to this release. We closed 162 issues and merged 199 pull requests.
You can upgrade with
pip install --upgrade MDAnalysis . If you use the conda
package manager run
conda update -c conda-forge mdanalysis
You can find a notebook with code example of the changes here.
Rewrite of our internal topology representation
This is the change we are most exited about for this release. It brings performance enhancements, makes maintaining the code easier, it’s easier to extend and allowed us a simplification of the interface. We have previously written about the details of new topology system.
But with this change also a lot of deprecated functions have been removed. For all of the deprecated functions the new replacements already exists and you will get a warning with a suggested change. The easiest way to check if your scripts will run without a problem after the update is to include the following on top of it.
This will print a warning for every deprecated function you are using together with a short code snippet how your code has to be changed. If you do not want to upgrade your existing scripts we posted a guide how to use conda and python environments to run different versions of MDAnalysis on the same computer.
Attach arbitrary time series to your trajectories
Our GSoC student @fiona-naughton has implemented an auxillary reader to add arbitrary time series to a universe. The time series are kept in sync with the trajectory so it is possible to iterate through the trajectory and access the auxiliary data corresponding to the current time step.
This feature is still in its beginning and will be expanded in future releases. You can follow the conversation on the initial issue or on the pull request. So far, only the XVG format used by gromacs and grace are supported. Open an issue if you need support for other time series formats.
Do a dimension reduction with PCA and Diffusion Maps
@jdetle has implemented two new dimension reduction algorithms, Principal Component Analysis and Diffusion Maps. Both can be found in the analysis submodule. As an example lets look at the first two PCA dimensions of ADK from our test files.
Convenience functions to create a new analysis
A while back we introduced a new frame work for analysis to unify the API for
the different analysis methods we offer. With this release we also add a new
AnalysisFromFunction to make it easier to calculate observables from a
simulation. Now code like this with a handwritten loop.
Can now be converted into this.
This class also takes arguments to adjust the iteration (
and you can add verbosity with
verbose=True . You will also profit from any
performance improvements in the analysis class in the future without changing
your code. If you have a specific observable that you want to calculate several
times you can also create a new analysis class with
analysis_class like this.
Speed improvements in RMSD
Thanks for work from our NSF REU student @rbrtdlgd our RMSD calculations are about 40% faster now. If you are using the low-level qcprot algorithm yourself instead of our provided wrappers you have to change your code since the API has changed. For more see the release notes.
MemoryReader: Reading trajectories from memory
MDAnalysis typically reads trajectories from files on-demand, so that it can efficiently deal with large trajectories - even those that do not fit in memory. However, in some cases, both for convenience and for efficiency, it can be an advantage to work with trajectories directly in memory. In this release, we have introduced a MemoryReader, which makes this possible. This Reader has been originally implemented in the encore package.
The MemoryReader works with numpy arrays, using the same format as that used by for instance
DCDReader.timeseries(). You can create a Universe directly from such an array:
The MemoryReader will work just as any other reader. In particular, you can iterate over it as usual, or use the
.timeseries() method to retrieve a reference to the raw array:
Certain operations can be speeded up by moving a trajectory to memory, and we have therefore
added functionality to directly transfer any existing trajectory to a MemoryReader using
You can also do this directly upon construction of a Universe, by using the
AlignTraj class in the analysis/align.py module also has an
in_memory flag, allowing it to do in-place alignments.
We also blogged since the start of the year about features of the upcoming release.
- No more deprecation warning spam when MDAnalyis is imported
- analysis.align has a new AlignTraj class following the analysis class style
- all new analysis classes now print additional information with the
- RMSD has been ported to the new analysis class style
A list of all changes can be found in the CHANGELOG.