MD 26 - Python Analysis Environment
Cluster: XLence (UNIMI Dipartimento di Scienze Farmacologiche e Biomolecolari)
Module: md/26
Overview
The md/26 module is the Python analysis environment for molecular dynamics: MDAnalysis,
MDTraj, RDKit, ProDy, ParmEd, JupyterLab and more, on Python 3.12.
Since 2026-09-30 the MD programs are separate modules, built without md26, and are no longer
part of md/26:
| Program | Module | Together with md/26 |
|---|---|---|
| GROMACS 2025.0 + PLUMED 2.10.1 | gromacs/2025.0 |
yes: module load md/26 gromacs/2025.0 |
| PLUMED 2.10.1 | plumed |
yes: module load md/26 plumed |
| AMBER 26 | amber/26 |
no (see below) |
Loading
module load md/26
# Python analysis together with GROMACS (and PLUMED, which gromacs loads)
module load md/26 gromacs/2025.0
md/26 and amber/26 cannot be loaded together: Amber's Python modules are built for Amber's own
Python (numpy 1.26) and would shadow the md26 ones. In a job that needs both, switch between steps:
module unload md/26; module load amber/26.
MPI: mpi4py uses the system OpenMPI 4.1.6, the same as gmx_mpi and the system mpirun.
GROMACS Python API (gmxapi)
gmxapi is built against gromacs/2025.0: load both modules.
import gmxapi as gmx
md = gmx.mdrun(input=gmx.read_tpr('topol.tpr'))
md.run()
Python Analysis Stack
Trajectory Analysis
import MDAnalysis as mda
u = mda.Universe('system.prmtop', 'traj.nc')
protein = u.select_atoms('protein')
import mdtraj as md
traj = md.load('traj.dcd', top='system.pdb')
rmsf = md.rmsf(traj, traj, 0)
Cheminformatics and Structure
from rdkit import Chem
from rdkit.Chem import AllChem
mol = Chem.MolFromSmiles('CCO')
AllChem.EmbedMolecule(mol)
from prody import parsePDB, calcANM
atoms = parsePDB('protein.pdb')
anm = calcANM(atoms.select('calpha'))
Visualization in Jupyter
import nglview as nv
import MDAnalysis as mda
u = mda.Universe('system.prmtop', 'traj.nc')
view = nv.show_mdanalysis(u)
view
Available Python Packages
MD Analysis
| Package | Description |
|---|---|
| MDAnalysis | Universal trajectory analysis |
| MDTraj | Fast trajectory analysis |
| pyedr | GROMACS .edr file reader |
| griddataformats | Volumetric grids (DX, CCP4) |
| nglview | Interactive molecular visualization (Jupyter) |
Cheminformatics and Structure
| Package | Description |
|---|---|
| RDKit | Cheminformatics |
| OpenBabel | Chemical file format conversion |
| Biopython | Bioinformatics |
| ProDy | Protein dynamics, NMA, ENM |
| ParmEd | Topology and parameter editing |
| propka | pKa prediction |
| ASE | Atomic Simulation Environment |
| geometric | Geometry optimizer (QM/MM) |
| cclib | QC output file parser |
Statistics and ML
| Package | Description |
|---|---|
| scikit-learn | Machine learning |
| scipy | Scientific computing |
| statsmodels | Statistical models |
| pingouin | Advanced statistics |
| numba | JIT compilation for fast analysis |
| umap-learn | UMAP dimensionality reduction |
| scanpy | Single-cell analysis |
| anndata | Annotated data (omics) |
Plotting
| Package | Description |
|---|---|
| matplotlib | 2D plotting |
| seaborn | Statistical graphics |
| plotnine | ggplot2-style plots |
| xarray | Labeled N-dimensional arrays |
| zarr | Compressed array storage |
Interactive Notebooks
| Package | Description |
|---|---|
| JupyterLab | Interactive notebooks |
Notes
- PyTorch is not included in this environment. PLUMED 2.10.1 uses the standalone LibTorch 2.13 (CPU) in
/sw/libtorch/2.13.0-cpufor ML-CVs; no separate PyTorch installation is needed for standard PLUMED usage. For custom ML-CV training, use a dedicated environment. - OpenMM and openff-toolkit (force field parameterization) are available in the separate
openff/1environment (module load openff/1).