This is an old revision of the document!
From Ambermd.org:
Amber is a suite of biomolecular simulation programs. It began in the late 1970's, and is maintained by an active development community; see our history page and our contributors page for more information. The term “Amber” refers to two things. First, it is a set of molecular mechanical force fields for the simulation of biomolecules; these force fields are in the public domain, and are used in a variety of simulation programs. Second, it is a package of molecular simulation programs which includes source code and demos. Amber is distributed in two parts: AmberTools and Amber.
This software page is a work in progress - it is not yet available for use.
Important!
This section is intended for RSE HPC staff, or users who are interested in how the software is configured. If you only need to use the software, stop reading here.
Amber appears to have few dependencies at first, but as you configure the source it looks for a lot of additional libraries. At least the following build tools are required:
In addition these libraries are needed:
Build script:
Note that you must download the files ambertools25.tar.bz2 and pmemd24.tar.bz2 from https://ambermd.org/GetAmber.php - these are behind a download form - and they should be placed in the same directory as the build script.
ambertools25.tar.bz2
pmemd24.tar.bz2
#!/bin/bash echo "Loading modules..." module load apptainer echo "" echo "Building container..." export APPTAINER_TMPDIR=/scratch # You must supply a copy of AMBERMD tar files # in this SOURCE_DIR SOURCE_DIR=`pwd` AM24="pmemd24.tar.bz2" AM25="ambertools25.tar.bz2" echo "" echo "Checking source files..." if [ -s "$SOURCE_DIR/$AM24" ] then echo "- Found - $SOURCE_DIR/$AM24" else echo "- WARNING - $SOURCE_DIR/$AM24 is MISSING" echo "" echo "Press return to continue or Control+C to exit and fix" read fi if [ -s "$SOURCE_DIR/$AM25" ] then echo "- Found - $SOURCE_DIR/$AM25" else echo "- WARNING - $SOURCE_DIR/$AM25 is MISSING" echo "" echo "Press return to continue or Control+C to exit and fix" read fi apptainer build --bind $SOURCE_DIR:/mnt ambermd.24.25.sif ambermd.def 2>&1 | tee ambermd.log
Container Definition:
Bootstrap: docker From: nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04 #################################################################### # # Amber MD container # ================== # This is a runtime environment for the Ambder MD tools. # Please see: # https://hpc.researchcomputing.ncl.ac.uk/dokuwiki/dokuwiki/doku.php?id=advanced:software:ambermd # #################################################################### %post # Prevent interactive prompts export DEBIAN_FRONTEND=noninteractive #################################################################### # # Basic system packages # #################################################################### # Update & install only necessary packages apt-get update # Base stuff everything will need apt-get install -y apt-utils wget build-essential aptitude gcc g++ gfortran cmake automake autoconf vim less git # These are specifically needed by Amber MD apt-get install -y \ libopenmpi-dev \ python3 \ flex \ bison \ m4 \ liblapack-dev \ libblas-dev \ libarpack2-dev \ libucpp-dev \ libnlopt-dev \ libz-dev \ libbz2-dev \ libapbs-dev \ libfftw3-mpi-dev \ libfftw3-dev \ libprotobuf-dev \ xorg-dev \ libxext-dev \ libxt-dev \ libx11-dev \ libice-dev \ libsm-dev \ libgomp1 \ devscripts \ debhelper \ fakeroot # Python 3 modules needed by Amber MD apt-get install -y \ python3-pip \ python3-numpy \ python3-tk \ python3-scipy \ python3-matplotlib # Clean up APT cache to save space apt-get clean # Clean out Python pip cache pip3 cache purge ################################################################################# # # This is all the custom stuff needed to build the various bioinformatics tools # ################################################################################# # This flag needs to be set to indicate which CPU architecture we # are optimising for. AMD_ARCH=1 if [ "$AMD_ARCH" = "1" ] then # Compiling on AMD Epyc export BASE_CFLAGS="-O3 -march=native -pipe" export BASE_CFLAGS_ALT="-O3 -march=native -pipe" export MAKE_JOBS=8 else # Compiling on generic system export BASE_CFLAGS="-O" export BASE_CFLAGS_ALT="-O" export MAKE_JOBS=8 fi export CFLAGS="$BASE_CFLAGS" export CPPFLAGS="" export CXXFLAGS="$CFLAGS" export LD_LIBRARY_PATH=/opt/lib:$LD_LIBRARY_PATH export PATH=/opt/bin:$PATH echo "" echo "Post-OS-install setup for Bio apps container" echo "============================================" # A download place for external libraries mkdir -p /src/zipped # Where installations go mkdir -p /opt/pmemd24 echo "" echo "1. Install Amber MD 24" echo "======================" cd /src if [ -s /mnt/pmemd24.tar.bz2 ] then tar -jxf /mnt/pmemd24.tar.bz2 cd /src/pmemd24_src/build cmake /src/pmemd24_src \ -DCMAKE_INSTALL_PREFIX=/opt/pmemd24 \ -DCOMPILER=GNU \ -DMPI=TRUE \ -DCUDA=TRUE \ -DINSTALL_TESTS=TRUE \ -DDOWNLOAD_MINICONDA=FALSE \ -DBUILD_PYTHON=TRUE \ -DBUILD_PERL=TRUE \ -DBUILD_GUI=TRUE \ -DPMEMD_ONLY=TRUE \ -DCHECK_UPDATES=FALSE make -j$MAKE_JOBS make install else echo "Amber MD 24 source file not found" exit 1 fi echo "" echo "2. Install Amber MD 25" echo "======================" cd /src if [ -s /mnt/ambertools25.tar.bz2 ] then tar -jxf /mnt/ambertools25.tar.bz2 cd /src/ambertools25_src cmake /src/ambertools25_src \ -DCMAKE_INSTALL_PREFIX=/opt/ambertools25 \ -DCOMPILER=GNU \ -DMPI=TRUE \ -DCUDA=TRUE \ -DINSTALL_TESTS=TRUE \ -DDOWNLOAD_MINICONDA=TRUE make -j$MAKE_JOBS make install else echo "Amber MD 25 source file not found" exit 1 fi # Remove all src packages echo "" echo "Cleaning up downloaded src tree" echo "==================================" cd rm -rf /src echo "" echo "All done" %environment export PATH=/opt/bin:$PATH export LD_LIBRARY_PATH=/opt/lib:$LD_LIBRARY_PATH export CFLAGS="-O3 -march=native -pipe" export CXXFLAGS="$CFLAGS" export MANPATH=/opt/man %runscript
Run Script:
#!/bin/bash module load apptainer IMAGE_NAME=/nobackup/shared/containers/ambermd.24.25.sif container.run() { # Run a command inside the container... # automatically bind the /scratch and /nobackup dirs # pass through any additional parameters given on the command line apptainer exec --nv --bind /scratch:/scratch --bind /nobackup:/nobackup ${IMAGE_NAME} $@ }
Back to Software
Table of Contents
HPC Service
Main Content Sections
Documentation Tools