Generate Gromacs Input Files

input.py is a convenience script that will generate a GROMACS topology, given an initial configuration, as well as .mdp files. Always check that the files are accurate before using them.

input.py calls the classes defined on the following pages:

Command Line Functionality

To use the script, run it from the command line with the following usage.

usage: input.py [-h] [-T TITLE] [-b BUILD_MON] [-s EM_STEPS] [-e ENSEMBLE]
                [-d DT] [-l LENGTH] [-f FRAMES] [-p PCOUPLTYPE]
                [--restraints RESTRAINTS [RESTRAINTS ...]] [-x] [-c COORD]
                [-S] [--temp TEMP] [--mdp] [--barostat BAROSTAT] [--nogenvel]
                [--bcc] [--solvent SOLVENT] [--tau_t TAU_T] [--tau_p TAU_P]
                [-nx NSTXOUT] [-nv NSTVOUT] [-nf NSTFOUT] [-ne NSTENERGY]

Named Arguments

-T, --title

Simulation Title

Default: “Generic Molecular Dynamics Simulation”

-b, --build_mon
 

Monomer structure used for build

Default: “NAcarb11V”

-s, --em_steps

Steps to take during energy minimization

Default: -1

-e, --ensemble

Thermodynamic ensemble to put system in

Default: “npt”

-d, --dt

time step (ps)

Default: 0.002

-l, --length

simulation length (ps)

Default: 1000

-f, --frames

number of frames

Default: 500

-p, --pcoupltype
 

Pressure Couple Type

Default: “semiisotropic”

--restraints Specify residue for which restraints are specified
-x, --xlink

Turn this to “on” if the the system is crosslinked

Default: False

-c, --coord

coordinate file of system to be simulated

Default: “initial.gro”

-S, --solvate

Specify this if the system has water so an extra line can be added to the topology

Default: False

--temp

Specify temperature at which to run simulation

Default: 300

--mdp

Only the .mdp will be written if this option is specified

Default: False

--barostat

pressure coupling scheme to use

Default: “berendsen”

--nogenvel

Do not generate velocities

Default: True

--bcc

Generate input files using bicontinuous cubic files

Default: False

--solvent

Name of solvent

Default: “water”

--tau_t

Temperature coupling time constant

Default: 0.1

--tau_p

Pressure coupling time constant

Default: 20

-nx, --nstxout Frequency to output coordinates to trajectory file
-nv, --nstvout Frequency to output velocities to trajectory file
-nf, --nstfout Frequency to output forces to trajectory file
-ne, --nstenergy
 Frequency to output energy to energy file