Submitting GROMACS Jobs

Submitting GROMACS Jobs

Prerequisites


Ideally you should be able to run your model locally before submitting to GridMarkets. GridMarkets will run your compute-intensive model on our powerful servers, releasing your local machine for further modelling.
Please ensure you have installed Envoy and logged-in before submitting.

Preparing Your Files

Assemble all your inputs into a directory and create a text file in that directory with the command needed for the job.  The contents of this "job file" should be the specific GROMACS command to run with its relevant parameters - e.g.
mdrun -s input
Where:
  1. mdrun is the specific subroutine to run
  2. input is the name of the input file to be simulated
On submission the GridMarkets system will run
/usr/local/gromacs/bin/gmx mdrun -s input
Note that gmx is automatically included.  Therefore please do NOT include any switches or redirects in the job file else your submission may fail and/or you may not be able to monitor its progress.  If you have any special requirements then please contact us at pharma@gridmarkets.com

Running Chained Sequential Jobs

If you want to run multiple calculations sequentially, for example to generate a topology file to run with mdrun, you simply specify each job to be run on a separate line of the job file - e.g.

grompp -f rnase_cubic_pme.mdp -c rnase_cubic_pme.pdb -p rnase_cubic_pme.top -o rnase_cubic_pme.tpr
mdrun -s rnase_cubic_pme.tpr

Submitting with the Submission GUI

Download the GridMarkets Submission GUI for your OS. Once installed and running:
  1. Select "GROMACS" from the Application dropdown
  2. "2023" from the Version dropdown as that is currently the only supported
  3. Select the job file using the BROWSE button
  4. Provide a "Project Name" under which the files will be uploaded to
Note that if you make a new submission with the same Project Name then the files will be overwritten, as will any results when the job runs.  However, this can be useful if you just need to make modifications to some of the input files as only files that have changed will be uploaded, thus saving you time.

You can change the Submission Name from the default of the job file name to better track your jobs.  You may also optionally request to auto-download all resulting files.  Finally, select the following from the drop-downs:
  1. Machine Type = please see our website for the current options, their specifications and pricing
  2. Job Budget & Action (optional) = a credit limit for each job - if any job consumes the specified number of credits then you can elect to:
    1. Alert = receive an email;
    2. Terminate = immediately kill the job, but you will not receive any resulting files, so please contact pharma@gridmarkets.com if you wish them to be returned;
    3. Suspend = allow the job to complete, but do not run any subsequent jobs in the sequence.

Click SUBMIT to have Envoy submit the job to GridMarkets servers.

Submitting with the CLI

The precompiled Envoy CLI binary can be downloaded and extracted for Windows, Linux or Mac and placed in your preferred location. The binary can be added to your Linux or Mac PATH by running:

export PATH=$PATH:/path/to/binary
Since GROMACS only uses one GPU device per machine and doesn't benefit from running on multiple machines in parallel, the command line to submit would be:
gridmarkets-cli submit --job-file path/to/files_for_submission/job_file --project-name my-project-name --submission-name my-submission-name
--product gromacs --product-version 2023 --machine-type pharma-low --machines 1 --credits-budget 0 --upload-all-files --confirm
Where:
  1. path/to/files_for_submission/job_file = the full path to the job file you created above.  All the files and sub-directories in that directory will be uploaded when submitting the job with --upload-all-files, else only the job file will be uploaded.
  2. my-project-name = the name of the project that all the files will be under.  Note that you can make new submissions under the same project name if you want to reuse any files without having to re-upload them, but they will overwrite any files that have already been uploaded so do not do this if you are currently running a job using that project's files.  You can also just submit under a new project name.
  3. my-submission-name = a user-friendly name for this submission so you can easily identify it in Envoy, or accept the job file name as the default 
Note that we are assuming version 2023 (--product-version 2023), but you can skip this option to be presented in the next step with the available options to run.  You will then be prompted by the CLI for:
  1. The type of machine you'd like to use - please see the pricing page for more information on the options, but for now we're only supporting machine_type pharma-high
  2. An optional Job Budget & Action = a credit limit for each job (or set --credits-budget to zero to skip) - if any job consumes the specified number of credits then you can elect to:
    1. Alert = receive an email;
    2. Terminate = immediately kill the job, but you will not receive any resulting files, so please contact pharma@gridmarkets.com if you wish them to be returned;
    3. Suspend = allow the job to complete, but do not run any subsequent jobs in the sequence.
  3. Confirmation that you wish to submit, so that can you cancel by hitting "n" if needed, or ENTER or "y" to submit
The CLI will then instruct Envoy to upload all the files in the directory and submit the job to the GridMarkets system.

Monitoring & Controlling Your Job

Please see the Envoy video on how to track your job's progress, stopping & restarting, viewing logs, etc.

Getting Your Results

Any generated files will automatically be downloaded by Envoy to the same directory as the inputs, but this will only be on the machine it was submitted from.  You can always go to the "Files" section of the project in Envoy to manually download any files.

Walkthrough Example

In this section we will walk you through a practical example where we run the GROMACS

DHFR 4fs NVE benchmark from the Amber 22 Benchmark Suite.  Specifically, we will be running the ~23K atom Dihydrofolate Reductase Enzyme simulation in explicit water:


DHFR NPT HMR 4fs = 23,558 atoms
This is a more realistic version of the JAC (DHFR) benchmark
run with what would be typical NPT production parameters. It uses shake with hydrogen mass repartitioning and a 4fs timestep. It has a 8 angstrom cutoff, runs in the NPT ensemble and writes to the output and trajectory file every 2500 steps (10ps). Additionally it writes to the restart file every 50000 steps. NSTLIM is set to 100,000 by default but should be increased for larger processor count runs. For performance reasons it is set to produce NETCDF binary trajectory files.
integrator              = md
nsteps                   = 10000
nstlist                    = 10
nstfout                  = 0
nstxout                 = 0
nstvout                 = 0
nstxtcout              = 0
nstcalcenergy       = 100
nstlog                    = 0
dt                           = 0.002
constraints           = all-bonds
nstenergy             = 500
ns_type                 = grid
coulombtype        = PME
rlist                        = 0.9
rvdw                      = 0.9
rcoulomb              = 0.9
tcoupl                   = v-rescale
tc_grps                 = system
tau_t                     = 0.1
ref_t                      = 300
fourier_spacing    = 0.1125
cutoff-scheme     = verlet



The required input files are as follows:
    rnase_cubic_pme.mdp 
    rnase_cubic_pme.tpr  
    rnase_cubic_pme.gro 
    rnase_cubic_pme.top 

In order to run this in GridMarkets we first create a folder in which we place our input files referenced in the table above.  We also need to create the GridMarkets job file which is a text file that contains the executable(s) to run and the command line options:
grompp -f rnase_cubic_pme.mdp -c rnase_cubic_pme.gro -p rnase_cubic_pme.top -o rnase_cubic_pme.tpr
mdrun -s rnase_cubic_pme.tpr
Next, we start up both Envoy and the Submission GUI and submit our job file:

Once the files have been uploaded, we can see the status of the example submission running in Envoy:
Example GROMACS job - running
We can see the simulation has finished in less than 20 minutes and only required 0.03 credits.
Example GROMACS job - completed

Once the job has completed, the results can be downloaded manually, or the Auto-download results checkbox can be used during submission for automatic retrieval.
Resulting files after successful job completion
















    • Related Articles

    • Submitting NAMD Jobs

      Prerequisites Ideally you should be able to run your model locally before submitting to GridMarkets. GridMarkets will run your compute-intensive model on our powerful servers, releasing your local machine for further modelling. Before submitting a ...
    • Submitting Amber Jobs

      Prerequisites Ideally you should be able to run your model locally before submitting to GridMarkets. GridMarkets will run your compute-intensive model on our powerful servers, releasing your local machine for further modelling. All users must obtain ...
    • Running multiple jobs simultaneously

      You can run any number of jobs on any number of machines simultaneously up to the number of machines available for your Service Level. GridMarkets dynamically scales to increase the overall number of machines available if you change your service ...
    • Restarting stopped or suspended jobs

      When you run out of credits, your jobs will either be stopped or suspended if they are parallel jobs (i.e. parts that are running will be allowed to complete, but non-started ones will not run), but your files will remain.  You can top up your ...
    • Use your application for other work after submission

      Once you have submitted your project to Envoy you can return to using your application as it will transfer all files and submit your job in the background.  Once you see the submission in Envoy you can even turn off your machine.  Envoy will ...