bioinformatics/mdanalysis:2.11.0
Version sha256.411ee6abdde184321fad818248626c54407814f94a5dbc308ab8ae95b96fac15
Image size: 144.1 MB
For more on pulling from the registry, see the ilifu documentation.
First, once: add the registry and make it your default
singularity remote add --no-login idia-registry https://sregistry.idia.ac.za
singularity remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
singularity remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
singularity pull library://bioinformatics/mdanalysis:2.11.0
Shell into the container
singularity shell library://bioinformatics/mdanalysis:2.11.0
Run the container
singularity run library://bioinformatics/mdanalysis:2.11.0
First, once: add the registry and make it your default
apptainer remote add --no-login idia-registry https://sregistry.idia.ac.za
apptainer remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
apptainer remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
apptainer pull library://bioinformatics/mdanalysis:2.11.0
Shell into the container
apptainer shell library://bioinformatics/mdanalysis:2.11.0
Run the container
apptainer run library://bioinformatics/mdanalysis:2.11.0
MDAnalysis 2.11.0 by the MDAnalysis Development Team (https://www.mdanalysis.org).
This image packages the unmodified upstream release from PyPI, with its [analysis]
extras and IPython. IDIA builds and maintains the image only; report bugs in MDAnalysis
itself at https://github.com/MDAnalysis/mdanalysis/issues.
Documentation: https://docs.mdanalysis.org/ and https://userguide.mdanalysis.org/
MDAnalysis is licensed under the GNU LGPL v3 or later; developer contributions are under
the LGPL v2.1 or later. The licence text is in /opt/mdanalysis/LICENSE and the authors
are listed in /opt/mdanalysis/AUTHORS. The other Python packages keep their own licences,
in /opt/venv/lib/python3.13/site-packages/*.dist-info.
If you use MDAnalysis, upstream asks you to cite:
R. J. Gowers et al. MDAnalysis: A Python package for the rapid analysis of molecular
dynamics simulations. Proc. 15th Python in Science Conference (2016), 98-105.
https://doi.org/10.25080/Majora-629e541a-00e
N. Michaud-Agrawal et al. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics
Simulations. J. Comput. Chem. 32 (2011), 2319-2327. https://doi.org/10.1002/jcc.21787
and any papers listed in the docs for the analysis modules you use.
Included: Python 3.13 with MDAnalysis, its [analysis] extras (Biopython, scikit-learn,
seaborn, networkx, tidynamics, waterdynamics, pathsimanalysis, mdahole2) and IPython.
Not included: the [extra-formats] readers (netCDF4, h5py, chemfiles, ...), and the HOLE
program that mdahole2 calls; pass its path with hole2's executable argument if you need it.
Usage (bind your data, e.g. -B /scratch):
singularity run mdanalysis.sif my_analysis.py
singularity run --app ipython mdanalysis.sif
singularity exec mdanalysis.sif python -c 'import MDAnalysis as mda; u = mda.Universe("top.psf", "traj.dcd"); print(u)'
No topologies, trajectories or test data are included: bind your own with -B.
This image has 2 apps. Pick one to see how to use it.
singularity run --app ipython library://bioinformatics/mdanalysis:2.11.0
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
IPython 9, an interactive shell on the same Python and packages as the python app,
for exploring a Universe by hand. There is no Jupyter kernel or notebook server in
the image, and plots can't open a window (Agg backend), so save them with savefig.
singularity run --app ipython -B /scratch mdanalysis.sif
Docs: https://userguide.mdanalysis.org/stable/examples/quickstart.html
Runs
exec /opt/venv/bin/ipython "$@"
singularity run --app python library://bioinformatics/mdanalysis:2.11.0
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Python 3.13 from the image's /opt/venv (the same as the default runscript), for
running analysis scripts. Importable: MDAnalysis (with MDAnalysis.analysis), the
[analysis] extras (Bio, sklearn, seaborn, networkx, tidynamics, waterdynamics,
pathsimanalysis, mdahole2) and numpy, scipy, pandas and matplotlib. Matplotlib uses
the Agg backend, so save figures to files.
singularity run --app python mdanalysis.sif -c 'import MDAnalysis as mda; from MDAnalysis.analysis import rms; u = mda.Universe("top.psf", "traj.dcd"); print(rms.RMSD(u, select="backbone").run().results.rmsd)'
Docs: https://docs.mdanalysis.org/stable/documentation_pages/analysis_modules.html
Runs
exec /opt/venv/bin/python "$@"
Bootstrap: docker
From: python:3.13.18-slim-trixie
Stage: build
%post
set -eu
export PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1
# Every package is pinned and hash-checked (--require-hashes), and only wheels are
# accepted, so nothing is compiled. The set was resolved for CPython 3.13 on
# manylinux x86_64 from 'mdanalysis[analysis]==2.11.0' plus ipython; the hashes are
# PyPI's for those wheels, checked by downloading each one.
cat > /tmp/requirements.txt <<'REQS'
asttokens==3.0.2 \
--hash=sha256:9da13157f5b28becde0bd374fc677dcd3c290614264eff096f167c469cd9f933
biopython==1.88 \
--hash=sha256:410eaa083fcc308b44c7051e597ae2f39e4068754bdd605cc32aed025aa132d0
cloudpickle==3.1.2 \
--hash=sha256:9acb47f6afd73f60dc1df93bb801b472f05ff42fa6c84167d25cb206be1fbf4a
contourpy==1.4.0 \
--hash=sha256:f1219a8898523cba821085f2da8a1b962cc696325763f09d7f93538ba43b2d70
cycler==0.12.1 \
--hash=sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30
executing==2.3.0 \
--hash=sha256:736e859c9f8701f11fcf516856f26f562e04776387824b43a35a1dfe21c84122
filelock==4.2.10 \
--hash=sha256:9479aaeb4db20b5a53e3da28493edd24720b66b8a0b84030aa56ccdf243d6857
fonttools==4.68.0 \
--hash=sha256:08851f7d2b983412f490b73a7c56f17cbda1d4d85d2ad3f857564bf15b5d9475 \
--hash=sha256:d76f8fdcb6936f5e1045a0c9dd721a4bf11112e60d1e243bfa1d39f06a8b3104
griddataformats==1.2.0 \
--hash=sha256:b42f0a823ce6f526c0052515047237b233748f2bdc38fc797fc37c7df81a8dd5
ipython==9.18.1 \
--hash=sha256:997ce9140d374531a61069c70c0f9ef299d6dd3559ea0f94b8af589726e3c1d5
ipython-pygments-lexers==1.1.1 \
--hash=sha256:a9462224a505ade19a605f71f8fa63c2048833ce50abc86768a0d81d876dc81c
jedi==0.20.1 \
--hash=sha256:0fb16d86c4a4c73c37ba518c77419975e30fcc620658a8d14fbb5720cdd34142
joblib==1.6.0 \
--hash=sha256:3dbbf9f6e4b592a2357b854608e980fe6390d131d7a82f011a377ef2ebef7aba
kiwisolver==1.5.1 \
--hash=sha256:74ad5c3dad54a4641b4c28cd15ded70899d04459c6c7aeacafea716be97cce6d
matplotlib==3.11.2 \
--hash=sha256:1944895967f87c84c9b4bad29a707b31f5b36df4a3a2339ea1f8ea3ce5105539
matplotlib-inline==0.2.2 \
--hash=sha256:3c821cf1c209f59fb2d2d64abbf5b23b67bcb2210d663f9918dd851c6da1fcf6
mda-xdrlib==0.2.0 \
--hash=sha256:0d1757b339f5db2d017a89ddaae06a82cd7a2cce26b8063df9f52b64e933fb47
mdahole2==0.5.0 \
--hash=sha256:6b7a9be247cd99331e8840c9012d0ed7a86874fe110983bbaed00eb39459e7a8
mdanalysis==2.11.0 \
--hash=sha256:b86e3f8831a8c6768d0eb5a44eb7680c1e781b1f65f4cab9f701cf7b7f0a3068
mmtf-python==1.1.3 \
--hash=sha256:502031c509a8a6d73e042781abbd88b84c1afffe65097eb0c1b70f329ffd1e6e
mrcfile==1.5.4 \
--hash=sha256:195370a13db5ce19600499f9bdf90fd9888979bf39de19a17c19024436c6f4c2
msgpack==1.2.4 \
--hash=sha256:7fabd415c41e62006c6641fcdf5b3e866f581c4e11c58328c0d0f69584b9577d
narwhals==2.28.0 \
--hash=sha256:1f69d6385ec30e2fa6e1fdeb37c562ecabd0f713f6f3e3b58a668c5c9df9567f
networkx==3.7 \
--hash=sha256:e3fd2c13a7814cee3746340d8d7f8598a67f16a58bf47fb7f8793fab6efca1b0
numpy==2.5.4 \
--hash=sha256:6ffa07666f8da0eef81d149934a626d0d95fbd6838432a33e66245423a9062c0
packaging==26.3 \
--hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c
pandas==3.1.1 \
--hash=sha256:645fa00fd85cfced2d2c09dc116d3694f578501b1ce4899153fbe64788ecda98
parso==0.8.7 \
--hash=sha256:a8926eb2a1b915486941fdbd31e86a4baf88fe8c210f25f2f35ecec5b574ca1c
pathsimanalysis==1.2.1 \
--hash=sha256:81e8d0d10278de1af7a13603dddf8c005dad80b9d9588314eeea03803a83f158
pexpect==4.9.0 \
--hash=sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523
pillow==13.0.0 \
--hash=sha256:5f56499c1a74d2b862beb0c33b8016f99d095858455df9d21583bbbc1c15b582
prompt-toolkit==3.0.53 \
--hash=sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2
psutil==7.2.2 \
--hash=sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9
ptyprocess==0.7.0 \
--hash=sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35
pure-eval==0.2.4 \
--hash=sha256:96cae060a313cfaad51bb761278bfb0e62dc0248d9315a81173752dc546cd37a
pygments==2.21.0 \
--hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9
pyparsing==3.3.3 \
--hash=sha256:ece8c00a69cf01b45d0b1dedabb469c90d8caf996d4fda40f147627a122849a4
python-dateutil==4.0.0 \
--hash=sha256:a5e246f79eb80475e691bf93862cead98decd8a498cf53ba0516fcdc0f50dc1c
scikit-learn==1.9.1 \
--hash=sha256:55e79d6e9b0923f1a978179822bd43d7f5543f45e970a00fe861f43486380aba
scipy==1.18.1 \
--hash=sha256:fdaf5ea890a6183d0565f51a61799d67081bd5b1cf03c5f4b3fd3732108625c9
seaborn==0.13.2 \
--hash=sha256:636f8336facf092165e27924f223d3c62ca560b1f2bb5dff7ab7fad265361987
stack-data==0.6.3 \
--hash=sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695
threadpoolctl==3.8.0 \
--hash=sha256:f1b49c82704d50f13ffae019c727b0fa4f6791a58f48f06a09c45face1be66da
tidynamics==1.1.2 \
--hash=sha256:3edd862271ef136e35129b303153e790914b66644b2641c92a72a7878a16a858
tqdm==4.70.1 \
--hash=sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73
traitlets==5.16.1 \
--hash=sha256:f775618166caa0396c8e337099240f2bd3e5e917d203b2e6fbe21a58d3cb1f6b
tzdata==2026.6 \
--hash=sha256:0a10eec6e13ef16b627fabed9a5f2ba61a62b1c67f327305f4e7e412a70b4aec
waterdynamics==1.2.0 \
--hash=sha256:8a9eb7e7ad44e2abf9e2542661b2d7b371d8ab6474113a301968e4bf78d4432d
wcwidth==0.9.4 \
--hash=sha256:b185c8b927b23af2721be1783499d1cfa5c028b098b0858951b4ae224477f1c2 \
--hash=sha256:901eace6d2dd25ebb917d0ce5db18e5c537e1504c905cf32f0d006c12098b05d
REQS
# A venv without pip: the image's own pip installs into it, so pip stays out of /opt/venv.
python -m venv --without-pip /opt/venv
python -m pip --python /opt/venv/bin/python install --no-deps --only-binary :all: \
--require-hashes -r /tmp/requirements.txt
rm -f /tmp/requirements.txt
# Test suites and bytecode caches aren't needed at run time. The wheels' shared
# libraries are left unstripped.
# NOTE: auditwheel-repaired libraries (numpy's and scipy's bundled OpenBLAS, etc.) are
# already stripped upstream, and strip can corrupt their patchelf'd headers.
site=/opt/venv/lib/python3.13/site-packages
# NOTE: __pycache__ is deleted per the batch's lean rule, so imports recompile on every
# start (the SIF is read-only). If start-up time matters for array/MPI jobs, run
# `/opt/venv/bin/python -m compileall -q -j 0 "${site}"` after this find instead.
find "${site}" -depth -type d \( -name tests -o -name __pycache__ \) -exec rm -rf {} +
# The MDAnalysis wheel also installs its Sphinx sources as a top-level doc/ package.
rm -rf "${site}/doc"
mkdir -p /opt/mdanalysis
install -m 0644 "${site}/mdanalysis-2.11.0.dist-info/licenses/LICENSE" /opt/mdanalysis/LICENSE
install -m 0644 "${site}/mdanalysis-2.11.0.dist-info/licenses/AUTHORS" /opt/mdanalysis/AUTHORS
Bootstrap: docker
From: python:3.13.18-slim-trixie
Stage: final
%files from build
/opt/venv /opt/venv
/opt/mdanalysis /opt/mdanalysis
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 2.11.0
Source https://github.com/MDAnalysis/mdanalysis
License LGPL-3.0-or-later (contributions LGPL-2.1-or-later)
Authors MDAnalysis Development Team
%help
MDAnalysis 2.11.0 by the MDAnalysis Development Team (https://www.mdanalysis.org).
This image packages the unmodified upstream release from PyPI, with its [analysis]
extras and IPython. IDIA builds and maintains the image only; report bugs in MDAnalysis
itself at https://github.com/MDAnalysis/mdanalysis/issues.
Documentation: https://docs.mdanalysis.org/ and https://userguide.mdanalysis.org/
MDAnalysis is licensed under the GNU LGPL v3 or later; developer contributions are under
the LGPL v2.1 or later. The licence text is in /opt/mdanalysis/LICENSE and the authors
are listed in /opt/mdanalysis/AUTHORS. The other Python packages keep their own licences,
in /opt/venv/lib/python3.13/site-packages/*.dist-info.
If you use MDAnalysis, upstream asks you to cite:
R. J. Gowers et al. MDAnalysis: A Python package for the rapid analysis of molecular
dynamics simulations. Proc. 15th Python in Science Conference (2016), 98-105.
https://doi.org/10.25080/Majora-629e541a-00e
N. Michaud-Agrawal et al. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics
Simulations. J. Comput. Chem. 32 (2011), 2319-2327. https://doi.org/10.1002/jcc.21787
and any papers listed in the docs for the analysis modules you use.
Included: Python 3.13 with MDAnalysis, its [analysis] extras (Biopython, scikit-learn,
seaborn, networkx, tidynamics, waterdynamics, pathsimanalysis, mdahole2) and IPython.
Not included: the [extra-formats] readers (netCDF4, h5py, chemfiles, ...), and the HOLE
program that mdahole2 calls; pass its path with hole2's executable argument if you need it.
Usage (bind your data, e.g. -B /scratch):
singularity run mdanalysis.sif my_analysis.py
singularity run --app ipython mdanalysis.sif
singularity exec mdanalysis.sif python -c 'import MDAnalysis as mda; u = mda.Universe("top.psf", "traj.dcd"); print(u)'
No topologies, trajectories or test data are included: bind your own with -B.
%environment
export PATH=/opt/venv/bin:${PATH}
export MPLBACKEND=Agg
%runscript
exec /opt/venv/bin/python "$@"
%apprun python
exec /opt/venv/bin/python "$@"
%apphelp python
Python 3.13 from the image's /opt/venv (the same as the default runscript), for
running analysis scripts. Importable: MDAnalysis (with MDAnalysis.analysis), the
[analysis] extras (Bio, sklearn, seaborn, networkx, tidynamics, waterdynamics,
pathsimanalysis, mdahole2) and numpy, scipy, pandas and matplotlib. Matplotlib uses
the Agg backend, so save figures to files.
singularity run --app python mdanalysis.sif -c 'import MDAnalysis as mda; from MDAnalysis.analysis import rms; u = mda.Universe("top.psf", "traj.dcd"); print(rms.RMSD(u, select="backbone").run().results.rmsd)'
Docs: https://docs.mdanalysis.org/stable/documentation_pages/analysis_modules.html
%apprun ipython
exec /opt/venv/bin/ipython "$@"
%apphelp ipython
IPython 9, an interactive shell on the same Python and packages as the python app,
for exploring a Universe by hand. There is no Jupyter kernel or notebook server in
the image, and plots can't open a window (Agg backend), so save them with savefig.
singularity run --app ipython -B /scratch mdanalysis.sif
Docs: https://userguide.mdanalysis.org/stable/examples/quickstart.html
%test
set -eu
/opt/venv/bin/python -c 'import MDAnalysis; print(MDAnalysis.__version__)' | grep -qx '2\.11\.0'
/opt/venv/bin/python -c '
import MDAnalysis as mda
import MDAnalysis.analysis.rms, MDAnalysis.analysis.align, MDAnalysis.analysis.distances
import Bio, sklearn, seaborn, networkx, tidynamics, waterdynamics, pathsimanalysis, mdahole2, IPython
u = mda.Universe.empty(4, trajectory=True)
u.atoms.positions = [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]]
assert abs(u.atoms.center_of_geometry()[0] - 0.25) < 1e-6
'
/opt/venv/bin/ipython --version | grep -qx '9\.18\.1'
test -s /opt/mdanalysis/LICENSE
Download bioinformatics-mdanalysis_2.11.0.def
#!/bin/sh
exec /opt/venv/bin/python "$@"
#!/bin/sh
set -eu
/opt/venv/bin/python -c 'import MDAnalysis; print(MDAnalysis.__version__)' | grep -qx '2\.11\.0'
/opt/venv/bin/python -c '
import MDAnalysis as mda
import MDAnalysis.analysis.rms, MDAnalysis.analysis.align, MDAnalysis.analysis.distances
import Bio, sklearn, seaborn, networkx, tidynamics, waterdynamics, pathsimanalysis, mdahole2, IPython
u = mda.Universe.empty(4, trajectory=True)
u.atoms.positions = [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]]
assert abs(u.atoms.center_of_geometry()[0] - 0.25) < 1e-6
'
/opt/venv/bin/ipython --version | grep -qx '9\.18\.1'
test -s /opt/mdanalysis/LICENSE
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export LANG="${LANG:-"C.UTF-8"}"
export GPG_KEY="${GPG_KEY:-"7169605F62C751356D054A26A821E680E5FA6305"}"
export PYTHON_VERSION="${PYTHON_VERSION:-"3.13.18"}"
export PYTHON_SHA256="${PYTHON_SHA256:-"abb0102e6d4ae027509bcb82327d9dd85515b44a3ba8ad538cfc5e9847029f68"}"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export PATH=/opt/venv/bin:${PATH}
export MPLBACKEND=Agg