lancium_lci

Running Amber 18 on Lancium Compute

This document will guide you through running an Amber job on Lancium Compute. We will provide an image for you to use and sample data files to get you running right away.

In order to run on Lancium Compute, we require that you run inside a Singularity container. We have provided one (Amber 18, CUDA 9.2) but you are welcome to make your own to best suit your jobs, if required. To do that, please see Sylab’s Singularity documentation.

Additionally, be sure you have the following dependencies installed and configured. If you do not or you have any other questions regarding the GCLI not covered in this tutorial, please see the GCLI documentation.

Table of Contents

Installation

Download the GCLI installer. This script grabs and installs the latest version of the GCLI and the dependencies for you so you can go straight to the demo.

After the download completes, run:

bash gcli_express_installer.sh

This script will install the Lancium GCLI front end and Genesis II back end using all default configurations. If you want to step through the GCLI and Genesis II more methodically, please see the following section on the GCLI dependencies.

Note: After running the GCLI installer, you still must create a Lancium account on the Lancium portal.

Dependencies

You can verify that you have the correct version of everything installed by running:

$ grid version
Genesis II version 2.7.648 Build 9922

$ gcli version
GCLI Version: 2.0

You must also be authenticated with the GCLI:

$ gcli authenticate <LANCIUM USERNAME> <LANCIUM PASSWORD>
Exit Code: 0

The username and password are the same login credentials you created for the Lancium portal.

To verify you have authenticated, run:

$ gcli whoami
Client Tool Identity:
    (CONNECTION) "Client Cert BEBAF892-0139-4889-777B-09C1819DF2BF"

Additional Credentials:
    (USER) "<LANCIUM_USERNAME>" -> (CONNECTION) "Client Cert BEBAF892-0139-4889-777B-09C1819DF2BF"
    (GROUP) "Lancium-users" -> (CONNECTION) "Client Cert BEBAF892-0139-4889-777B-09C1819DF2BF"

If you do not see the Lancium-users entry, you will be unable to submit jobs.

Image Details

The image contains a single environment variable related to Amber, $AMBERHOME, which points to the top-level Amber directory, /opt/amber.

For example, if you want to call pmemd.cuda, you would want to include the following in a script you execute inside the container:

$AMBERHOME/bin/pmemd.cuda

The full list of included Amber binaries is as follows:

$ ls $AMBERHOME/bin
AddToBox	    atomtype		  lmanal		 nef_to_RST	      resp
CartHess2FC.py	    bondtype		  makeANG_RST		 new2oldparm	      respgen
ChBox		    car_to_files.py	  makeCHIR_RST		 new_crd_to_dyn       rism1d
CheckMD		    ceinutil.py		  makeDIST_RST		 new_to_old_crd       rism3d.orave
FEW.pl		    cestats		  make_crd_hg		 nf-config	      rism3d.snglpnt
IPMach.py	    charmmlipid2amber.py  mdgx			 nfe-umbrella-slice   rism3d.thermo
MCPB.py		    cpeinutil.py	  mdnab			 nmode		      sander
MMPBSA.py	    cphstats		  mdout2pymbar.pl	 packmol	      sander.LES
OptC4.py	    cpinutil.py		  mdout_analyzer.py	 packmol-memgen       saxs_md
PdbSearcher.py	    cpptraj		  memembed		 paramfit	      saxs_rism
ProScrs.py	    cpptraj.cuda	  metatwist		 parmchk2	      senergy
PropPDB		    dacdif		  minab			 parmed		      sgldinfo.sh
UnitCell	    elsize		  mm_pbsa.pl		 pbsa		      sgldwt.sh
addles		    espgen		  mm_pbsa_nabnmode	 pbsa.cuda	      softcore_setup.py
am1bcc		    espgen.py		  mm_pbsa_statistics.pl  pdb4amber	      sqm
amb2chm_par.py	    fantasian		  mmpbsa_py_energy	 pmemd		      sviol
amb2chm_psf_crd.py  ffgbsa		  mmpbsa_py_nabnmode	 pmemd.cuda	      sviol2
amber.conda	    fftw-wisdom		  mol2rtf.py		 pmemd.cuda_DPFP      teLeap
amber.ipython	    fftw-wisdom-to-conf   molsurf		 pmemd.cuda_SPFP      tinker_to_amber
amber.jupyter	    finddgref.py	  nab			 prepgen	      tleap
amber.pip	    fitpkaeo.py		  nab2c			 process_mdout.perl   to_be_dispatched
amber.python	    fix_new_inpcrd_vel	  nc-config		 process_minout.perl  ucpp
ambmask		    fixremdcouts.py	  nccopy		 pymdpbsa	      volslice
ambpdb		    gbnsr6		  ncdump		 pytleap	      xaLeap
ante-MMPBSA.py	    genremdinputs.py	  ncgen			 reduce		      xleap
antechamber	    hcp_getpdb		  ncgen3		 residuegen	      xparmed

Running Your Amber Job

To run an Amber job, your command line string could look something like this:

gcli startContainers Lancium/L_amber18-cuda9.2.simg MyAmberJob 1 \
	"/opt/amber/bin/pmemd.cuda --help" \
	-o ./MyAmber.out stdout.txt \
	--gpu k80 --gpuCount 1

The following is an overview of what each parameter does:

  1. “Lancium/L_amber18-cuda9.2.simg” is indicating the image your job will be running inside. In this example, we’re using a Lancium image, so we prepend “Lancium/” to the name. This is a required parameter.
  2. “MyAmberJob” is indicating the name of your job. This is how you can reference your job when using the vmStatus command. This is a required parameter.
  3. “1” is indicating how many instances of your job you want to run. This is a required parameter.
  4. “/opt/amber/bin/pmemda.cuda < … >” is indicating what command you will be running inside the container. This is a required parameter.
  5. “-o ./MyAmber.out stdout.txt” is indicating that you want to stageout stdout.txt (standard output will always be called stdout.txt) to a file called MyAmber.out upon job completion. This is an optional parameters but enables you to get your output back, so we’ve included it.
  6. ”–gpu k80 –gpuCount 1” is indicating that you want a single Nvidia K80 card avaiable to you inside your container. These are optional parameters, but useful for running Amber so we’ve included them.

Running Your Amber Job inside a Script

For more complex jobs, we recommend packaging what you want to run in a script. Your script could look like the following:

#!/bin/bash

# File: run.sh

date
nvidia-smi
$AMBERHOME/bin/pmemd.cuda  --help

And to run it, your GCLI call could look similar to the following:

gcli startContainers Lancium/L_amber18-cuda9.2.simg MyAmberJob 1 \
	"/bin/bash run.sh" \
	-i run.sh run.sh \
	-o ./MyAmber.out stdout.txt \
	--gpu k80 --gpuCount 1 

Note, we’ve included an additional flag, -i, to upload the run.sh script into our job working directory.

The following section is a demonstration of a comprehensive Amber job with the GCLI, building on the example shown above.

Demonstration

You can find the demo files here.

Demo: Setup

Unzip the downloaded file and navigate to the amber_demo directory. It is from amber_demo where we will running the demo.

Demo: Submitting

./run.sh sequence1/

Example output:

{
    "ambertest": {
        "ticket": "D6080B2D-7BEA-0B1F-B679-05452A603E8A"
    }
}

If there are no faults and you are given a ticket, that means your job has been successfully submitted to our queue. Your job will begin running when a slot opens in the queue.

Demo: Job Status

While your job is running, you can check the status of your Amber job by running:

gcli vmStatus ambertest

Example output:

 {
    "ambertest": {
        "ticket": "D6080B2D-7BEA-0B1F-B679-05452A603E8A",
        "time": "12:34 EDT 15 Jun 2020",
        "tries": "0",
        "state": "Running",
        "ipaddr": "None, IPs only assigned for VM jobs"
    }
}

Demo: Completing

Note: A job will not complete if it is still running or staging out data. If you attempt to do so, you will receive this error:

$ gcli complete D6080B2D-7BEA-0B1F-B679-05452A603E8A
FAULT: D6080B2D-7BEA-0B1F-B679-05452A603E8A is still running.
Exit Code: -1

gcli vmStatus will tell you if your job is running or has been terminated.

{
    "ambertest": {
        "ticket": "D6080B2D-7BEA-0B1F-B679-05452A603E8A",
        "time": "12:34 EDT 15 Jun 2020",
        "tries": "1",
        "state": "Terminated", <---- "Terminated" indicates your data is ready to be staged out
        "ipaddr": "None"
    }
}

After you see your job has terminated, you can complete your job with the same ticket that was given to you at submission.

gcli complete D6080B2D-7BEA-0B1F-B679-05452A603E8A

Expected output:

Copied output file/directory: mdout.1 to location: /home/user/amber_test/sequence1/OUT/mdout.1.
Copied output file/directory: rst.1 to location: /home/user/amber_test/sequence1/RST/rst.1.
Copied output file/directory: traj.1 to location: /home/user/amber_test/sequence1/TRAJ/traj.1.
Copied output file/directory: mdinfo to location: /home/user/amber_test/sequence1/mdinfo.
Copied output file/directory: stdout.txt to location: /home/user/amber_test/sequence1/out.
Copied output file/directory: stderr.txt to location: /home/user/amber_test/sequence1/err.
Exit Code: 0

Note: Because mdinfo, out, and err will attempt to overwrite themselves with subsequent runs, you will need to delete mdinfo, out, and err before staging out new versions of those files. The bug preventing file overwriting has been fixed in version 2.7.648 of the GenesisII client.