bioinformatics/ambertools:26.0
Version sha256.529ebfb5c63869c9cf8a464dbb2a7f4174bf9c703249c6ad60b612fee94bfa65
Image size: 607.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/ambertools:26.0
Shell into the container
singularity shell library://bioinformatics/ambertools:26.0
Run the container
singularity run library://bioinformatics/ambertools:26.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/ambertools:26.0
Shell into the container
apptainer shell library://bioinformatics/ambertools:26.0
Run the container
apptainer run library://bioinformatics/ambertools:26.0
AmberTools 26.0 by David A. Case and the AmberTools developers (https://ambermd.org/AmberTools.php).
This image packages the unmodified upstream AmberTools 26.0 release, as built by
conda-forge (https://github.com/conda-forge/ambertools-feedstock), with Python 3.12 and
no CUDA or MPI. IDIA builds and maintains the image only; report AmberTools bugs
upstream (the Amber mailing list, https://ambermd.org/MailingLists.php) and conda
packaging bugs to the feedstock. Report image problems to support@ilifu.ac.za.
Usage:
singularity run ambertools_26.0.sif -f leap.in # runs tleap
singularity exec ambertools_26.0.sif cpptraj -p sys.prmtop -i analysis.in
singularity exec ambertools_26.0.sif antechamber -i lig.pdb -fi pdb -o lig.mol2 -fo mol2 -c bcc
singularity run --app sander ambertools_26.0.sif -O -i min.in -p sys.prmtop -c sys.inpcrd
singularity exec ambertools_26.0.sif python -c 'import parmed, pytraj'
Apps: tleap, cpptraj, antechamber, parmchk2, sqm, sander, MMPBSA.py, pdb4amber,
parmed, packmol, packmol-memgen, python. Every AmberTools program is on PATH, with
AMBERHOME=/opt/amber. Not included: pmemd (it is part of Amber, not AmberTools, and
has its own licence), GPU (CUDA) and MPI builds, xleap, and csh (so sgldwt.sh and
sgldinfo.sh don't run). The force fields in $AMBERHOME/dat ship with the image; bind
your own structures and parameters with --bind.
Licence: AmberTools is mostly GPL-3.0-or-later. libsander, libpbsa, libmdgx and BLEND
are LGPL-3.0-or-later; arpack, ucpp and cifparse have BSD-style terms; netcdf has
its own terms (see /opt/amber/licenses/netcdf-4.3.0/COPYRIGHT); the force field files
are public domain; the DFTB slko files are CC BY-SA 4.0. See /opt/amber/LICENSE,
/opt/amber/GNU_LGPL_v3 and /opt/amber/licenses/. ParmEd (LGPL-2.1-or-later) comes from the
separate conda-forge parmed package. The conda-forge dependencies' licences (ParmEd's and
Intel MKL's among them) are in /opt/amber/share/licenses/conda/<package>/, and the
resolved package list is in /opt/amber/conda-packages.txt.
Citation (https://ambermd.org/CiteAmber.php): D.A. Case et al. AmberTools.
J. Chem. Inf. Model. 63, 6183-6191 (2023). Many programs ask for their own references
too; see the AmberTools26 reference manual.
This image has 12 apps. Pick one to see how to use it.
singularity run --app MMPBSA.py library://bioinformatics/ambertools:26.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
MMPBSA.py computes MM/PBSA and MM/GBSA binding free energies from a trajectory of the
complex, with topologies for the solvated complex (-sp), complex (-cp), receptor
(-rp) and ligand (-lp). It runs serially: the image has no MMPBSA.py.MPI.
singularity run --app MMPBSA.py ambertools_26.0.sif -O -i mmpbsa.in -o FINAL_RESULTS_MMPBSA.dat -sp solvated.prmtop -cp complex.prmtop -rp receptor.prmtop -lp ligand.prmtop -y prod.nc
Docs: https://ambermd.org/tutorials/advanced/tutorial3/py_script/section1.php
Runs
exec MMPBSA.py "$@"
singularity run --app antechamber library://bioinformatics/ambertools:26.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
Assigns GAFF/GAFF2 atom types and partial charges to small molecules and converts
between formats. -c bcc computes AM1-BCC charges, running sqm in the image; set the
net charge with -nc. Follow it with parmchk2 for missing parameters.
singularity run --app antechamber ambertools_26.0.sif -i lig.pdb -fi pdb -o lig.mol2 -fo mol2 -c bcc -nc 0 -at gaff2
Docs: https://ambermd.org/tutorials/basic/tutorial4b/index.php
Runs
exec antechamber "$@"
singularity run --app cpptraj library://bioinformatics/ambertools:26.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
CPPTRAJ, Amber's trajectory processing and analysis program: RMSD, distances,
hydrogen bonds, clustering, imaging, stripping and format conversion. It reads
commands from -i, or interactively when given none. This is the serial build; there
is no MPI or CUDA cpptraj in the image.
singularity run --app cpptraj ambertools_26.0.sif -p sys.prmtop -y prod.nc -i analysis.in
Docs: https://amberhub.chpc.utah.edu/cpptraj/
Runs
exec cpptraj "$@"
singularity run --app packmol library://bioinformatics/ambertools:26.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
Packmol builds initial configurations by packing molecules into defined regions
(boxes, spheres, layers), e.g. solvent mixtures or solvated solutes. It reads its
input file on standard input.
singularity run --app packmol ambertools_26.0.sif < mixture.inp
Docs: https://m3g.github.io/packmol/userguide.shtml
Runs
exec packmol "$@"
singularity run --app packmol-memgen library://bioinformatics/ambertools:26.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
PACKMOL-Memgen builds membrane systems: it packs lipid bilayers, optionally around a
protein, with water and salt, using Packmol, and with --parametrize writes Amber
topology and coordinates through tleap. Use --preoriented when the protein is already
oriented in the membrane frame (e.g. from OPM); --available_lipids lists the lipids.
singularity run --app packmol-memgen ambertools_26.0.sif --pdb protein.pdb --lipids POPC:CHL1 --ratio 4:1 --preoriented --salt --salt_c Na+ --parametrize
Docs: https://ambermd.org/tutorials/advanced/tutorial38/index.php
Runs
exec packmol-memgen "$@"
singularity run --app parmchk2 library://bioinformatics/ambertools:26.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
Checks a molecule typed by antechamber against GAFF/GAFF2 and writes an frcmod file
with the bond, angle, dihedral and improper parameters the force field lacks, for
tleap to load with loadamberparams.
singularity run --app parmchk2 ambertools_26.0.sif -i lig.mol2 -f mol2 -o lig.frcmod -s gaff2
Docs: https://ambermd.org/tutorials/basic/tutorial4b/index.php
Runs
exec parmchk2 "$@"
singularity run --app parmed library://bioinformatics/ambertools:26.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
ParmEd's command-line editor for Amber topologies: inspect and change prmtop files,
e.g. hydrogen mass repartitioning (HMassRepartition), GB radii (changeRadii) or
charges (change CHARGE). Put the actions, ending with outparm, in a script for -i;
with no script it runs interactively.
singularity run --app parmed ambertools_26.0.sif -O -p sys.prmtop -i hmr.in
Docs: https://parmed.github.io/ParmEd/html/parmed.html
Runs
exec parmed "$@"
singularity run --app pdb4amber library://bioinformatics/ambertools:26.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
Prepares a PDB file for tleap: renames residues to Amber names (e.g. HIS by
protonation state, CYX for disulfide cysteines), renumbers residues, reports gaps,
and can strip waters (--dry) or hydrogens (-y).
singularity run --app pdb4amber ambertools_26.0.sif -i raw.pdb -o clean.pdb --dry
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, pdb4amber section)
Runs
exec pdb4amber "$@"
singularity run --app python library://bioinformatics/ambertools:26.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
The image's Python 3.12 with the AmberTools Python packages importable: parmed,
pytraj (cpptraj's Python interface), sander (the libsander API), pdb4amber and pymsmt,
plus numpy, scipy, scikit-learn and numba. Matplotlib uses the Agg backend, so save
figures to files.
singularity run --app python ambertools_26.0.sif -c 'import pytraj as pt; traj = pt.load("prod.nc", top="sys.prmtop"); print(pt.rmsd(traj, ref=0))'
Docs: https://amber-md.github.io/pytraj/latest/index.html
Runs
exec python "$@"
singularity run --app sander library://bioinformatics/ambertools:26.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
sander, AmberTools' molecular dynamics engine: minimisation, MD, and free energy and
QM/MM runs, controlled by an &cntrl namelist. This is the serial CPU build only: no
sander.MPI, and no pmemd or pmemd.cuda, which are part of Amber rather than
AmberTools. Use it for small systems, minimisation and setup.
singularity run --app sander ambertools_26.0.sif -O -i min.in -o min.out -p sys.prmtop -c sys.inpcrd -r min.rst7
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, sander chapter)
Runs
exec sander "$@"
singularity run --app sqm library://bioinformatics/ambertools:26.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
SQM, the semi-empirical quantum chemistry program (AM1, PM3, PM6, DFTB and others),
for single-point energies and geometry optimisations in vacuum. The input is a
&qmmm namelist followed by the atoms. antechamber calls it for AM1-BCC charges.
singularity run --app sqm ambertools_26.0.sif -O -i sqm.in -o sqm.out
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, sqm chapter)
Runs
exec sqm "$@"
singularity run --app tleap library://bioinformatics/ambertools:26.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
LEaP, the text-mode system builder: loads force fields, builds or reads structures,
solvates and neutralises them, and writes the Amber topology (prmtop) and coordinates
(inpcrd) that sander and cpptraj read. It is also the image's default runscript. The
leaprc files (e.g. leaprc.protein.ff19SB, leaprc.water.opc, leaprc.gaff2) are in
$AMBERHOME/dat/leap/cmd and load by name.
singularity run --app tleap ambertools_26.0.sif -f leap.in
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, LEaP chapter)
Runs
exec tleap "$@"
Bootstrap: docker
From: debian:13-slim
Stage: build
%post
export MICROMAMBA_VERSION=2.9.0-0
export MICROMAMBA_SHA256=366cd9cd8be14df1ab8ed50352a82111082a36686b2d389fdb79a92c3fafb3e3
# The conda-forge build of AmberTools 26.0 for Python 3.12 without CUDA or MPI.
# micromamba checks each package against the channel's sha256 when it downloads it.
export AMBERTOOLS_SPEC='ambertools=26.0=cuda_None_nompi_py312hd652fd9_100'
export DEBIAN_FRONTEND=noninteractive
export MAMBA_ROOT_PREFIX=/tmp/mamba
export AMBER_PREFIX=/opt/amber
apt-get update -y
apt-get install -y --no-install-recommends \
binutils \
ca-certificates \
curl
mkdir -p /tmp/micromamba
cd /tmp/micromamba || exit 1
curl -fsSL -o micromamba \
"https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-linux-64"
echo "${MICROMAMBA_SHA256} micromamba" | sha256sum -c - || exit 1
chmod 755 micromamba
# The prefix has to be the final path: conda packages hard-code it.
# Python is pinned to an exact build and the heavy direct dependencies to exact
# versions (the newest conda-forge releases that satisfy ambertools' constraints on
# 2026-11-10), so a new upload of any of them can't change the image. mkl 2026.2.0 is
# labelled broken on conda-forge (not in its repodata), so mkl stays on 2026.1.0.
# NOTE: this is not a full lock. The remaining transitive dependencies (compiler
# runtimes, netcdf, boost, X11 and so on) still resolve at build time, within the
# version ranges ambertools' own metadata sets. A full @EXPLICIT url#sha256 lock needs a
# conda solver to generate, and there is none to hand without running a downloaded
# binary. Every build records its exact set in /opt/amber/conda-explicit.txt; paste the
# first CI build's copy here as a heredoc (micromamba create --file) to freeze it fully.
./micromamba create -y -p "${AMBER_PREFIX}" \
-c conda-forge --override-channels \
"${AMBERTOOLS_SPEC}" \
'python=3.12.16=h5f976f7_0_cpython' \
'numpy=2.5.4' \
'scipy=1.18.1' \
'scikit-learn=1.9.1' \
'numba=0.68.1' \
'llvmlite=0.50.0' \
'mkl=2026.1.0' \
'parmed=4.3.1' \
'perl=5.44.0' || exit 1
# Record exactly what was resolved, for provenance and to rebuild the same set.
./micromamba list -p "${AMBER_PREFIX}" > "${AMBER_PREFIX}/conda-packages.txt" || exit 1
./micromamba env export -p "${AMBER_PREFIX}" --explicit > "${AMBER_PREFIX}/conda-explicit.txt" \
|| rm -f "${AMBER_PREFIX}/conda-explicit.txt"
cat "${AMBER_PREFIX}/conda-packages.txt"
# Keep every package's licence files, AmberTools' packmol licence among them.
for licence_dir in "${MAMBA_ROOT_PREFIX}"/pkgs/*/info/licenses; do
[ -d "${licence_dir}" ] || continue
package_dir=$(dirname "$(dirname "${licence_dir}")")
package_name=$(basename "${package_dir}")
mkdir -p "${AMBER_PREFIX}/share/licenses/conda/${package_name}"
cp -R "${licence_dir}/." "${AMBER_PREFIX}/share/licenses/conda/${package_name}/"
done
# Runtime only: no package cache, headers, static libraries, docs or bytecode caches.
rm -rf "${MAMBA_ROOT_PREFIX}" /tmp/micromamba
rm -rf "${AMBER_PREFIX}/include" "${AMBER_PREFIX}/share/doc" "${AMBER_PREFIX}/share/man" \
"${AMBER_PREFIX}/share/info" "${AMBER_PREFIX}/share/gtk-doc" "${AMBER_PREFIX}/man" \
"${AMBER_PREFIX}/lib/python3.12/test"
find "${AMBER_PREFIX}" -name '*.a' -type f -delete
find "${AMBER_PREFIX}" -name '__pycache__' -type d -prune -exec rm -rf {} +
find "${AMBER_PREFIX}" -name '*.pyc' -type f -delete
# Strip executables and shared libraries. strip refuses non-ELF files, which is fine.
find "${AMBER_PREFIX}/bin" -maxdepth 1 -type f -exec strip --strip-unneeded {} + 2>/dev/null || true
find "${AMBER_PREFIX}/lib" -maxdepth 1 -type f -name '*.so*' -exec strip --strip-unneeded {} + 2>/dev/null || true
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
Bootstrap: docker
From: debian:13-slim
Stage: final
%files from build
/opt/amber /opt/amber
%post
# The conda environment is self-contained; debian-slim adds only glibc and /bin/sh.
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
%environment
# What conda's activate.d and AmberTools' amber.sh would set.
export AMBERHOME=/opt/amber
export PATH=/opt/amber/bin:$PATH
export PERL5LIB=/opt/amber/lib/perl:/opt/amber/lib/perl/mm_pbsa${PERL5LIB:+:$PERL5LIB}
export QUICK_BASIS=/opt/amber/AmberTools/src/quick/basis
# The image is read-only, and packages in ~/.local would shadow the image's.
export PYTHONDONTWRITEBYTECODE=1
export PYTHONNOUSERSITE=1
export MPLBACKEND=Agg
export LC_ALL=C.UTF-8
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 26.0
Source https://ambermd.org/AmberTools.php
License GPL-3.0-or-later AND LGPL-3.0-or-later AND BSD-3-Clause AND MIT (AmberTools; force fields public domain, DFTB slko files CC-BY-SA-4.0)
Authors David A. Case and the AmberTools developers (https://ambermd.org/contributors.php)
Conda_Package conda-forge ambertools 26.0 cuda_None_nompi_py312hd652fd9_100
%help
AmberTools 26.0 by David A. Case and the AmberTools developers (https://ambermd.org/AmberTools.php).
This image packages the unmodified upstream AmberTools 26.0 release, as built by
conda-forge (https://github.com/conda-forge/ambertools-feedstock), with Python 3.12 and
no CUDA or MPI. IDIA builds and maintains the image only; report AmberTools bugs
upstream (the Amber mailing list, https://ambermd.org/MailingLists.php) and conda
packaging bugs to the feedstock. Report image problems to support@ilifu.ac.za.
Usage:
singularity run ambertools_26.0.sif -f leap.in # runs tleap
singularity exec ambertools_26.0.sif cpptraj -p sys.prmtop -i analysis.in
singularity exec ambertools_26.0.sif antechamber -i lig.pdb -fi pdb -o lig.mol2 -fo mol2 -c bcc
singularity run --app sander ambertools_26.0.sif -O -i min.in -p sys.prmtop -c sys.inpcrd
singularity exec ambertools_26.0.sif python -c 'import parmed, pytraj'
Apps: tleap, cpptraj, antechamber, parmchk2, sqm, sander, MMPBSA.py, pdb4amber,
parmed, packmol, packmol-memgen, python. Every AmberTools program is on PATH, with
AMBERHOME=/opt/amber. Not included: pmemd (it is part of Amber, not AmberTools, and
has its own licence), GPU (CUDA) and MPI builds, xleap, and csh (so sgldwt.sh and
sgldinfo.sh don't run). The force fields in $AMBERHOME/dat ship with the image; bind
your own structures and parameters with --bind.
Licence: AmberTools is mostly GPL-3.0-or-later. libsander, libpbsa, libmdgx and BLEND
are LGPL-3.0-or-later; arpack, ucpp and cifparse have BSD-style terms; netcdf has
its own terms (see /opt/amber/licenses/netcdf-4.3.0/COPYRIGHT); the force field files
are public domain; the DFTB slko files are CC BY-SA 4.0. See /opt/amber/LICENSE,
/opt/amber/GNU_LGPL_v3 and /opt/amber/licenses/. ParmEd (LGPL-2.1-or-later) comes from the
separate conda-forge parmed package. The conda-forge dependencies' licences (ParmEd's and
Intel MKL's among them) are in /opt/amber/share/licenses/conda/<package>/, and the
resolved package list is in /opt/amber/conda-packages.txt.
Citation (https://ambermd.org/CiteAmber.php): D.A. Case et al. AmberTools.
J. Chem. Inf. Model. 63, 6183-6191 (2023). Many programs ask for their own references
too; see the AmberTools26 reference manual.
%runscript
exec tleap "$@"
%apprun tleap
exec tleap "$@"
%apphelp tleap
LEaP, the text-mode system builder: loads force fields, builds or reads structures,
solvates and neutralises them, and writes the Amber topology (prmtop) and coordinates
(inpcrd) that sander and cpptraj read. It is also the image's default runscript. The
leaprc files (e.g. leaprc.protein.ff19SB, leaprc.water.opc, leaprc.gaff2) are in
$AMBERHOME/dat/leap/cmd and load by name.
singularity run --app tleap ambertools_26.0.sif -f leap.in
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, LEaP chapter)
%apprun cpptraj
exec cpptraj "$@"
%apphelp cpptraj
CPPTRAJ, Amber's trajectory processing and analysis program: RMSD, distances,
hydrogen bonds, clustering, imaging, stripping and format conversion. It reads
commands from -i, or interactively when given none. This is the serial build; there
is no MPI or CUDA cpptraj in the image.
singularity run --app cpptraj ambertools_26.0.sif -p sys.prmtop -y prod.nc -i analysis.in
Docs: https://amberhub.chpc.utah.edu/cpptraj/
%apprun antechamber
exec antechamber "$@"
%apphelp antechamber
Assigns GAFF/GAFF2 atom types and partial charges to small molecules and converts
between formats. -c bcc computes AM1-BCC charges, running sqm in the image; set the
net charge with -nc. Follow it with parmchk2 for missing parameters.
singularity run --app antechamber ambertools_26.0.sif -i lig.pdb -fi pdb -o lig.mol2 -fo mol2 -c bcc -nc 0 -at gaff2
Docs: https://ambermd.org/tutorials/basic/tutorial4b/index.php
%apprun parmchk2
exec parmchk2 "$@"
%apphelp parmchk2
Checks a molecule typed by antechamber against GAFF/GAFF2 and writes an frcmod file
with the bond, angle, dihedral and improper parameters the force field lacks, for
tleap to load with loadamberparams.
singularity run --app parmchk2 ambertools_26.0.sif -i lig.mol2 -f mol2 -o lig.frcmod -s gaff2
Docs: https://ambermd.org/tutorials/basic/tutorial4b/index.php
%apprun sqm
exec sqm "$@"
%apphelp sqm
SQM, the semi-empirical quantum chemistry program (AM1, PM3, PM6, DFTB and others),
for single-point energies and geometry optimisations in vacuum. The input is a
&qmmm namelist followed by the atoms. antechamber calls it for AM1-BCC charges.
singularity run --app sqm ambertools_26.0.sif -O -i sqm.in -o sqm.out
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, sqm chapter)
%apprun sander
exec sander "$@"
%apphelp sander
sander, AmberTools' molecular dynamics engine: minimisation, MD, and free energy and
QM/MM runs, controlled by an &cntrl namelist. This is the serial CPU build only: no
sander.MPI, and no pmemd or pmemd.cuda, which are part of Amber rather than
AmberTools. Use it for small systems, minimisation and setup.
singularity run --app sander ambertools_26.0.sif -O -i min.in -o min.out -p sys.prmtop -c sys.inpcrd -r min.rst7
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, sander chapter)
%apprun MMPBSA.py
exec MMPBSA.py "$@"
%apphelp MMPBSA.py
MMPBSA.py computes MM/PBSA and MM/GBSA binding free energies from a trajectory of the
complex, with topologies for the solvated complex (-sp), complex (-cp), receptor
(-rp) and ligand (-lp). It runs serially: the image has no MMPBSA.py.MPI.
singularity run --app MMPBSA.py ambertools_26.0.sif -O -i mmpbsa.in -o FINAL_RESULTS_MMPBSA.dat -sp solvated.prmtop -cp complex.prmtop -rp receptor.prmtop -lp ligand.prmtop -y prod.nc
Docs: https://ambermd.org/tutorials/advanced/tutorial3/py_script/section1.php
%apprun pdb4amber
exec pdb4amber "$@"
%apphelp pdb4amber
Prepares a PDB file for tleap: renames residues to Amber names (e.g. HIS by
protonation state, CYX for disulfide cysteines), renumbers residues, reports gaps,
and can strip waters (--dry) or hydrogens (-y).
singularity run --app pdb4amber ambertools_26.0.sif -i raw.pdb -o clean.pdb --dry
Docs: https://ambermd.org/Manuals.php (AmberTools26 reference manual, pdb4amber section)
%apprun parmed
exec parmed "$@"
%apphelp parmed
ParmEd's command-line editor for Amber topologies: inspect and change prmtop files,
e.g. hydrogen mass repartitioning (HMassRepartition), GB radii (changeRadii) or
charges (change CHARGE). Put the actions, ending with outparm, in a script for -i;
with no script it runs interactively.
singularity run --app parmed ambertools_26.0.sif -O -p sys.prmtop -i hmr.in
Docs: https://parmed.github.io/ParmEd/html/parmed.html
%apprun packmol
exec packmol "$@"
%apphelp packmol
Packmol builds initial configurations by packing molecules into defined regions
(boxes, spheres, layers), e.g. solvent mixtures or solvated solutes. It reads its
input file on standard input.
singularity run --app packmol ambertools_26.0.sif < mixture.inp
Docs: https://m3g.github.io/packmol/userguide.shtml
%apprun packmol-memgen
exec packmol-memgen "$@"
%apphelp packmol-memgen
PACKMOL-Memgen builds membrane systems: it packs lipid bilayers, optionally around a
protein, with water and salt, using Packmol, and with --parametrize writes Amber
topology and coordinates through tleap. Use --preoriented when the protein is already
oriented in the membrane frame (e.g. from OPM); --available_lipids lists the lipids.
singularity run --app packmol-memgen ambertools_26.0.sif --pdb protein.pdb --lipids POPC:CHL1 --ratio 4:1 --preoriented --salt --salt_c Na+ --parametrize
Docs: https://ambermd.org/tutorials/advanced/tutorial38/index.php
%apprun python
exec python "$@"
%apphelp python
The image's Python 3.12 with the AmberTools Python packages importable: parmed,
pytraj (cpptraj's Python interface), sander (the libsander API), pdb4amber and pymsmt,
plus numpy, scipy, scikit-learn and numba. Matplotlib uses the Agg backend, so save
figures to files.
singularity run --app python ambertools_26.0.sif -c 'import pytraj as pt; traj = pt.load("prod.nc", top="sys.prmtop"); print(pt.rmsd(traj, ref=0))'
Docs: https://amber-md.github.io/pytraj/latest/index.html
%test
export AMBERHOME=/opt/amber
export PATH=/opt/amber/bin:$PATH
export PERL5LIB=/opt/amber/lib/perl:/opt/amber/lib/perl/mm_pbsa
export PYTHONDONTWRITEBYTECODE=1
export PYTHONNOUSERSITE=1
export MPLBACKEND=Agg
grep -q 'ambertools *26\.0 *cuda_None_nompi_py312hd652fd9_100' /opt/amber/conda-packages.txt || exit 1
# The help commands conda-forge's own package test runs.
tleap -h > /dev/null || exit 1
cpptraj -h > /dev/null || exit 1
sander --version || exit 1
antechamber -h > /dev/null || exit 1
sqm -h > /dev/null || exit 1
MMPBSA.py -h > /dev/null || exit 1
parmed -h > /dev/null || exit 1
python -I -c 'import parmed, pytraj, sander, pdb4amber, pymsmt; print("parmed", parmed.__version__); print("pytraj", pytraj.__version__)' || exit 1
# Build a capped alanine with ff19SB and check tleap wrote a topology.
workdir=$(mktemp -d) || exit 1
cd "$workdir" || exit 1
cat > leap.in <<'EOF'
source leaprc.protein.ff19SB
m = sequence { ACE ALA NME }
saveamberparm m ala.prmtop ala.inpcrd
quit
EOF
tleap -f leap.in > tleap.out 2>&1 || { cat tleap.out; exit 1; }
grep -q '%FLAG POINTERS' ala.prmtop || { cat tleap.out; exit 1; }
[ -s ala.inpcrd ] || exit 1
# cpptraj reads the topology tleap just wrote.
printf 'parm ala.prmtop\nparminfo\nquit\n' > cpptraj.in
cpptraj -i cpptraj.in > cpptraj.out 2>&1 || { cat cpptraj.out; exit 1; }
grep -q '22 atoms' cpptraj.out || { cat cpptraj.out; exit 1; }
cd / || exit 1
rm -rf "$workdir"
Download bioinformatics-ambertools_26.0.def
#!/bin/sh
exec tleap "$@"
#!/bin/sh
export AMBERHOME=/opt/amber
export PATH=/opt/amber/bin:$PATH
export PERL5LIB=/opt/amber/lib/perl:/opt/amber/lib/perl/mm_pbsa
export PYTHONDONTWRITEBYTECODE=1
export PYTHONNOUSERSITE=1
export MPLBACKEND=Agg
grep -q 'ambertools *26\.0 *cuda_None_nompi_py312hd652fd9_100' /opt/amber/conda-packages.txt || exit 1
# The help commands conda-forge's own package test runs.
tleap -h > /dev/null || exit 1
cpptraj -h > /dev/null || exit 1
sander --version || exit 1
antechamber -h > /dev/null || exit 1
sqm -h > /dev/null || exit 1
MMPBSA.py -h > /dev/null || exit 1
parmed -h > /dev/null || exit 1
python -I -c 'import parmed, pytraj, sander, pdb4amber, pymsmt; print("parmed", parmed.__version__); print("pytraj", pytraj.__version__)' || exit 1
# Build a capped alanine with ff19SB and check tleap wrote a topology.
workdir=$(mktemp -d) || exit 1
cd "$workdir" || exit 1
cat > leap.in <<'EOF'
source leaprc.protein.ff19SB
m = sequence { ACE ALA NME }
saveamberparm m ala.prmtop ala.inpcrd
quit
EOF
tleap -f leap.in > tleap.out 2>&1 || { cat tleap.out; exit 1; }
grep -q '%FLAG POINTERS' ala.prmtop || { cat tleap.out; exit 1; }
[ -s ala.inpcrd ] || exit 1
# cpptraj reads the topology tleap just wrote.
printf 'parm ala.prmtop\nparminfo\nquit\n' > cpptraj.in
cpptraj -i cpptraj.in > cpptraj.out 2>&1 || { cat cpptraj.out; exit 1; }
grep -q '22 atoms' cpptraj.out || { cat cpptraj.out; exit 1; }
cd / || exit 1
rm -rf "$workdir"
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
# What conda's activate.d and AmberTools' amber.sh would set.
export AMBERHOME=/opt/amber
export PATH=/opt/amber/bin:$PATH
export PERL5LIB=/opt/amber/lib/perl:/opt/amber/lib/perl/mm_pbsa${PERL5LIB:+:$PERL5LIB}
export QUICK_BASIS=/opt/amber/AmberTools/src/quick/basis
# The image is read-only, and packages in ~/.local would shadow the image's.
export PYTHONDONTWRITEBYTECODE=1
export PYTHONNOUSERSITE=1
export MPLBACKEND=Agg
export LC_ALL=C.UTF-8