02 Mar 2022
MDAnalysis is working with our fiscal sponsor NumFOCUS on a research project funded by the Gordon & Betty Moore Foundation to understand the barriers to participation that contributors, particularly those from historically underrepresented groups, face in the open-source software community. The NumFOCUS research team would like to talk to past and current (both new or long-term) contributors, project developers and maintainers about their experiences joining and contributing to MDAnalysis.
Interested in sharing your experiences?
Please complete this brief “Participant Interest” form which also contains additional information on the research goals, privacy, and confidentiality considerations. Your participation will be valuable to enabling the growth and sustainability of diverse and inclusive open-source software communities. Accepted participants will participate in a 30-minute interview with a NumFOCUS research team member.
Thank you for your interest!
01 Dec 2021
We are happy to announce the first version of a command-line interface (CLI)
of MDAnalysis!
The CLI allows users to calculate radial distribution
functions (RDF), Root-mean-square deviations (RMSD), and many more directly from
the command line. For example, extracting
the RDF between the water oxygens is just one line of code
mda interrdf -s topol.tpr -f traj.trr -g1 "name OW" -g2 "name OW"
For a detailed synopsis and a list of all available modules check the
sections below as well as
the documentation or the repository.
Providing easier access to the library for day-to-day analysis,
mdacli
is not only for the MDAnalysis community but
also perfect for non-Python users.
The project evolved from the experiences of @joaomcteixeira in
TaurenMD and from @PiCoCentauri in MAICoS.
Installation
Install mdacli
from PyPI
A Conda build will be released soon.
Examples
To use mdacli
, after installation
open your terminal and run
This command provides a list of all available modules similar to the
in the documentation.
The synopsis for calculating a radial distribution function (RDF)
between two groups is given by
A sample water trajectory is provided of rigid SPC/E water is
provided testfiles.
topol.tpr
is a GROMACS topolgy file and traj.trr
the corresponding trajectory. The oxygen-oxygen
RDF can be calculated using
mda interrdf -s topol.tpr -f traj.trr -g1 "name OW" -g2 "name OW"
The oxygens are selected with the -g1
and -g2
flags.
More verbose output is achieved by using the -v
flag. Even more,
information is provided with the --debug
flag.
All warnings of the run can also be directly stored to a
log file using the --logfile
flag
mda --debug --logfile rdf.log interrdf -v -s topol.tpr -f traj.trr -g1 "name OW" -g2 "name OW"
The results of each analysis are stored by default in the current directory.
The output directory can be changed with the -o
flag and an additional prefix can be
set using the -pre
flag.
The results of the RDF calculations
are two .csv
files. The actual RDF is saved in the 2nd and 3rd columns
of InterRDF_count_bins_rdf.csv
. The header rows of each file provide
information about the stored data. Simple results such as bare numbers or
strings are stored as JSON
dumps. More complex data such as
4 or higher-dimensional arrays are saved as a bunch of CSV files zipped
together.
Contributions
Contributions are always welcome on Github. Not only in the form of
code contributions via pull requests but also issues, especially
since the project is in an early development phase.
Motivation and Background
The CLI was developed since
we were facing the same problem in the labs regularly.
New students/scientists start writing their analysis
scripts and face the same challenges and problems i.e.
- How to initialize the universe and loop through frames without copying many lines of code?
- How to write a CLI parser to analyze several of their simulations?
- How to process and save their trajectories in a clever way?
- …
Some of these problems can be solved by using the
MDAnalysis.analysis.base.AnalysisBase
class of MDA. However,
this class is limited to Python.
A generic CLI wrapper for all classes based on the AnalysisBase could
therefore help people to analyze their simulation
data with the least effort. With this approach, it is easier to use for
MDA-users since they just stay within their known universe
with known selection commands and results structures.
An existing framework makes it also more attractive for users
and developers to write their analysis using the
base.AnalysisBase
. For more technical details visit the
documentation.
– @PicoCentauri and @joaomcteixeira
14 Sep 2021
Another year, another successful Google Summer of Code! We had
two fantastic projects this year, including the first trials of our MDAKit model for building an ecosystem of analysis modules. Both projects were a resounding success and represent an exciting new direction for MDAnalysis. None of this would have been possible without our wonderful students: Estefania Barreto-Ojeda (@ojeda-e), and Orion Cohen (@orioncohen).
You can read more about their projects and packages in their blog posts:
We have immensely enjoyed working with Estefania and Orion and look forward to seeing how they continue to contribute to the MDAnalysis community, and where they take their science next.
— Mentors @hmacdope, @lilyminium, @richardjgowers, @fiona-naughton, @orbeckst, @IAlibay