Topics Map > Services > Research Computing and Support > CCAST

Running Gromacs on CCAST Clusters

Detailing the basic usage of the GROMACS package software on CCAST

    Introduction

    This document describes basic usage of GROMACS on CCAST clusters. Far more information about GROMACS is available in the GROMACS manual, which is available online and is maintained by the GROMACS developers.

    GROMACS is a free and open-source high-performance molecular dynamics package, mainly designed for simulations of proteins, lipids, and nucleic acids, but it is also used in simulation of drug design and polymers. On CCAST, GROMACS can be run on Thunder Prime using both CPU and/or GPU via the gromacs/2023.2-cuda module.

    The main executable for GROMACS is gmx. The gmx command can be used to run a variety of different tasks, including energy minimization, molecular dynamics, and analysis of output.

    Running an Example Job

    Example GROMACS job scripts are available in /mmfs1/projects/ccastest/examples/GROMACS_example/. The example script that uses GPU acceleration is job_gpu.pbs while the CPU-only script is job_cpu.pbs. Both jobs take the input.tpr file as input, which specifies a steepest descent energy minimization of the lysozyme protein in water (taken from a much more detailed GROMACS Tutorial by Justin A. Lemkul, PhD). The provided GROMACS example PBS scripts can be copied to your scratch directory and modified to suit your own needs.

    Reading the Input File

    Copy the GROMACS_example directory to your scratch directory.

    $ cp -r /mmfs1/projects/ccastest/examples/GROMACS_example $SCRATCH/
    $ cd $SCRATCH/GROMACS_example

    You can view the contents of the input.tpr file, use the gmx dump command as follows:

    $ gmx dump -s input.tpr | less

    Submitting mdrun Jobs

    To run the job, use the qsub command as follows:

    $ qsub job_cpu.pbs

    The same job can also be run on the GPU-accelerated nodes by using the job_gpu.pbs script instead.

    $ qsub job_gpu.pbs

    The job will take a few moments to run.

    Working with GROMACS output files

    Once it is complete, you can view the output files. The gmx energy command can be used to read the ener.edr file created.

    $ gmx energy -f ener.edr -o potential.xvg 

    Opened ./ener.edr as single precision energy file

    Select the terms you want from the following list by
    selecting either (part of) the name or the number or a combination.
    End your selection with an empty line or a zero.
    -------------------------------------------------------------------
    1 Bond        2 Angle        3 Proper-Dih. 4 Ryckaert-Bell.
    5 LJ-14        6 Coulomb-14  7 LJ-(SR)     8 Coulomb-(SR)
    9 Coul.-recip. 10 Potential   11 Pressure    12 Vir-XX
    13 Vir-XY      14 Vir-XZ     15 Vir-YX     16 Vir-YY
    17 Vir-YZ      18 Vir-ZX     19 Vir-ZY     20 Vir-ZZ
    21 Pres-XX      22 Pres-XY     23 Pres-XZ    24 Pres-YX
    25 Pres-YY     26 Pres-YZ     27 Pres-ZX   28 Pres-ZY
    29 Pres-ZZ     30 #Surf*SurfTen 31 T-rest
    > 10 0

    Here, we select Potential, which is term 10. The output is written to potential.xvg, which contains tabular data of the potential energy over the minimization.

    Visualizations of the output can be produced on CCAST using the GUI software VMD which is available on CCAST by logging into the OnDemand system through a web browser.



    KeywordsGROMACS, molecular dynamics, simulation, tutorial, how to, chemistry   Doc ID130426
    OwnerStephen S.GroupNDSU IT Knowledge Base
    Created2023-08-17 15:28:41Updated2024-06-05 13:19:49
    SitesNDSU IT Knowledge Base
    Feedback  0   1