ArticleslgStudy

computer science

MDANSE

MDANSE is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand MDANSE rather than just read about it. In short: MDANSE (Molecular Dynamics Analysis for Neutron Scattering Experiments) is a free and open-source Python software package for analysing molecular dynamics (MD) trajectories and computing observables that can be compared directly with neutron scattering experiments. It is the successor of nMOLDYN, developed from 1995 to 2022.

Key takeaways

  • MDANSE belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect MDANSE to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of MDANSE from memory before moving on to harder problems.

Reference excerpt

MDANSE (Molecular Dynamics Analysis for Neutron Scattering Experiments) is a free and open-source Python software package for analysing molecular dynamics (MD) trajectories and computing observables that can be compared directly with neutron scattering experiments. It is the successor of nMOLDYN, developed from 1995 to 2022.

History

MOLDYN (1983) MOLDYN is a FORTRAN 77 program by D. J. Craik, S. Kumar, and D. E. Levy, published in 1983, for computing NMR spin-relaxation parameters from molecular dynamics models. Its core operation — evaluating time correlation functions from MD trajectories and comparing them with spectroscopic data — established the template that nMOLDYN and MDANSE later applied to neutron scattering.

nMOLDYN (1995–2022) nMOLDYN was created by Gérald Kneller, Volker Keiner, Meinhard Kneller, and Matthias Schiller at the CNRS Centre de Biophysique Moléculaire in Orléans, France, and first published in 1995. The name adds the prefix "n" (for neutron) to MOLDYN. The program provided an interactive shell for computing neutron scattering-oriented time correlation functions from MD trajectories, using FFT algorithms throughout. In 2003, Tomasz Róg, Krzysztof Murzyn, Konrad Hinsen, and Gérald Kneller rewrote nMOLDYN in Python, extending its scope and adding a graphical user interface (GUI). This version relied on Hinsen's Molecular Modelling Toolkit (MMTK) for trajectory handling and stored data in NetCDF format. In 2012, Hinsen, Éric Pellegrini, Sławomir Stachura, and Kneller released nMoldyn 3, which introduced task-farming parallelisation for multicore desktops and distributed-memory clusters. The final release of nMOLDYN 3, version 3.0.12, appeared in August 2022; the project is now in maintenance-only status, still available at GitHub. Because of its dependence on Python 2 and the MMTK library, porting nMOLDYN to Python 3 was not pursued by its original authors.

MDANSE (2017–present) MDANSE grew out of nMOLDYN at the Institut Laue-Langevin (ILL) in Grenoble, France. Gaël Goret, Bachir Aoun, and Éric Pellegrini published the first description in 2017. Development then shifted to the ISIS Neutron and Muon Source (STFC, UK), which maintains the project jointly with the ILL. Versions up to 1.5.2 (April 2021) were Python 2-based. A major rewrite targeting Python 3 was released as MDANSE 2.0.0 in April 2026.

Features MDANSE accepts MD trajectories from a wide range of simulation codes, including GROMACS, LAMMPS, CASTEP, VASP, CP2K, DL_POLY, CHARMM, NAMD, and others, converting them to HDF5 format; output can additionally be exported as plain text. The software computes more than 40 molecular properties grouped into five categories:

Scattering Coherent and incoherent intermediate scattering functions I(Q,τ) dynamic structure factors S(Q,ω) elastic incoherent structure factors (EISF) van Hove functions static structure factors Dynamics Velocity autocorrelation functions density of states mean-square displacements (MSD) angular velocity autocorrelation functions reorientational correlation functions memory functions Structure Radial distribution functions coordination numbers spatial density maps Thermodynamics Kinetic and potential energy distributions Infrared IR absorption spectra derived from dipole autocorrelation functions A separate PyPI package, MDANSE_GUI, provides an interactive graphical front-end that supports running multiple analyses concurrently and visualising results within the same session. MDANSE can also be driven from Python scripts without the GUI.

Implementation MDANSE is written entirely in Python and distributed via PyPI (pip install MDANSE). It relies on NumPy, SciPy, and h5py for numerical work and trajectory storage, and uses MDAnalysis, ASE, and mdtraj as optional back-ends for trajectory conversion. The original MPI parallelisation inherited from nMOLDYN 3 was retained in the 1.x series. The 2.x series, which requires Python 3.10 or later, introduced a redesigned internal architecture, a new plotting interface, and TOML-based settings.

Related software MDANSE and nMOLDYN share their scientific scope with several other programs. Sassena is a C++/MPI tool optimised for petascale parallel computation of X-ray and neutron scattering from very large MD trajectories. LiquidLib provides similar scattering calculations in a Python framework. VMD, MDAnalysis, and TRAVIS are general-purpose MD analysis packages that also compute some scattering-relevant quantities.

References

Worked examples

Example 1 — a first encounter with MDANSE

Start with the simplest possible case. Write down what MDANSE claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to MDANSE before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about MDANSE ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of MDANSE

In research
MDANSE appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses MDANSE in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
MDANSE is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational chemistry software, Free science software, Molecular dynamics software, so understanding it makes those chapters shorter.
In everyday life
Look for MDANSE outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “MDANSE” →

How to study MDANSE in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what MDANSE means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain MDANSE out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is MDANSE in simple terms?

MDANSE (Molecular Dynamics Analysis for Neutron Scattering Experiments) is a free and open-source Python software package for analysing molecular dynamics (MD) trajectories and computing observables that can be compared directly with neutron scattering experiments. It is the successor of nMOLDYN, d…

Why does MDANSE matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study MDANSE?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on MDANSE.

Tags

  • Computational chemistry software
  • Free science software
  • Molecular dynamics software
  • Neutron scattering

Keep exploring