MD Workflow Generator | GROMACS, LAMMPS & PLUMED
Build a ready-to-submit SLURM script for GROMACS or LAMMPS, or compose a PLUMED plumed.dat with collective variables and metadynamics. For GROMACS, chain a full staged workflow (EM → NVT → NPT → Production) with restraint and checkpoint wiring and GPU-offload flags; for LAMMPS, pick the right accelerator package; for PLUMED, choose CVs by category and set the bias and speed options, all from source-verified keywords.
100% client-side · See method & references
Best practice: leave unset unless you need specific hardware.
Use gmx_mpi if your module provides the MPI build (common on HPC). Check with which gmx gmx_mpi after loading the module.
Toggle each stage. Each has its own .mdp and -deffnm; grompp chains automatically (each -c reads the previous stage's .gro, -t its .cpt).
Applied only when GPUs / Node > 0. Offloads the named calculation to the GPU.
Build the plumed.dat in the PLUMED tab, then reference it here. EM is never coupled.
LAMMPS is MPI-parallel (--ntasks). GPU/KOKKOS use GPUs; OPENMP is hybrid (set CPUs/Task); INTEL and OPT accelerate CPU-only runs. Accelerating is not always faster, benchmark for your system and styles.
Method parameters
PLUMED defaults to nm, kJ/mol, ps. A UNITS line is written only when you change one; then every length/energy you type (R_0, D_MAX, HEIGHT, KAPPA…) must be in the chosen units.
One MOLINFO applies to the whole file (it is written once, before the CVs). It is only needed for @-shortcuts like @phi-2 or @backbone. To pull atoms from an index file, you don't need this, add a GROUP CV and set its NDX_FILE/NDX_GROUP instead.
Written once, right after MOLINFO and before the CVs. Each non-empty line becomes ENTITY0, ENTITY1, … Not needed if your secondary-structure CVs all use TYPE=DRMSD.
Every walker must share the same WALKERS_DIR and use a different WALKERS_ID (0, 1, 2, …). In a job array set the id from ${SLURM_ARRAY_TASK_ID}. Not supported by OPES, use MPI mode there.
For COORDINATION, also enable NLIST with a tuned NL_CUTOFF/NL_STRIDE on the CV itself. See the method notes below.
All CV labels and the active bias components are printed automatically. Add any extra components here (comma- or space-separated); they append to the PRINT ARG list.
# SLURM script will appear here...
; Topology header will appear here...
How to generate a SLURM script and topology header
Set your cluster resources on the left, pick a force field, and copy the two files that appear on the right. The generator keeps the physics consistent so you do not ship a silently broken topology.
Pick an engine & resources
Choose GROMACS or LAMMPS at the top, then set nodes, GPUs, wall time and memory. GROMACS uses CPUs/task (threaded); LAMMPS uses MPI tasks/node.
Define the workflow
For GROMACS, toggle the stages you need (EM → NVT → NPT → Production), each with its own .mdp and -deffnm. The tool chains grompp → mdrun and wires restraints and checkpoints between stages.
Set the force field & GPU flags
The force field auto-sets the combination rule and 1‑4 fudge factors. Choose which calculations to offload to the GPU (-nb, -pme, -bonded, -update). Warnings flag anything inconsistent.
Copy and finish
Copy submit.sh (and, for GROMACS, the topol.top header) into your project, then complete the [ molecules ] section with your species and counts.
#!/bin/bash -e, requests memory explicitly, and writes per-job or per-array logs under logs/. These are deliberate HPC best practices, not noise, see the reasons in the next section.What the generator does, and why
Coupled force-field parameters
The combination rule and 1‑4 fudge factors are not free choices: each force field ships a specific [ defaults ] line. Selecting a force field sets both for you, and any manual override that diverges from the canonical values is flagged.
Resource-safe SLURM defaults
Explicit --mem, --time validation, #!/bin/bash -e, and log files with %x/%j/%A_%a patterns follow published cluster best-practice guides so jobs fail loudly instead of silently.
Hybrid CPU/GPU threading
OMP_NUM_THREADS is tied to SLURM_CPUS_PER_TASK, and SRUN_CPUS_PER_TASK is exported for Slurm > 22.05. gmx mdrun runs with -ntomp and -pin on for reproducible thread placement.
Everything stays local
The whole tool runs in your browser. Nothing you type is uploaded, logged, or sent anywhere, safe for unpublished systems and internal project names.
gmx grompp and check its warnings, and confirm module names, partitions and GPU flags against your own cluster's documentation.Method & references, by engine
The parameters and best practices below are grouped by tool. Switch tabs to see the details relevant to your workflow.
The parameters behind the topology header
A GROMACS [ defaults ] directive declares the non-bonded function, the combination rule, whether 1‑4 pairs are generated, and the 1‑4 scaling factors fudgeLJ and fudgeQQ. These are properties of the force field and must match it.
The [ defaults ] line has the form:
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
nbfunc selects the non-bonded form (1 = Lennard-Jones). comb-rule selects how pair parameters are combined: rule 2 is Lorentz–Berthelot (arithmetic–geometric), while rules 1 and 3 are geometric. gen-pairs = yes generates missing 1‑4 pairs from the normal LJ parameters scaled by fudgeLJ. fudgeLJ scales 1‑4 Lennard-Jones interactions (used only when gen-pairs is yes); fudgeQQ scales 1‑4 electrostatics and is always applied.
Canonical values shipped by each force field:
| Force field | comb-rule | gen-pairs | fudgeLJ | fudgeQQ |
|---|---|---|---|---|
| AMBER (e.g. 99SB-ILDN) | 2 | yes | 0.5 | 0.8333 |
| CHARMM36 / CHARMM36m | 2 | yes | 1.0 | 1.0 |
| OPLS-AA | 3 | yes | 0.5 | 0.5 |
Because grompp reads your [ defaults ] line rather than inferring it from the force field name, an inconsistent combination (for example OPLS atom types with rule 2, or AMBER scaling on a CHARMM field) is accepted silently and yields physically wrong non-bonded and 1‑4 interactions. This tool prevents that by coupling the two, and warns if you deliberately override them.
GPU offload & mdrun performance
The GPU flags follow the GROMACS developers' own performance guidance. mdrun can offload the short-range non-bonded (-nb), long-range PME (-pme), bonded (-bonded) and update/constraints (-update) work to the GPU. The tool enforces the documented rules:
- PME on GPU allows only one PME rank. When more than one rank is requested with
-pme gpu, the tool adds-npme 1automatically. -bonded gpurequires-nb gpu. Bonded offload is part of the same particle-particle workload, so the short-range non-bonded task must also be on the GPU; the tool warns if it is not.- GPU-resident mode (
-update gpu) needsconstraints = h-bonds, disables dynamic load balancing, and benefits from infrequent temperature/pressure coupling and a largernstcalcenergy(the developers suggest coupling every ≥ 50–100 steps). - Use
constraints = h-bonds, notall-bonds, with a 2 fs step: it is faster, required for GPU-resident mode, and is what most force fields were parametrised with. - 1–3 MPI ranks per GPU is generally optimal; with GPU-resident mode and direct GPU communication, 1 rank/GPU is usually best.
- After a run, check
ns/dayand the PP/PME balance at the end ofmd.logto see where time is going.
The developers' reference example for a single fast GPU with a weak CPU is gmx mdrun -ntmpi 1 -nb gpu -pme gpu -bonded gpu -update gpu, which is the configuration the toggles produce by default.
LAMMPS accelerator packages & benchmarking
LAMMPS ships five accelerator packages, each appending a suffix to any supported style. The tool emits the correct command-line switches for each:
| Package | Suffix | Hardware | Switches |
|---|---|---|---|
| GPU | gpu | NVIDIA / AMD / Intel GPUs | -sf gpu -pk gpu N |
| KOKKOS | kk | GPUs, Xeon Phi, OpenMP | -k on g N -sf kk -pk kokkos |
| INTEL | intel | Intel CPUs / Xeon Phi | -sf intel -pk intel 0 |
| OPENMP | omp | Multicore CPUs (hybrid) | -sf omp -pk omp N |
| OPT | opt | Generic CPU pair styles | -sf opt |
LAMMPS parallelises with MPI, so the SLURM request uses --ntasks (ranks), not --cpus-per-task. The OPENMP package is the exception: it is a hybrid MPI × OpenMP scheme, so it uses both, srun -n R -c T lmp -sf omp -pk omp T, where -pk omp T matches --cpus-per-task. For GPU and KOKKOS runs, the number of MPI ranks per node usually matches the number of GPUs per node.
Performance and per-section timing lines LAMMPS prints at the end of the run, and only scale up the combination that measurably helps. Not every style has an accelerated variant, check the style's doc page for the available suffixes.PLUMED collective variables & enhanced sampling
The PLUMED tab builds a plumed.dat file for PLUMED 2.9. Collective variables are grouped by category and each exposes the exact keywords from the PLUMED source, so you get correct syntax without reading the code. Add one or more CVs, give them labels, then choose a bias method.
A CV line has the form label: ACTION KEY=VALUE ..., for example phi: TORSION ATOMS=5,7,9,15. Labels become the ARG list of the bias. The generator supports standard and well-tempered metadynamics (adding BIASFACTOR and TEMP), OPES, and a harmonic RESTRAINT for umbrella windows.
Speed optimisations (from the PLUMED performance guidance):
- Store the bias on a grid (
GRID_MIN/MAX/BIN). Without it, every step re-sums all deposited hills, so a long metadynamics run slows down continuously; with a grid the cost stays flat. CALC_RCTwithRCT_USTRIDE>1computes the time-dependentc(t)reweighting factor on the fly; a larger stride reduces its overhead. It requires the bias to be on a grid.- Set
D_MAXon every distance switching function (order parameters, coordination). PLUMED then uses linked-cell neighbour search instead of scanning all pairs, the developers describe this as a "colossal speedup". The tool foldsR_0/D_0/D_MAXinto a singleSWITCH={RATIONAL ...}block for you and warns ifD_MAXis missing. - Neighbour lists or linked cells for
COORDINATION. Two-groupCOORDINATIONcan use eitherNLIST(with tunedNL_CUTOFF/NL_STRIDE) or aD_MAXcutoff, which folds into aSWITCH={RATIONAL ...}block and enables linked cells. The tool warns if neither is set, and ifNLISTis set without both parameters. WALKERS_MPIruns multiple walkers that share one bias, which fills the free-energy surface faster on an MPI build.
plumed --version and plumed manual --action=<NAME>. Grid bounds default to the CV range placeholders (e.g. -pi/pi for torsions), set them to your actual CV limits.Structure / order parameters
The Steinhardt parameters Q3, Q4 and Q6 are bond-orientational order parameters that quantify local crystalline structure, the standard way to follow nucleation, melting and phase changes. They act on a SPECIES group with a switching function (R_0, D_0), and the MEAN flag reduces the per-atom values to one scalar CV suitable for biasing. Q6 is the most widely used; Q4 helps separate cubic (FCC/BCC) environments. A per-atom COORDINATIONNUMBER (local neighbour count) is offered in the same category.
Custom CVs
The Custom category lets you write any PLUMED action line directly, the tool only prepends the label. Use it for CVs outside the catalogue, for optional keywords a preset does not expose, or to combine existing CVs with the CUSTOM/MATHEVAL function action, e.g. diff: CUSTOM ARG=d1,d2 FUNC=x-y PERIODIC=NO. Whatever you type is passed through verbatim, so it is as flexible as writing plumed.dat by hand while keeping the labelling, bias wiring and PRINT list consistent.
The SLURM side
The batch script follows widely published cluster best-practice guides.
#!/bin/bash -e, a failing command aborts the job immediately, so failures surface asFAILEDinsacctinstead of continuing with a corrupt state.- Explicit
--mem, without it, many sites apply a small default (often ~1 GB/CPU) that quietly kills MD jobs. OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK(plusSRUN_CPUS_PER_TASKfor Slurm > 22.05), prevents thread over-subscription in hybrid runs.- Only set
--cpus-per-taskfor multithreaded codes andntasks>1for MPI codes,gmx mdrunis the hybrid case handled here. - Minimal partition specification, leaving the partition unset (unless special hardware is needed) gives the scheduler more freedom and shortens queue time.
- Request only what you use, over-requesting CPUs, memory or GPUs leaves resources idle (nobody else can use them) and lengthens your own queue time. Get a job working on one GPU and confirm it is actually used before scaling up, and size memory from the job's real peak usage (e.g. the
MaxRSSfield insacct).
References & documentation
- GROMACS reference manual. Topology file formats (
[ defaults ], comb-rule, fudgeLJ/fudgeQQ). manual.gromacs.org. - GROMACS user guide. System preparation (EM → NVT → NPT staging;
-rrestraints,-tcheckpoint continuation). system preparation. - GROMACS user guide. Getting good performance from mdrun (GPU offload rules: PME = 1 rank,
-bondedneeds-nb gpu, GPU-resident constraints, ranks-per-GPU). mdrun-performance. - GROMACS force-field
forcefield.itpfiles (AMBER, CHARMM36, OPLS-AA), the shipped[ defaults ]lines used for the table above. - LAMMPS documentation. Accelerator packages (GPU, KOKKOS, INTEL, OPENMP, OPT | suffixes
gpu/kk/intel/omp/opt) and command-line options. Speed_packages, Run_options. - University of Chicago RCC and NatLab Rockies HPC. LAMMPS on SLURM (OPENMP hybrid
-sf omp -pk omp Nwithsrun -n R -c T; INTEL/OPT usage; benchmarking). RCC, NatLabRockies. - SchedMD. Slurm
sbatchdocumentation and Quick Start User Guide. slurm.schedmd.com/sbatch, quickstart. - EuroCC Spain. SLURM Best Practice Guide for HPC Users (bash
-e, memory, parallelism, job arrays). - NASA NCCS. Slurm Best Practices on Discover (minimal partition specification; time/memory/node requirements). nccs.nasa.gov.
- RIT Research Computing. Slurm Quick Start Tutorial (sbatch options,
%x/%jlog variables, memory units, requesting only what you use, verifying GPU utilisation). research-computing.git-pages.rit.edu. - PLUMED consortium. CV documentation and METAD reference (PLUMED v2.9). colvar list, METAD. CV keywords verified against the
colvarmodule source. - Tribello, G. A., Bonomi, M., Branduardi, D., Camilloni, C., & Bussi, G. (2014). PLUMED 2: New feathers for an old bird. Comp. Phys. Comm., 185(2), 604–613. See also the PLUMED performance-optimisation guidance (grid, neighbour lists,
RCT_USTRIDE). - Barducci, A., Bussi, G., & Parrinello, M. (2008). Well-tempered metadynamics. Phys. Rev. Lett., 100, 020603.
- Steinhardt, P. J., Nelson, D. R., & Ronchetti, M. (1983). Bond-orientational order in liquids and glasses. Phys. Rev. B, 28, 784. (Basis of the
Q3/Q4/Q6order parameters; see the PLUMEDQ6action docs.) - Abraham, M. J., et al. (2015). GROMACS: High performance molecular simulations. SoftwareX, 1–2, 19–25.
Frequently asked questions
Why did the tool add -npme 1 or warn about my GPU flags?
-npme 1 is added when you request -pme gpu with more than one rank. -bonded gpu requires -nb gpu because bonded offload is part of the same particle-particle workload. And -update gpu (GPU-resident mode) needs constraints = h-bonds and turns off dynamic load balancing.How are the GROMACS stages chained together?
grompp reads the previous stage's .gro via -c, and its checkpoint via -t for continuation (NVT → NPT → Production). When a stage has position restraints, -r is added pointing at the same coordinate file. Restraints are released automatically for Production.Why does LAMMPS use tasks instead of CPUs per task?
--ntasks (MPI ranks), whereas GROMACS mdrun is threaded and uses --cpus-per-task. The one exception is the LAMMPS OPENMP package, a hybrid MPI × OpenMP scheme that uses both, the tool then sets -pk omp N to match CPUs/Task. For GPU or KOKKOS runs, MPI ranks per node usually matches GPUs per node.Which LAMMPS accelerator should I pick?
Performance and timing breakdown LAMMPS prints at the end, and scale up only what measurably helps.How does the PLUMED builder help me?
NOPBC or COMPONENTS, so you get correct plumed.dat syntax without reading the code. You add CVs, label them, pick a bias method (standard/well-tempered MetaD, OPES, or a restraint), and toggle speed options. The output targets PLUMED 2.9.What is the difference between standard and well-tempered metadynamics here?
BIASFACTOR (and TEMP), so the bias converges more smoothly. The builder adds those two keywords when you select the well-tempered variant, and OPES is offered as a modern alternative.Why does the PLUMED tab warn about grids and CALC_RCT?
CALC_RCT (on-the-fly c(t) reweighting) only works when the bias is on a grid, so the tool warns if you enable reweighting without it.Why does choosing a force field change the combination rule and fudge factors?
[ defaults ] line: AMBER uses rule 2 with 0.5/0.8333, CHARMM36 uses rule 2 with 1.0/1.0, and OPLS-AA uses rule 3 with 0.5/0.5. Mixing them produces a silently wrong topology.What exactly are fudgeLJ and fudgeQQ?
fudgeLJ scales the 1‑4 Lennard-Jones term and is applied only when gen-pairs is yes; fudgeQQ scales the 1‑4 electrostatics and is always applied.Can I override the auto-set parameters?
Why did the script add things I did not ask for (bash -e, memory, log files)?
#!/bin/bash -e makes the job stop and report FAILED on the first error; explicit --mem stops a small site default from killing the job; and --output/--error capture logs per job or per array task under logs/.Is this a validated production input?
gmx grompp and read its warnings, and check module names, partitions, GPU flags and account settings against your own cluster's documentation.Is my data uploaded anywhere?
The generator runs entirely in your browser, no data leaves your device.