Blog

Release 2.8.0 of MDAnalysis

We are happy to release version 2.8.0 of MDAnalysis!

This is a minor release of the MDAnalysis library, which means that it contains enhancements, bug fixes, deprecations, and other backwards-compatible changes.

However, in this case minor does not quite do justice to what is happening in this release, given that we have (at least) three big changes/additions:

  1. The license was changed to the GNU Lesser General Public License so that MDAnalysis can be used by packages under any license while keeping the source code itself free and protected.
  2. We introduce the Guesser API for guessing missing topology attributes such as element or mass in a context-dependent manner. Until release 3.0, you should not notice any differences but under the hood we are getting ready to make it easier to work with simulations in a different context (e.g., with the MARTINI force field or experimental PDB files). With consistent attributes, such as elements, it becomes a lot easier to interface with tools like the cheminformatics RDKit (via the converters).

    The guessers are the GSoC 2022 project of @aya9aladdin with help from @lilyminium, @IAlibay, and @jbarnoud.1

  3. We are introducing parallel analysis for tools in MDAnalysis.analysis following the simple split-apply-combine paradigm that we originally prototyped in PMDA 2. What’s really exciting is that any analysis code that is based on MDAnalysis.analysis.base.AnalysisBase can enable parallelization with a few lines of extra code—all the hard work is done behind the scenes in the base class (in a way that is fully backwards compatible!).

    This new feature is the work of @marinegor who brought his GSoC 2023 project to completion, with great contributions by @p-j-smith, @yuxuanzhuang and @RMeli 3.

    Not all MDAnalysis analysis classes have parallelization enabled yet but @talagayev has been working tirelessly on already updating GNMAnalysis, BAT, Dihedral, Ramachandran, Janin, DSSP (yes, MDAnalysis has finally got DSSP, based on pydssp, also thanks to @marinegor), HydrogenBondAnalysis, in addition to RMSD.

Read on for more details on the license change and the usual information on supported environments, upgrading your version of MDAnalysis, and a summary of the most important changes.

License change to LGPL

LGPLv3 logo

This is the first release of MDAnalysis under the Lesser General Public License. We have been working towards this license change for the last 3 years; this release (almost) concludes the process that we described in our licensing update blog post.

  • All code is now under LGPLv2.1 license or any higher version.
  • The package is under the LGPLv3 license or any higher version. However, once we have removed dependencies that prevent licensing under LGPLv2.1+ at the moment, we will also license the package under the same LGPLv2.1+ as the code itself.

We would like to thank all our contributors who granted us permission to change the license. We would also like to thank a number of institutions who were especially supportive of our open source efforts, namely Arizona State University, Australian National University, Johns Hopkins University, and the Open Molecular Science Foundation. We are also grateful to NumFOCUS for legal support. The relicensing team was lead by @IAlibay and @orbeckst.

Supported environments

The minimum required NumPy version is 1.23.3; MDAnalysis now builds against NumPy 2.0.

Supported Python versions: 3.10, 3.11, 3.12, 3.13. Support for version 3.13 has been added in this release and support for 3.9 has been dropped (following SPEC 0).

Please note that Python 3.13 is limited to PyPi for now, the conda-forge channel installs only provide support for Python 3.10 to 3.12.

Supported Operating Systems:

Upgrading to MDAnalysis version 2.8.0

To update with mamba (or conda) from the conda-forge channel run

mamba update -c conda-forge mdanalysis

To update from PyPi with pip run

python -m pip install --upgrade MDAnalysis

For more help with installation see the installation instructions in the User Guide. Make sure you are using a Python version compatible with MDAnalysis before upgrading (Python >= 3.10).

Notable changes

For a full list of changes, bugfixes and deprecations see the CHANGELOG.

Enhancements:

  • Added guess_TopologyAttrs() API to the Universe to handle attribute guessing (PR #3753)
  • Added the DefaultGuesser class, which is a general-purpose guesser with the same functionalities as the existing guesser.py methods (PR #3753)
  • Introduce parallelization API to AnalysisBase and to analysis.rms.RMSD class (Issue #4158, PR #4304)
  • Add analysis.DSSP module for protein secondary structure assignment, based on pydssp
  • Improved performance of PDBWriter (Issue #2785, PR #4472)
  • Added parsing of arbitrary columns of the LAMMPS dump parser. (Issue #3504)
  • Implement average structures with iterative algorithm from DOI 10.1021/acs.jpcb.7b11988. (Issue #2039, PR #4524)
  • Add support for TPR files produced by Gromacs 2024.1 (PR #4523)

Fixes:

  • Fix Bohrium (Bh) atomic mass in tables.py (PR #3753)
  • Catch higher dimensional indexing in GroupBase & ComponentBase (Issue #4647)
  • Do not raise an Error reading H5MD files with datasets like observables/<particle>/<property> (part of Issue #4598, PR #4615)
  • Fix failure in double-serialization of TextIOPicklable file reader. (Issue #3723, PR #3722)
  • Fix failure to preserve modification of coordinates after serialization, e.g. with transformations (Issue #4633, PR #3722)
  • Fix PSFParser error when encountering string-like resids (Issue #2053, Issue #4189 PR #4582)
  • Convert openmm Quantity to raw value for KE and PE in OpenMMSimulationReader.
  • Atomname methods can handle empty groups (Issue #2879, PR #4529)
  • Fix bug in PCA preventing use of frames=... syntax (PR #4423)
  • Fix analysis/diffusionmap.py iteration through trajectory to iteration over self._sliced_trajectory, hence supporting DistanceMatrix.run(frames=...) (PR #4433)

Changes:

  • Relicense code contributions from GPLv2+ to LGPLv2.1+ and the package from GPLv3+ to LGPLv3+ (PR #4794)
  • only use distopia < 0.3.0 due to API changes (Issue #4739)
  • The fetch_mmtf method has been removed as the REST API service for MMTF files has ceased to exist (Issue #4634)
  • MDAnalysis now builds against numpy 2.0 rather than the minimum supported numpy version (PR #4620)

Deprecations:

  • Deprecations of old guessing functionality (in favor of the new Guesser API)
    • MDAnalysis.topology.guessers is deprecated in favour of the new Guessers API and will be removed in version 3.0 (PR #4752)
    • The guess_bonds, vdwradii, fudge_factor, and lower_bound kwargs are deprecated for bond guessing during Universe creation. Instead, pass ("bonds", "angles", "dihedrals") into to_guess or force_guess during Universe creation, and the associated vdwradii, fudge_factor, and lower_bound kwargs into Guesser creation. Alternatively, if vdwradii, fudge_factor, and lower_bound are passed into Universe.guess_TopologyAttrs, they will override the previous values of those kwargs. (Issue #4756, PR #4757)
    • MDAnalysis.topology.tables is deprecated in favour of MDAnalysis.guesser.tables and will be removed in version 3.0 (PR #4752)
    • Element guessing in the ITPParser is deprecated and will be removed in version 3.0 (Issue #4698)
    • Unknown masses are still set to 0.0 for current version, this will be changed in version 3.0.0 and replaced by Masses “no_value_label” attribute (np.nan) (PR #3753)
  • A number of analysis modules have been moved into their own MDAKits, following the 3.0 roadmap towards a trimmed down core library. Until release 3.0, these modules are still available through MDAnalysis.analysis (either as an import of the MDAKit as an automatically installed dependency of the MDAnalysis package or as the original code) but from 3.0 onwards, users must install the MDAKit explicitly and then import it by themselves.

    • The MDAnalysis.analysis.encore module has been deprecated in favour of the mdaencore MDAKit and will be removed in version 3.0.0 (PR #4737)
    • The MDAnalysis.analysis.waterdynamics module has been deprecated in favour of the waterdynamics MDAKit and will be removed in version 3.0.0 (PR #4404)
    • The MDAnalysis.analysis.psa module has been deprecated in favour of the PathSimAnalysis MDAKit and will be removed in version 3.0.0 (PR #4403)
  • The MMTF Reader is deprecated and will be removed in version 3.0 as the MMTF format is no longer supported (Issue #4634).

Author statistics

This release was the work of 22 contributors, 10 of which are new contributors.

Our new contributors are:

Acknowledgements

MDAnalysis thanks NumFOCUS for its continued support as our fiscal sponsor and the Chan Zuckerberg Initiative for supporting MDAnalysis under EOSS4 and EOSS5 awards.

@IAlibay (release manager) on behalf of the MDAnalysis Team


  1. The Guesser API was a big undertaking: Her merged PR #3753 totalled 668 (!) comments. We look forward to the community providing Guessers for specific context. 

  2. Shujie Fan, Max Linke, Ioannis Paraskevakos, Richard J. Gowers, Michael Gecht, and Oliver Beckstein. PMDA - Parallel Molecular Dynamics Analysis. In Chris Calloway, David Lippa, Dillon Niederhut, and David Shupe, editors, Proceedings of the 18th Python in Science Conference, 134 – 142. Austin, TX, 2019. SciPy. doi:10.25080/Majora-7ddc1dd1-013

  3. Adding parallelization in a transparent manner was quite a difficult undertaking that touched many parts of the analysis code and required a lot of thought. Feedback is very welcome! See PR #4162 with 713 (!) comments. 

MDAnalysis Streaming Online Developer Workshop (Dec 4, 2024)

National Science Foundation

Have you ever wanted to analyze sub-picosecond dynamics in your trajectories? Trajectory file sizes too large? Want to sync up your analysis and trajectory production? Lucky for you MDAnalysis, in conjunction with Arizona State University (ASU) and with the support of a CSSI Elements grant from the National Science Foundation, is holding a free, online developer workshop focused on streaming and inline analysis of molecular simulations on December 4th 2024.

The general idea of streaming, just like with Netflix, is to transfer data piece-by-piece as needed instead of transferring entire files. In our case, the data generated during a running simulation is transmitted to MDAnalysis for processing without ever being stored on disk.

Our streaming interface is built on top of the TCP/IP socket protocol and can transmit data between distinct processes: A) on the same computer; B) on different computers in a local network; C) via the internet. This allows analyzing MD simulation trajectories live while they are being generated. As a result, the streaming interface allows analyzing data at femtosecond-scale time intervals which would create massive trajectories and slow down the simulation engine if written to disk.

This online workshop is intended to introduce participants to streaming of trajectories directly from simulation engines, inline analysis of simulations, and all the awesome science you can do with streaming. This workshop is suitable for students, developers, and researchers in the broad area of computational (bio)chemistry, materials science, and chemical engineering. It is designed for those who have some familiarity with MDAnalysis and are comfortable working with Python, Jupyter Notebooks and a molecular simulation engine such as LAMMPS, GROMACS or NAMD.

Workshop Overview

The program will run from 8:00 am to 12:00 pm Pacific time on Wednesday, December 4th. In the workshop, we will focus on contextualizing MD streaming, showing you some of its use cases from working as basic connective tissue to advanced, high-time-resolution analyses, and getting your hands dirty with streaming in a live-coding activity in an easy-to-use workshop environment.

Topic Duration
👋 Welcome 5 min
📦 MDAnalysis mission & ecosystem 15 min
🖼️ Streaming: big picture 15 min
👀 Streaming: first look 10 min
❓ Q&A: Streaming overview 5 min
📦Streaming: MD packages, IMDClient 15 min
👀 Demo: Multiple analyses on NAMD simulation stream 10 min
💤 Break 10 min
🎯Activity: Write your own stream analysis 40 min
📦 Streaming: MDAnalysis functionality 10 min
❓Q&A: Streaming with MDAnalysis 5 min
👀 Application: Velocity correlation functions and 2PT 10 min
👀 Application: Ion channel permeation 10 min
❓ Q&A: Applications 5 min
🔮 Future direction 5 min
📖 Open Forum 20 min
🚪 Closing 5 min

Registration

Attendance at this workshop will be free, and we encourage anyone with an interest in attending to register below.

Register

Workshop materials

All materials are made available in the github.com/MDAnalysis/imd-workshop-2024 repository.

Prepare for the interactive workshop activities by following the set-up instructions.

Who to Contact

If you have any questions or special requests related to this workshop, you may contact the organizing committee.

MDAnalysis 2024 Events - Recap of the User Group Meeting and Workshops

As we near the last quarter of the year, we would like to reflect on the exciting events, including the recent MDAnalysis User Group Meeting and many workshops, that allowed us to connect with the MDAnalysis community throughout 2024.

MDAnalysis UGM (User Group Meeting)

Group Photo of MDAnalysis UGM 2024 Participants

From August 21-23, 2024, 65 MDAnalysis users and developers convened in London, United Kingdom for the second MDAnalysis UGM (User Group Meeting). Hosted at King’s College London in partnership with the Thomas Young Centre, the event featured presentations and open discussions about using and developing MDAnalysis, followed by a hackathon. Talks covered a broad range of topics including, but not limited to, materials science applications, drug discovery and therapeutics, machine learning and multiscale modeling, and tools for molecular dynamics simulation analysis.

For more details, we invite you to check out the MDAnalysis/UGM2024 GitHub repository, where many of the UGM presentations and hackathon materials may be accessed.

Awards

Based on attendees’ votes, the following recognitions were awarded to UGM participants:

Best Talk

  • First Place - Raquel López-Ríos de Castro
  • Second Place - Lexin Chen
  • Third Place - Namir Oues
  • Honorable Mentions - Michal H. Kolar, Matteo Degiacomi

Best Poster

  • First Place - Asal Azar
  • Second Place (TIE) - Simon Holtbrügge, Valerij Talagayev

All Star Pet (According to a pet photo contest on the #mda-pets channel on Discord)

  • Pom (owned by Matteo Degiacomi)

Group Photo of MDAnalysis UGM 2024 Award Recipients

Partners and Sponsors

We would like to thank our partners and sponsors for helping us make the 2024 MDAnalysis UGM such a success!


Thomas Young Centre Logo


Chan Zuckerberg Initiative Logo


Molecular Graphics and Modelling Society Logo


NumFOCUS Fiscally Sponsored Project Logo

The Future of MDAnalysis UGMs

We would love for the MDAnalysis UGM to become an annual event. We are grateful to the Chan Zuckerberg Initiative (CZI) for supporting the 2023 and 2024 UGMs through our Essential Open Source for Science Round 5 award. However, as the 2-year grant is coming to a close, we are working hard to find ways to support potential future UGMs.

If you are interested in sponsoring, hosting at your own institution, or joining the organizing committee for any future UGMs, please get in touch with us on Discord (to join the Discord server, use the invitation link, https://discord.com/invite/fXTSfDJyxE), GitHub Discussions, or by emailing [email protected]!

MDAnalysis Training Workshops

This year was an exciting year for MDAnalysis, in that we were able to offer 4 different free online and hybrid training workshops!

Februrary 28th: Introduction to MDAnalysis and Molecular Nodes (Online)

Around 40 people joined us live on February 28, 2024 for an online workshop, during which 4 instructors (@fiona-naughton, @lilyminium, @yuxuanzhuang, @BradyAJohnston) introduced the MDAnalysis package and provided an interactive tutorial for visualizing MDAnalysis data in Molecular Nodes; the recording is available on our YouTube channel. All workshop materials and installation instructions are publicly available on the MDAnalysis/MDAnalysisWorkshop2-Intro0.5Day GitHub repository on the ‘feb24-ws’ branch.

May 10th: Introduction to Molecular Dynamics Trajectory Analysis using MDAnalysis

On May 10, 2024, 21 attendees convened in person at University College London (UCL) and another roughly 43 attendees joined online for a workshop walking participants through examples progressing from a beginner to an intermediate level. Instructors, @micaela-matta and @richardjgowers, showcased built-in analysis functions and walked participants through building custom analysis scripts; the recording of the intermediate lessons can be accessed on the MDAnalysis YouTube channel, and all workshop materials are on the MDAnalysisWorkshop-Intro1Day GitHub repo on the ‘may24-ws’ branch.

Micaela Matta Leading the In-Person Instruction for the MDAnalysis Workshop at UCL

June 24th-25th: Moving from User to Developer: Analyzing Molecular Simulations and Building New Tools

In late June 2024, an MDAnalysis instructor team (@IAlibay, @orbeckst, @fiona-naughton, @yuxuanzhuang, @mikemhenry, @ianmkenney) partnered with the Molecular Sciences Software Institute (MolSSI) to offer a 2-day hybrid workshop at Arizona State University (ASU) in the Center for Biological Physics covering beginner to intermediate tutorials on the MDAnalysis library as well as tutorials on software development best practices provided by MolSSI instructors (@sjayellis, @armcdona). A total of 35 individuals attended in person, with another up to 76 attending online. All workshop materials are now publicly available in the MDAnalysisMolSSIWorkshop-Intermediate2Day GitHub repository under the ‘jun24-ws’ branch.

Group Photo of the ASU Workshop Participants and Instructors

September 5th: MDAnalysis Intermediate Workshop, CCPBioSim Training Week

Rounding out the 2024 workshop series, @micaela-matta and @richardjgowers teamed up again for the CCPBioSim Training Week, hosted at the University of Sheffield in hybrid format, to teach participants how to build on basic MDAnalysis skills and learn about building more complex analysis scripts. There were 13 people registered for in-person attendance, and another 30 people registered for online participation. The materials for the workshop can be accessed on the MDAnalysisWorkshop-Intermediate1Day GitHub repo under the ‘ccpbiosim-24’ branch.

Acknowledgements

A special thanks goes out to the many partners and sponsors that helped us make these workshops possible:


Chan Zuckerberg Initiative Logo

Thomas Young Centre Logo

JCMaxwell Node of CECAM Logo

CCPBioSim Logo

Molecular Sciences Software Institute Logo

Center for Biological Physics (CBP) at Arizona State University (logo)

We would like to again thank everyone who helped us make these workshops a success, including the participants, instructors, teaching assistants, and workshop organizers! If you or your organization are interested in partnering with MDAnalysis to organize future workshops, you are always welcome to fill out our Google form to discuss further.

To stay up-to-date on all MDAnalysis event offerings, be sure to follow our blog, X, LinkedIn, and Bluesky pages.