• Home
  • Accessing Our Facilities
    • Apply for Access
    • HPC Resource List
    • Our Staff
    • Our Research Projects
    • Our Research Software

    • Contributions & Costings
    • HPC Driving Test
  • Documentation
    • Documentation Home
    • Getting Started
    • Advanced Topics
    • Training & Workshops
    • FAQ
    • Policies & Procedures
    • Using the Wiki

    • Data & Report Terminology
    • About this website

    • Reports
  • My Account
    • My HPC Projects
HPC Support
Trace: • ambermd

This is an old revision of the document!


Amber MD

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.
  • For more information: https://ambermd.org/index.php

This software page is a work in progress - it is not yet available for use.


Running Amber MD on Comet

Amber - Serial

Amber - Parallel / MPI

Amber - CUDA

Amber - Interactive Desktop GUI


Building Amber MD on Comet

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:

  • GCC
  • Nvidia CUDA SDK
  • flex
  • bison
  • m4
  • python3
  • build-essential
  • autoconf
  • cmake
  • git

In addition these libraries are needed:

  • libopenmpi-dev
  • 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

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.

#!/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

Previous Next

HPC Support

Table of Contents

Table of Contents

  • Amber MD
    • Running Amber MD on Comet
      • Amber - Serial
      • Amber - Parallel / MPI
      • Amber - CUDA
      • Amber - Interactive Desktop GUI
    • Building Amber MD on Comet

HPC Service

  • News & Changes

Main Content Sections

  • Documentation Home
  • Getting Started
  • Advanced Topics
  • Training & Workshops
  • FAQ
  • Policies & Procedures
  • Using the Wiki
  • Contact us & Get Help

Documentation Tools

  • Wiki Login
  • RSE-HPC Team Area
Developed and operated by
Research Software Engineering
Copyright © Newcastle University
Contact us @rseteam