Blog

Google Summer of Code Students 2022

We are happy to announce that MDAnalysis is hosting two GSoC students this year – @aya9aladdin, and @BFedder. MDAnalysis has been accepted as its own organization with GSoC for the third year running and we are grateful to Google for granting us the opportunity to undertake two very exciting GSoC projects!

Aya Mohamed Alaa: Context-aware guessers

Aya Mohamed Alaa

MDAnalysis supports many molecular dynamics simulation files and force fields, which brings the challenge of tailoring the guessing methods to each type of format. Aya is going to work on building a context-aware guesser API Context-aware guesser (implementing implementing PDB and Martini guessers) that can provide a way for the user to pass the context of his work conveniently through an API so that the guessing of missing attributes would be more accurate and reliable.

Aya is pharmaceutical sciences graduate from Ain-Shams University (Egypt) and a premaster student at Arab Academy for science and technology (Egypt). She is interested in working on the link between computer science and biological sciences as she believes in the importance of finding a way to look at biological questions from the computational and engineering point of view. On the weekends, Aya enjoys outdoor sports, especially football, and tennis, additionally, Aya enjoys swimming as it helps reduce the feeling of stress (Egypt’s sun will force you to spend the whole day at the pool though).

You can find Aya on GitHub, Twitter, and Facebook

This is Aya’s personal blog for documenting her summer with MDAnalysis Blog

Bjarne Feddersen: Adding Energy Readers to MDAnalysis

Bjarne Feddersen

Bjarne is joining us to work on the auxiliary data framework. This framework allows the association of non-trajectory data with the frames of a trajectory in MDAnalysis, which could for example be used for further analyses or to filter frames of a trajectory based on non-trajectory information. The framework is currently limited to working with XVG files due to the fact that no other file readers are implemented. This will change with Bjarne’s project. In particular, he will implement new AuxReaders to read energy files. These files are produced by MD engines during a simulation and contain information on, for example, the system’s kinetic and potential energy, temperature, or pressure. These terms describe important quantitites of the system and as such help with evaluation of simulations. Implementing new AuxReaders for these files in MDAnalysis will make this part of the analysis more convenient and at the same time broaden the scope of the auxiliary data framework. To further aid this second objective, Bjarne will compile the lessons he will learn while writing the new AuxReaders into a comprehensive tutorial to make future additions to the framework easier.

Bjarne is a DPhil student in Phil Biggin’s group at the University of Oxford, where he uses MD simulations and other computational tools to investigate the mechanism of action of voltage-gated sodium channels. To balance his desk job he likes to spend time outdoors, and especially enjoys cycling through the green English countryside.

Bjarne is on GitHub as @BFedder and on LinkedIn. He will be reporting on his project on his blog.

@jbarnoud @hmacdope @ojeda-e @IAlibay @fiona-naughton @orbeckst @lilyminium @richardjgowers (mentors)

MDAnalysis 2.1 is out

We are happy to release the version 2.1.0 of MDAnalysis!

In line with ongoing attempts to keep MDAnalysis closer to NEP 29, this version now only supports Python 3.7 to 3.10, in addition to a minimum NumPy version of 1.18.0.

Further details about MDAnalysis’ support policy, including our release schedule, will be provided in an upcoming blog post.

Upgrading to MDAnalysis version 2.1.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

Dielectric constant analysis

Mattia Felice Palermo and Philip Loche contributed a new analysis module to compute average dipole moments. The module can be accessed as MDAnalysis.analysis.dielectric. Here is an example from the documentations:

import MDAnalysis as mda
from MDAnalysis.analysis.dielectric import DielectricConstant
from MDAnalysisTests.datafiles import PSF_TRICLINIC, DCD_TRICLINIC

# Load a pure water system
universe = mda.Universe(PSF_TRICLINIC, DCD_TRICLINIC)

diel = DielectricConstant(universe.atoms)
diel.run()
print(diel.results)
{'M': array([ 1.54082059, -2.03885814,  3.37261771]), 'M2': array([ 5.71970697, 13.45815613, 18.24527209]), 'fluct': array([3.34557887, 9.3012136 , 6.87072189]), 'eps': array([2.47772633, 5.10830197, 4.0347653 ]), 'eps_mean': 3.873597866567474}

R/S chirality is read from RDKit objects

Richard Gowers made the reading of RDKit molecules aware of the R/S chirality when the information is available. The information can be accessed with the AtomGroup.chirality attribute and be used for selections.

import MDAnalysis as mda
from rdkit import Chem

molecule = Chem.MolFromSmiles('CC[C@H](C)[C@H](C(=O)O)N')
universe = mda.Universe(molecule)

# Read the chirality of each atom
universe.atoms.chiralities

# Select atoms from their chirality
universe.select_atoms('element C and chirality S')

Other enhancements

Thanks to Atharva Kulkarni, MDAnalysis.units.convert knows about milliseconds and microseconds. The function, as the name indicates, converts quantities from one unit to an other.

Edis Jakupovic improved the reading of H5MD files so it can better read files without a topology. For these files, the number of atoms is now read from the positions, velocities, or forces in the trajectory.

Thanks to Richard Gowers, again, one can apply the minimum image convention to a collection of vectors using MDAnalysis.lib.distances.minimize_vectors.

Thanks to Jonathan Barnoud, this version of MDAnalysis is compatible with TPR files produced with Gromacs 2022.

Thanks to Hugo MacDermott-Opeskin, you can now specify additional compiler flags for the C/C++ compiler to customise your installation. This can be used to improve performance by using architecture specific flags. See the detailed instructions in the User Guide for more information.

Other changes

Indexing a group (AtomGroup, ResidueGroup, or SegmentGroup) with None now raises a TypeError.

As announced with the previous release, the TZR reader now defaults to a dt of 1.0 ps, instead of 0.0 ps previously, when the time step cannot be read from the file.

For a full list of bugfixes see the CHANGELOG.

Deprecations

In methods of AtomGroup. ResidueGroup, and SegmentGroup, the argument pbc has been renamed wrap. This name makes the meaning of the argument clearer and mirrors the unwrap argument of these same methods. The use of pbc is still possible, bt it is deprecated and will be removed in version 3.0.

Author statistics

Altogether, this represents the work of 14 authors, 6 of which were new contributors:

MDAnalysis thanks NumFOCUS’s continued support as the organisation’s fiscal sponsor.

  • The MDAnalysis Team

Google Summer of Code 2022

Google Summer of Code with
MDAnalysis 2022

MDAnalysis has been accepted as an organization for Google Summer of Code 2022! If you are interested in working with us this summer and you are new to open source, please read the advice and links below and write to us on the mailing list.

We are looking forward to all applications. Note that the GSoC program was updated compared to previous years: GSoC will welcome not just students, but any new and beginner open source contributors over 18 years old. Projects are also now scoped as either 175-hour (medium) or 350-hour (long) size. Finally, the duration can be extended from the standard 12 weeks to 22 weeks.

The application window deadline is April 19, 2022 18:00 (UTC). As part of the application process you must familiarize yourself with Google Summer of Code 2022.

If you are interested in working with us please read on and contact us on our mailing list. Apply as soon as possible at https://summerofcode.withgoogle.com; the application window opens on April 4, 2022 but potential GSoC Contributors are expected to familiarize themselves with application requirements and mentoring organizations as soon as possible. It’s also never too early to discuss application ideas with us!

Project Ideas

If you have your own idea about a potential project we’d love to work with you to develop this idea; please write to us on the developer list to discuss it there.

We also have listed several possible projects for you to work on. Our initial list of ideas (see summaries in the table below) contains various projects of different scope and with different skill requirements. However, check the ideas page — we might add more ideas after the posting date of this post.

The listed skills are suggested rather than essential, although they will be used as part of our decision criteria in choosing GSoC contributors. Our only essential requirement is that you need to demonstrate to us that you’re able and keen to learn anything that you don’t know yet, and we will be happy to help you learn during your project with us.

project name difficulty project size description skills mentors
1 Generalise Groups medium 350 hours Generalise concept of groups Python, NetworkX, Molecular modelling @lilyminium, @fiona-naughton, @richardjgowers, @IAlibay, @micaela-matta
2 Type hinting medium 175 hours Add type hints to the MDAnalysis library Python @IAlibay, @jbarnoud
3 Extend MDAnalysis Interoperability medium 350 hours Extend converters module to other relevant packages Python, Molecular Modelling @lilyminium, @IAlibay, @fiona-naughton, @hmacdope
4 Benchmarking and performance optimization medium 175 hours write benchmarks for automated performance analysis and address performance bottlenecks Python @hmacdope, @orbeckst, @jbarnoud
5 Context-aware guessers medium 350 hours Extend how the library guesses properties such as bonds, masses or atom symbols; and write guessers that know about the context of the system (database of origin, force field…) Python, Molecular modelling @jbarnoud @micaela-matta @IAlibay

Information for prospective GSoC Contributors

You must meet our own requirements if you want to be a GSoC Contributor with MDAnalysis this year (read all the docs behind these links!). You must also meet the eligibility criteria. Our GSoC FAQ collects common questions from applicants.

The MDAnalysis community values diversity and is committed to providing a productive, harassment-free environment to every member. Our Code of Conduct explains the values that we as a community uphold. Every member (and every GSoC Contributor) agrees to follow the Code of Conduct.

As a start to get familiar with MDAnalysis and open source development you should follow these steps:

Complete the Quick Start Guide

We have a Quick Start Guide explaining the basics of MDAnalysis. You should go through it at least once to understand how MDAnalysis is used. Continue reading the User Guide to learn more.

Introduce yourself to us

Introduce yourself on the mailing list. Tell us your github handle, what you plan to work on during the summer or what you have already done with MDAnalysis.

Close an issue of MDAnalysis

You must have at least one commit in the development branch of MDAnalysis in order to be eligible, i.e., you must demonstrate that you have been seriously engaged with the MDAnalysis project. We have a list of easy bugs and suggested GSOC Starter issues to work on in our issue tracker on GitHub. We only accept one GSOC Starter issue per applicant so that everybody gets a chance. If you want to dive deeper, we encourage you to tackle some of the other issues in our issue tracker.

We also appreciate contributions which add more tests or update/improve our documentation.

We recommend you start your application by working on an issue. It will give you a better understanding of MDAnalysis as a project and improve the quality of your application.

To start developing for MDAnalysis have a look at our guide on contributing to MDAnalysis and write to us on the mailing list if you have more questions about setting up a development environment or how to contribute.

— Hugo @hmacdope, Micaela @micaela-matta, Jonathan @jbarnoud, Richard @richardjgowers, Lily @lilyminium, Fiona @fiona-naughton, Irfan @IAlibay, Oliver @orbeckst