Amber on Biowulf

AMBER (Assisted Model Building with Energy Refinement) is a package of molecular simulation programs. AMBER contains a large number of of modules; note that only the sander modules and pmemd are parallelized.

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 developed by: David Case at Rutgers University, Tom Cheatham at the University of Utah, Ken Merz at Michigan State University, Adrian Roitberg at the University of Florida, Carlos Simmerling at SUNY-Stony Brook, Scott LeGrand at NVIDIA, Darrin York at Rutgers University, Ray Luo at UC Irvine, Junmei Wang at the University of Pittsburgh, Maria Nagan at Stony Brook, Ross Walker at GSK, and many others. Amber was originally developed under the leadership of Peter Kollman.

Amber website

A bug in parmed was reported in Jan 2023. The patch will be included in the upcoming AmberTools23. In the meantime, any users who use Amber to build CHARMM forcefields should use the independent parmed, which has been patched. For more information, please contact Alex Sodt alexander.sodt@nih.gov

Current Versions

For basic information about setting up an Amber job, see the Amber manual and the Amber tutorials .

Considerations for Amber jobs on rhel8:

The following sub-tabs have examples for each version with their cooresponding dependency builds:

Amber version 20 is built with both CPU and GPU compatibility

  • Module Name: amber/20-gpu (GPU)is built with gcc 8.5.0, openmpi 4.1.3, and CUDA 11.3

    Amber/20-gpu is compiled to run on a100, v100x, v100, and p100 GPU types

  • Module Name: amber/20.gcc (CPU) is built with gcc 8.5.0 and openmpi 4.1.3

    Sample batch script for amber/20-gpu on 1 GPU
    #!/bin/bash
    
    module load amber/20-gpu
    
    export CUDA_VISIBLE_DEVICES=0
    $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPU
    
    For GPU jobs, you can submit with the following:
    sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.test  
    
    Sample MPI batch script for amber/20.gcc
    #!/bin/bash
    
    module load amber/20.gcc
    
    mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
    
    
    sbatch  --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test  #ntasks < 16
    sbatch -p multinode  --ntasks=# --ntasks-per-core=1 cpu.test  #ntasks > 16
    
    where:
    -p multinodeSubmit to the multinode partition where all nodes are Infiniband-connected
    --ntasks # the number of MPI processes you wish to run.
    --ntasks-per-core=1 ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs.
    --time=168:00:00 max walltime=168 hrs (1 week). See the section on chaining jobs below.
    --exclusive Allocate the nodes exclusively to this job (recommended for parallel jobs)

    Documentation

    Amber documentation for 2020

  • Amber version 22 is built with both CPU and GPU compatibility

  • Module Name: amber/22-gpu (GPU)is built with gcc 8.5.0, openmpi 4.1.3, and CUDA 11.3

    Amber/22-gpu is compiled to run on a100, v100x, v100, and p100 GPU types

  • Module Name: amber/22.gcc (CPU) is built with gcc 8.5.0 and openmpi 4.1.3

    Sample batch script for amber/22-gpu on 1 GPU
    #!/bin/bash
    
    module load amber/22-gpu
    
    export CUDA_VISIBLE_DEVICES=0
    $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPU
    
    For GPU jobs, you can submit with the following:
    sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.test  
    
    Sample MPI batch script for amber/22.gcc
    #!/bin/bash
    
    module load amber/22.gcc
    
    mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
    
    
    sbatch  --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test  #ntasks < 16
    sbatch -p multinode  --ntasks=# --ntasks-per-core=1 cpu.test  #ntasks > 16
    
    where:
    -p multinodeSubmit to the multinode partition where all nodes are Infiniband-connected
    --ntasks # the number of MPI processes you wish to run.
    --ntasks-per-core=1 ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs.
    --time=168:00:00 max walltime=168 hrs (1 week). See the section on chaining jobs below.
    --exclusive Allocate the nodes exclusively to this job (recommended for parallel jobs)

    Documentation

    Amber documentation for 2022

  • Amber version 22-ambertools23 is built with both CPU and GPU compatibility

  • Module Name: amber/22-ambertools23-gpu.gcc (GPU)is built with gcc 9.2.0, openmpi 4.1.4, and CUDA 11.0

    Amber/22-ambertools23-gpu.gcc is compiled to run on a100, v100x, v100, and p100 GPU types

  • Module Name: amber/22-ambertools23.gcc (CPU) is built with gcc 9.2.0 and openmpi 4.1.4

    Sample batch script for amber/amber/22-ambertools23-gpu.gcc on 1 GPU
    #!/bin/bash
    
    module load amber/22-ambertools23-gpu.gcc
    
    export CUDA_VISIBLE_DEVICES=0
    $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPU
    
    For GPU jobs, you can submit with the following:
    sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.test  
    
    Sample MPI batch script for amber/22-ambertools23.gcc
    #!/bin/bash
    
    module load amber/22-ambertools23.gcc
    
    mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
    
    
    sbatch  --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test  #ntasks < 16
    sbatch -p multinode  --ntasks=# --ntasks-per-core=1 cpu.test  #ntasks > 16
    
    where:
    -p multinodeSubmit to the multinode partition where all nodes are Infiniband-connected
    --ntasks # the number of MPI processes you wish to run.
    --ntasks-per-core=1 ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs.
    --time=168:00:00 max walltime=168 hrs (1 week). See the section on chaining jobs below.
    --exclusive Allocate the nodes exclusively to this job (recommended for parallel jobs)

    Documentation

    Documentation for Amber 22 and Ambertools 23

  • Amber version 26 is currently the default version on Biowulf

    Amber version 26 is built with both CPU and GPU compatibility

  • Module Name: amber/26-gpu (GPU) is built with gcc 11.3.0, openmpi 4.1.7, and CUDA 12.8

    Amber/26-gpu is compiled to run on a100, v100x, and v100 GPU types

  • Module Name: amber/26-gcc (CPU) is built with gcc 11.3.0 and openmpi 4.1.7

    Sample batch script for amber/26-gpu on 1 GPU
    
    #!/bin/bash
    
    module load amber/26-gpu
    
    export CUDA_VISIBLE_DEVICES=0
    $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPU
    
    For GPU jobs, you can submit with the following:
    sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.test  
    
    Sample MPI batch script for amber/26-gcc
    #!/bin/bash
    
    module load amber/26-gcc
    
    mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
    
    
    sbatch  --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test  #ntasks < 16
    sbatch -p multinode  --ntasks=# --ntasks-per-core=1 cpu.test  #ntasks > 16
    
    where:
    -p multinodeSubmit to the multinode partition where all nodes are Infiniband-connected
    --ntasks # the number of MPI processes you wish to run.
    --ntasks-per-core=1 ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs.
    --time=168:00:00 max walltime=168 hrs (1 week). See the section on chaining jobs below.
    --exclusive Allocate the nodes exclusively to this job (recommended for parallel jobs)

    Documentation

    Amber documentation for 2026

  • On Multiple GPUs

    Amber 26 is able to scale on multiple GPUs that support peer-to-peer communication (see the Amber GPU page for an explanation of peer-to-peer communication).

    Please keep in mind that the performance in most cases is worse on 2 (and 4) GPUs than on a single GPU. If you plan to run a job on 2 GPUs, please run benchmarks first and verify that the performance is better on 2 GPUs than on 1. (Benchmarks). Note that the batch system will set the variable $CUDA_VISIBLE_DEVICES to the allocated GPUs.

    Sample batch script on 2 GPUs:

    #!/bin/bash
    
    module load amber/26-gpu
    cd /path/to/your/dir
    export CUDA_VISIBLE_DEVICES=0,1
    mpirun -np 2 $AMBERHOME/bin/pmemd.cuda.MPI -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPU
    
    Submit with:
    sbatch --partition=gpu --gres=gpu:a100:2 --nodes=1 --cpus-per-task=32 --time=12:00:00  jobscript
    

    Sample batch script on 4 GPUs:

    #!/bin/bash
    
    module load amber/26-gpu
    cd /path/to/your/dir
    export CUDA_VISIBLE_DEVICES=0,1,2,3
    mpirun $AMBERHOME/bin/pmemd.cuda.MPI -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPU
    
    Submit with:
    sbatch --partition=gpu --gres=gpu:a100:4 --nodes=1 --cpus-per-task=64 --mem=64g  --time=12:00:00  jobscript    
    

    You can check the behaviour of your job with the 'nvidia-smi' utility. Determine the GPU node on which your job is running via jobload or sjobs. Suppose your job is on node cn0626, and is using 2 GPUs:

    biowulf% ssh cn0626 nvidia-smi
    Mon Jan 16 17:52:13 2017
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 367.48                 Driver Version: 367.48                    |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |===============================+======================+======================|
    |   0  Tesla K80           On   | 0000:83:00.0     Off |                  Off |
    | N/A   41C    P0   115W / 149W |    145MiB / 12205MiB |     75%      Default |
    +-------------------------------+----------------------+----------------------+
    |   1  Tesla K80           On   | 0000:84:00.0     Off |                  Off |
    | N/A   27C    P8    33W / 149W |      0MiB / 12205MiB |      0%      Default |
    +-------------------------------+----------------------+----------------------+
    |   2  Tesla K80           On   | 0000:8A:00.0     Off |                  Off |
    | N/A   70C    P0   128W / 149W |    145MiB / 12205MiB |     80%      Default |
    +-------------------------------+----------------------+----------------------+
    |   3  Tesla K80           On   | 0000:8B:00.0     Off |                  Off |
    | N/A   45C    P8    33W / 149W |      0MiB / 12205MiB |      0%      Default |
    +-------------------------------+----------------------+----------------------+
    
    +-----------------------------------------------------------------------------+
    | Processes:                                                       GPU Memory |
    |  GPU       PID  Type  Process name                               Usage      |
    |=============================================================================|
    |    0     51187    C   ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI    61MiB |
    |    0     51188    C   ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI    79MiB |
    |    2     51187    C   ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI    79MiB |
    |    2     51188    C   ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI    61MiB |
    +-----------------------------------------------------------------------------+
    
    The GPU numbers reported by 'nvidia-smi' may not match the GPUs you specified with the 'CUDA_VISIBLE_DEVICES' variable.

    Walltime limits and chaining jobs

    Walltime limits are set on most Biowulf partitions. Type 'batchlim' to see the current walltime limits, or see the systems status page. Note that the default walltime on the norm queue is 4 hrs, but you can extend this to 10 days. Amber jobs should be designed to run for a week or so, save a checkpoint file, and submit a new job starting from that checkpoint.

    An example batch script is below. This script runs a single simulation, saves a copy of the output files, and then resubmits a new job starting from Amber's 'restart' file.

    #!/bin/bash
    # this file is called amber.run
    
    module load  amber/16
    module list
    
    echo "Running on $SLURM_NTASKS corse"
    
    
    
    # rename the restart file to the coordinate filename
    mv restrt inpcrd
    
    #run sander
    mpirun -np $SLURM_NTASKS `which sander.MPI` -O -i mdin -c inpcrd -p prmtop -r restrt -x traj -e ene -o mdout
    
    #keep a copy of the output from this run
     mv mdout  md_$run.out
     mv traj  md_$run.trj
     mv ene  md_$run.ene
     cp restrt  md_$run.rst
    
    # if less than 10 runs have been performed, increase the run number and submit the next job
    if (( "$run" < "10" ))
       then
         run=`expr $run + 1`
         sbatch --ntasks=8 --ntasks-per-core=1 --time=168:00:00 --exclusive amber.run
    fi
    

    To submit this job, copy the original input coordinate file to 'restrt' for the first run, and then submit.

    cp inpcrd restrt               
    sbatch --ntasks=8 --ntasks--per-core=1 --time=168:00:00 --exclusive amber.run
    

    Benchmarks

    Based on the benchmarks, it is highly recomended that you run Amber on a GPU node.

    Full benchmark details

    Documentation

    Amber website