Minimization in vacuum without PBC

GROMACS version: 2020
GROMACS modification: No

I am a newbie with Gromacs and following an example script found in this tutorial I fail to reproduce the minimization step in vacuum without PBC. The failure coming from the fact that the script is deprecated when used with gromacs 2020. Here is the contents of the script:

;
; File ‘mdout.mdp’ was generated
; By user: alex (22065)
; On host: md02
; At date: Thu Mar 23 09:13:15 2017

;
; Created by:
; :-) GROMACS - gmx grompp, 2016.1 (-:
;
; Executable: /usr/local/gromacs-2016.1/bin/gmx
; Data prefix: /usr/local/gromacs-2016.1
; Working dir: /coarse/alex/TUTORIALS/pepmd-v5/md-tutorial
; Command line:
; gmx grompp -p protein.top -c protein.gro -f minim.mdp -o protein-EM-vacuum.tpr

; VARIOUS PREPROCESSING OPTIONS
; Preprocessor information: use cpp syntax.
; e.g.: -I/home/joe/doe -I/home/mary/roe
include =
; e.g.: -DPOSRES -DFLEXIBLE (note these variable names are case sensitive)
define = -DFLEXIBLE

; RUN CONTROL PARAMETERS
integrator = steep
; Start time and timestep in ps
tinit = 0
dt = 0.001
nsteps = 500
; For exact run continuation or redoing part of a run
init-step = 0
; Part index is updated automatically on checkpointing (keeps files separate)
simulation-part = 1
; mode for center of mass motion removal
comm-mode = Linear
; number of steps for center of mass motion removal
nstcomm = 100
; group(s) for center of mass motion removal
comm-grps =

; LANGEVIN DYNAMICS OPTIONS
; Friction coefficient (amu/ps) and random seed
bd-fric = 0
ld-seed = -1

; ENERGY MINIMIZATION OPTIONS
; Force tolerance and initial step-size
emtol = 1.0
emstep = 0.01
; Max number of iterations in relax-shells
niter = 20
; Step size (ps^2) for minimization of flexible constraints
fcstep = 0
; Frequency of steepest descents steps when doing CG
nstcgsteep = 1000
nbfgscorr = 10

; TEST PARTICLE INSERTION OPTIONS
rtpi = 0.05

; OUTPUT CONTROL OPTIONS
; Output frequency for coords (x), velocities (v) and forces (f)
nstxout = 0
nstvout = 0
nstfout = 0
; Output frequency for energies to log file and energy file
nstlog = 1000
nstcalcenergy = 100
nstenergy = 1
; Output frequency and precision for .xtc file
nstxout-compressed = 0
compressed-x-precision = 1000
; This selects the subset of atoms for the compressed
; trajectory file. You can select multiple groups. By
; default, all atoms will be written.
compressed-x-grps =
; Selection of energy groups
energygrps = System

; NEIGHBORSEARCHING PARAMETERS
; cut-off scheme (Verlet: particle based cut-offs, group: using charge groups)
cutoff-scheme = Group
; nblist update frequency
nstlist = 10
; ns algorithm (simple or grid)
ns_type = simple
; Periodic boundary conditions: xyz, no, xy
pbc = no
periodic-molecules = no
; Allowed energy error due to the Verlet buffer in kJ/mol/ps per atom,
; a value of -1 means: use rlist
verlet-buffer-tolerance = 0.005
; nblist cut-off
rlist = 1
; long-range cut-off for switched potentials

; OPTIONS FOR ELECTROSTATICS AND VDW
; Method for doing electrostatics
coulombtype = cut-off
coulomb-modifier = Potential-shift-Verlet
rcoulomb-switch = 0
rcoulomb = 1.0
; Relative dielectric constant for the medium and the reaction field
epsilon-r = 1
epsilon-rf = 0
; Method for doing Van der Waals
vdw-type = Cut-off
vdw-modifier = Potential-shift-Verlet
; cut-off lengths
rvdw-switch = 0
rvdw = 1.0
; Apply long range dispersion corrections for Energy and Pressure
DispCorr = No
; Extension of the potential lookup tables beyond the cut-off
table-extension = 1
; Separate tables between energy group pairs
energygrp-table =
; Spacing for the PME/PPPM FFT grid
fourierspacing = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used
fourier-nx = 0
fourier-ny = 0
fourier-nz = 0
; EWALD/PME/PPPM parameters
pme-order = 4
ewald-rtol = 1e-05
ewald-rtol-lj = 0.001
lj-pme-comb-rule = Geometric
ewald-geometry = 3d
epsilon-surface = 0

; IMPLICIT SOLVENT ALGORITHM
implicit-solvent = No

; GENERALIZED BORN ELECTROSTATICS
; Algorithm for calculating Born radii
gb-algorithm = Still
; Frequency of calculating the Born radii inside rlist
nstgbradii = 1
; Cutoff for Born radii calculation; the contribution from atoms
; between rlist and rgbradii is updated every nstlist steps
rgbradii = 1
; Dielectric coefficient of the implicit solvent
gb-epsilon-solvent = 80
; Salt concentration in M for Generalized Born models
gb-saltconc = 0
; Scaling factors used in the OBC GB model. Default values are OBC(II)
gb-obc-alpha = 1
gb-obc-beta = 0.8
gb-obc-gamma = 4.85
gb-dielectric-offset = 0.009
sa-algorithm = Ace-approximation
; Surface tension (kJ/mol/nm^2) for the SA (nonpolar surface) part of GBSA
; The value -1 will set default value for Still/HCT/OBC GB-models.
sa-surface-tension = -1

; OPTIONS FOR WEAK COUPLING ALGORITHMS
; Temperature coupling
tcoupl = No
nsttcouple = -1
nh-chain-length = 10
print-nose-hoover-chain-variables = no
; Groups to couple separately
tc-grps =
; Time constant (ps) and reference temperature (K)
tau-t =
ref-t =
; pressure coupling
pcoupl = No
pcoupltype = Isotropic
nstpcouple = -1
; Time constant (ps), compressibility (1/bar) and reference P (bar)
tau-p = 1
compressibility =
ref-p =
; Scaling of reference coordinates, No, All or COM
refcoord-scaling = No

; OPTIONS FOR QMMM calculations
QMMM = no
; Groups treated Quantum Mechanically
QMMM-grps =
; QM method
QMmethod =
; QMMM scheme
QMMMscheme = normal
; QM basisset
QMbasis =
; QM charge
QMcharge =
; QM multiplicity
QMmult =
; Surface Hopping
SH =
; CAS space options
CASorbitals =
CASelectrons =
SAon =
SAoff =
SAsteps =
; Scale factor for MM charges
MMChargeScaleFactor = 1
; Optimization of QM subsystem
bOPT =
bTS =

; SIMULATED ANNEALING
; Type of annealing for each temperature group (no/single/periodic)
annealing =
; Number of time points to use for specifying annealing in each group
annealing-npoints =
; List of times at the annealing points for each group
annealing-time =
; Temp. at each annealing point, for each group.
annealing-temp =

; GENERATE VELOCITIES FOR STARTUP RUN
gen-vel = no
gen-temp = 300
gen-seed = -1

; OPTIONS FOR BONDS
constraints = none
; Type of constraint algorithm
constraint-algorithm = Lincs
; Do not constrain the start configuration
continuation = no
; Use successive overrelaxation to reduce the number of shake iterations
Shake-SOR = no
; Relative tolerance of shake
shake-tol = 0.0001
; Highest order in the expansion of the constraint coupling matrix
lincs-order = 4
; Number of iterations in the final step of LINCS. 1 is fine for
; normal simulations, but use 2 to conserve energy in NVE runs.
; For energy minimization with constraints it should be 4 to 8.
lincs-iter = 1
; Lincs will write a warning to the stderr if in one step a bond
; rotates over more degrees than
lincs-warnangle = 30
; Convert harmonic bonds to morse potentials
morse = no

; ENERGY GROUP EXCLUSIONS
; Pairs of energy groups for which all non-bonded interactions are excluded
energygrp-excl =

; WALLS
; Number of walls, type, atom types, densities and box-z scale factor for Ewald
nwall = 0
wall-type = 9-3
wall-r-linpot = -1
wall-atomtype =
wall-density =
wall-ewald-zfac = 3

; COM PULLING
pull = no

; ENFORCED ROTATION
; Enforced rotation: No or Yes
rotation = no

; Group to display and/or manipulate in interactive MD session
IMD-group =

; NMR refinement stuff
; Distance restraints type: No, Simple or Ensemble
disre = No
; Force weighting of pairs in one distance restraint: Conservative or Equal
disre-weighting = Conservative
; Use sqrt of the time averaged times the instantaneous violation
disre-mixed = no
disre-fc = 1000
disre-tau = 0
; Output frequency for pair distances to energy file
nstdisreout = 100
; Orientation restraints: No or Yes
orire = no
; Orientation restraints force constant and tau for time averaging
orire-fc = 0
orire-tau = 0
orire-fitgrp =
; Output frequency for trace(SD) and S to energy file
nstorireout = 100

; Free energy variables
free-energy = no
couple-moltype =
couple-lambda0 = vdw-q
couple-lambda1 = vdw-q
couple-intramol = no
init-lambda = -1
init-lambda-state = -1
delta-lambda = 0
nstdhdl = 50
fep-lambdas =
mass-lambdas =
coul-lambdas =
vdw-lambdas =
bonded-lambdas =
restraint-lambdas =
temperature-lambdas =
calc-lambda-neighbors = 1
init-lambda-weights =
dhdl-print-energy = no
sc-alpha = 0
sc-power = 1
sc-r-power = 6
sc-sigma = 0.3
sc-coul = no
separate-dhdl-file = yes
dhdl-derivatives = yes
dh_hist_size = 0
dh_hist_spacing = 0.1

; Non-equilibrium MD stuff
acc-grps =
accelerate =
freezegrps =
freezedim =
cos-acceleration = 0
deform =

; simulated tempering variables
simulated-tempering = no
simulated-tempering-scaling = geometric
sim-temp-low = 300
sim-temp-high = 300

; Electric fields
; Format is number of terms (int) and for all terms an amplitude (real)
; and a phase angle (real)
E-x =
; Time dependent (pulsed) electric field. Format is omega, time for pulse
; peak, and sigma (width) for pulse. Sigma = 0 removes pulse, leaving
; the field to be a cosine function.
E-xt =
E-y =
E-yt =
E-z =
E-zt =

; Ion/water position swapping for computational electrophysiology setups
; Swap positions along direction: no, X, Y, Z
swapcoords = no
adress = no

; User defined thingies
user1-grps =
user2-grps =
userint1 = 0
userint2 = 0
userint3 = 0
userint4 = 0
userreal1 = 0
userreal2 = 0
userreal3 = 0
userreal4 = 0

running that script triggers an error about deprecated Group value for cutoff-scheme option. When trying to switch cutoff-scheme from Group to Verlet, I get another error telling that Verlet option must be used with pbc option set to either xyz or xy. However, I want to perform this first minimization step in vacuum before generating any solvation box. Would you know how to make this script work with gromcas 2020 ?

thanks a lot

Eric

You can run a vacuum simulation with PBC on, on the pro-visor that you don’t have pressure coupling turned on i.e. not NPT.

The group scheme has been completely removed in GROMACS 2020 and with it the ability to use non-pbc simulations.

In practice, this won’t affect your, because you can still create a large box around your system and run the minimization with pbc as mentioned in the previous reply. The setup script should just work for this case once you use the Verlet scheme.

@cblau is there a plan to implement this feature? The ability to easily do vacuum simulations without PBC is really important, especially for force field work.

It’s not high on the agenda, I just created an issue on gitlab to link this discussion back to development here

ok thanks all for your help

Try the below minimization parameters which has worked well for vacuum simulations. Proper way to do vacuum simulations: no PBC, PME and cutoffs. To reduce computation time, Konermann Lab solved it by implementing pseudo-PBC conditions. Their paper explains it very clearly (link here): https://www.ncbi.nlm.nih.gov/pubmed/29678588
image

1 Like

thanks a lot for the settings. I will try them asap.

Dear All
I am running with the same problem while doing a simulation of ligand in a vacuum. Dear @Neena could you please elaborate a little about setting these parameters as I am thinking of setting a simulation in a vacuum that should not have any neighboring interaction ( I am new to this any please correct me where I am wrong). I am trying to do grompp with the following parameters:-
; minim.mdp - used as input into grompp to generate em.tpr
; Parameters describing what to do, when to stop and what to save
integrator = steep ; Algorithm (steep = steepest descent minimization)
emtol = 1000.0 ; Stop minimization when the maximum force < 1000.0 kJ/mol/nm
emstep = 0.01 ; Minimization step size
nsteps = 50000 ; Maximum number of (minimization) steps to perform

; Parameters describing how to find the neighbors of each atom and how to calculate the interactions
nstlist = 0 ; Frequency to update the neighbor list and long range forces
cutoff-scheme = Verlet ; Buffered neighbor searching
ns_type = simple ; Method to determine neighbor list (simple, grid)
coulombtype = cutoff ; Treatment of long range electrostatic interactions
rcoulomb = 0.0 ; Short-range electrostatic cut-off
rvdw = 0.0 ; Short-range Van der Waals cut-off
constraints = none ; Bond types to replace by constraints
pbc = yes ; Periodic Boundary Conditions in all 3 dimensions

But I am getting a segmentation fault core dumped error. How should I select these parameters to do a vacuum simulation?
Regards
Sadaf

Hi Sadaf,

Proper way to do vacuum simulations: no PBC, PME and cutoffs (with nstlist=0). To reduce computation time, Konermann Lab solved it by implementing pseudo-PBC conditions. Basically, molecule is prepared in a very large periodic box (333.3 nm infinite cut offs - essentially no cut off) such that it remains isolated. Their paper explains it very clearly (link here): [https://www.ncbi.nlm.nih.gov/pubmed/29678588 ]
Below is my minim.mdp file:
image
Note: I used ns_type: grid since I was simulating a protein

Dear @Neena
Thank you very much for your kind reply.
I am working on the ligand simulation in vacuum. I build topology and a box of 100nm around the ligand as below:-
gmx editconf -f NAP.gro -o NAPbox.gro -c -d 100.0 -bt cubic
followed by:-
gmx grompp -f minim.mdp -c NAPbox.gro -p topol.top -o NAP.tpr
However when I do:-
gmx mdrun -v -deffnm em
I get the following error:-
Program: gmx mdrun, version 2021
Source file: src/gromacs/options/options.cpp (line 179)
Function: void gmx::internal::OptionSectionImpl::finish()

Error in user input:
Invalid input values
In option s
Required option was not provided, and the default file ‘topol’ does not
exist or is not accessible.
The following extensions were tried to complete the file name:
.tpr
I have NAP.tpr in my working directory.

I have following parameters in my minim.mdp file:-
; minim.mdp - used as input into grompp to generate em.tpr
; Parameters describing what to do, when to stop and what to save
integrator = steep ; Algorithm (steep = steepest descent minimization)
emtol = 1000.0 ; Stop minimization when the maximum force < 1000.0 kJ/mol/nm
emstep = 0.01 ; Minimization step size
nsteps = 50000 ; Maximum number of (minimization) steps to perform
nstxout = 100
; Parameters describing how to find the neighbors of each atom and how to calculate the interactions
nstlist = 1 ; Frequency to update the neighbor list and long range forces
cutoff-scheme = Verlet ; Buffered neighbor searching
ns_type = grid ; Method to determine neighbor list (simple, grid)
coulombtype = cutoff ; Treatment of long range electrostatic interactions
rcoulomb = 100 ; Short-range electrostatic cut-off
rvdw = 100 ; Short-range Van der Waals cut-off
constraints = none ; Bond types to replace by constraints
pbc = xyz ; Periodic Boundary Conditions in all 3 dimensions
rlist =100 ; Short range neighbour list cutoff

I tried with your provided settings but getting same error. Could you please suggest me how should I fix this error?
Regards
Sadaf

Hi,

since you specify -deffnm em which sets default file names to em.[extension], mdrun is looking for a file called em.tpr.

You need to specify your file with -s NAP.tpr.

Regards,
Petter

Thank you
@pjohansson @Neena it worked
Regards
Sadaf

Dear All
I want to switch off non-bonded interaction completely so that there would be no intramolecular interaction as well for which I followed as mentioned above. However, I get 1-4 Lenard Jones and Coulombic interactions in the log file still.
Step Time
0 0.00000

Energies (kJ/mol)
Bond Angle Proper Dih. LJ-14 Coulomb-14
3.06426e+02 2.25654e+02 2.65055e+02 1.87424e+02 -2.24481e+03
LJ (SR) Coulomb (SR) Potential Pressure (bar)
0.00000e+00 -1.52038e+06 -1.52164e+06 5.25943e-03

How should I set the system so that there come no LJ-14 and Coulomb-14 interactions?
Regards
Sadaf

Dear Neena

Hi,

How can I change this parameters defined in min.mdp for nvt.mdp? I’d like to simulate my polymer system in NVT level but I am not sure how to change it.

Thanks a lot