Skip to main content

Amber

Amber is a package of molecular simulation programs.  It is installed on Hamilton as a software module, which must be loaded in order to make Amber commands available. To view the versions available and load one of them, type e.g:

module avail amber
module load amber/24b

Amber includes many programs, including two molecular dynamics products:

  • pmemd
  • sander

pmemd is optimised for performance and scales better than sander for parallel computations. Performance is much higher on GPUs, using the command pmemd.cuda, so this command and a GPU queue should always be used if possible.

Example job scripts for molecular dynamics

#!/bin/bash 
  
# Example job requesting one H200 GPU.  

# Slurm resource requests:  
#SBATCH –p cuda               # submit the job to the CUDA queue
#SBATCH –t 01:00:00           # time limit for job 
#SBATCH --gres=gpu:h200_nvl:1 # GPU resource allocation
 
# CPU cores, memory and temporary disk space will be allocated automatically. 
# Do not request them in this script. 
 
# Note that CUDA-enabled pmemd is only available for modules versions 24b and later
# Use pmemd.cuda_DPFP for large systems requiring double precision
# Commands to be run:

module load amber/24b
pmemd.cuda -O -i your_input.mdin -o your_output.mdout -p your_topology.prmtop \
        -c your_coords.rst7 <more options>

A single pmemd.cuda simulation may not fill a GPU by itself.  In this case, a 'groupfile' can be used with the command pmemd.cuda.MPI (or pmemd.cuda_DPFP.MPI for double precision) to run multiple, independent simulations at once using MPI parallelism.  The example below runs 8 simulations on one H200 GPU:

#!/bin/bash 
  
# Example job requesting one H200 GPU.  

# Slurm resource requests:  
#SBATCH –p cuda               # submit the job to the CUDA queue
#SBATCH –t 01:00:00           # time limit for job 
#SBATCH --gres=gpu:h200_nvl:1 # GPU resource allocation
 
# CPU cores, memory and temporary disk space will be allocated automatically. 
# Do not request them in this script. 
 
# Commands to be run:

# Use MPS to allow multiple processes to use the GPU(s) simultaneously
# For more infomation see the 'Example job scripts - GPU jobs' page

nvidia-cuda-mps-control -d

module load amber/24b

# Note that CUDA-enabled pmemd is only available for modules versions 24b and later
# Use pmemd.cuda_DPFP.MPI for systems requiring double precision
# Use --arc-par to set the number of MPI tasks per GPU. 
# See the 'Example job scripts - GPU jobs' page for more details.

mpirun --arc-par 8ppg pmemd.cuda.MPI -O -i your_input.mdin -o your_output.mdout \
         -p your_topology.prmtop -c your_coords.rst7 <more options>

Example job script for other Amber calculations

Other Amber calculations can be run effectively on CPUs, generally on a single CPU core, so jobs that use only these tools should not be submitted to a GPU queue.  A template job script is given below.

#!/bin/bash
 
# Request resources:
#SBATCH -c 1           # 1 CPU core
#SBATCH --mem=1G       # memory required, up to 250G on standard nodes.
#SBATCH --time=1:0:0   # time limit for job (format:  days-hours:minutes:seconds)
#SBATCH --gres=tmp:1G  # temporary disk space required on compute node ($TMPDIR),
#                        up to 400G
# Run in the 'shared' queue (job may share node with other jobs)
#SBATCH -p shared
 
# Commands to be run:
module load amber/24b
an_amber_command <input options>