MDAnalysis 2.0 is here
22 Aug 2021We are happy to release version 2.0.0 of MDAnalysis!
This is a new major version, and includes major API breaking changes in addition to a large number of updates and enhancements. This release concludes our current roadmap, an updated roadmap detailing our future steps will shortly be published.
This version supports Python 3.6 through to 3.9 on Windows (32- and 64-bit), MacOS, and Linux. It also offers preliminary support for ppc64le and ARM64, but does not currently support Apple M1 processors.
Support for legacy version of Python (e.g. 2.7 and 3.5) is only available in MDAnalysis 1.x releases.
Upgrading to MDAnalysis version 2.0.0
To install with conda
from the conda-forge channel run
conda update -c conda-forge mdanalysis
To install from PyPi with pip
run
pip install --upgrade MDAnalysis
For more help with installation see the installation instructions in the User Guide.
Notable new additions
There were many awesome contributions to MDAnalysis for version 2.0.0. Here we list a few notable example of these. For more information please see the CHANGELOG.
RDKit converter
Google Summer of Code student @cbouy implemented a new RDKit converter which allows for seamless conversions from RDKit to MDAnalysis structures. See @cbouy’s GSoC RDKit report for more information.
It currently accurately converts 90% of chemical space (based on ChEMBL27), but future changes will improve this.
OpenMM converter
@ahy3nz implemented an OpenMM converter which can read OpenMM objects directly into MDAnalysis.
Universe serialization
Google Summer of Code student @yuxuanzhuang implemented a means to serialize MDAnalysis.Universe objects, paving the way for parallel analysis. See @yuxuanzhuang’s GSoC Universe serialization report for more information.
Mean Square Displacement
@hmacdope implemented a new Mean Square Displacement analysis class.
Results class
@PicoCentauri implemented a Results class to store results from analysis classes. This change streamlines the API for analysis classe and paves the way for a soon-to-be released command line interface for MDAnalysis.
H5MD support
NSF REU student @edisj implemented both a reader and writer for the H5MD format.
Bond-Angle-Torsion coordinates
@daveminh implemented a means to translate from Cartesian to Bond-Angle-Torsion coordinates.
Important fixes
For a full list of bugfixes see the CHANGELOG. The following are selected fixes that may have lead to wrong results depending on your use case.
Core
- Fixes an issue where
select_atom
, AtomGroup.unique, ResidueGroup.unique, and SegmentGroup.unique did not sort the output atoms (Issues #3364 #2977) - Fixes the sometimes wrong sorting of atoms into fragments when unwrapping (Issue #3352)
- AtomGroup.center now works correctly for compounds + unwrapping (Issue #2984)
File formats
- Fixes support for DL_POLY HISTORY files that contain cell information even if there are no periodic boundary conditions (Issue #3314)
- PDBWriter will use chainID instead of segID (Issue #3144)
- PDBParser and PDBWriter now assign and use the element attribute (Issues #2422 #2423)
Analyses
- Fixes issue when attempting to use/pass mean positions to PCA analysis (Issue #2728)
- Fixes issue with WaterBridgeAnalysis double counting waters (Issue #3119)
- Documents and fixes the
density
keyword forrdf.InterRDF_s
(Issue #2811) - Fixed Janin analysis residue filtering, including CYSH (Issue #2898)
Changes to functionality
- Deprecated
hbonds.hbond_analysis
has been removed in favour ofhydrogenbonds.hbond_analysis
(Issues #2739, #2746) - TPRParser now loads TPR files with
tpr_resid_from_one=True
by default, which starts TPR resid indexing from 1 (instead of 0 as in previous MDAnalysis versions) (Issue #2364, PR #3152) -
analysis.hole
has now been removed in favour ofanalysis.hole2.hole
(Issue #2739) -
Writer.write(Timestep)
andWriter.write_next_timestep
have been removed. Please usewrite()
instead (Issue #2739) - Removes deprecated density_from_Universe, density_from_PDB, Bfactor2RMSF, and notwithin_coordinates_factory from MDAnalysis.analysis.density (Issue #2739)
- Removes deprecated
waterdynamics.HydrogenBondLifetimes
(PR #2842) -
hbonds.WaterBridgeAnalysis
has been moved tohydrogenbonds.WaterBridgeAnalysis
(Issue #2739 PR #2913)
Deprecations
- The
bfactors
attribute is now aliased totempfactors
and will be removed in 3.0.0 (Issue #1901) -
WaterBridgeAnalysis.generate_table()
now returns table information, with thetable
attribute being deprecated - Various analysis result attributes which are now stored in
Results
will be deprecated in 3.0.0 (Issue #3261) - In 3.0.0 the ParmEd classes will only be accessible from the
MDAnalysis.converters
module - In 2.1.0 the TRZReader will default to a dt of 1.0 ps when failing to read it from the input TRZ trajectory
Author statistics
Altogether, this represents the work of 35 authors, 17 of which were new contributors:
- @daveminh
- @mieczyslaw
- @aditya-kamath
- @tirkarthi
- @LeonardoBarneschi
- @hejamu
- @biogen98
- @orioncohen
- @z3y50n
- @hp115
- @ojeda-e
- @thadanipaarth
- @HenryKobin
- @1ut
- @sulays
- @ahy3nz
- @fiszczyp
MDAnalysis thanks NumFOCUS’s continued support as the organisation’s fiscal sponsor.
- The MDAnalysis Team