LINCS warning and segmentation fault @ non-equilibrium part of simulation

Hi everyone,

So I am trying to do free energy calculations for a mutant (M205A) with the human Prion protein (1QLX). However I keep running into a lincs warning at the non equilirium phase of the free energy simulation. The simulation is executed through a framework I created but incorporates the same steps as this tutorial (Protein mutation — pmx documentation). Below is the output for the folded state non-equilibrium part (The whole output was too long for this post but essentially the commands are repeated per frame that is extracted), the MDP files

                  :-) GROMACS - gmx grompp, 2023.2 (-:

Executable: /usr/local/gromacs/bin/gmx_mpi
Data prefix: /usr/local/gromacs
Working dir: /home/21616019/git_projects/v5/PSA_framework/work/d5/eca632fcf7c6986caf04f9e062bb0a/scratch/nxf.lXHjGvJx22/frame4
Command line:
gmx_mpi grompp -f …/r_nonequil.mdp -c frame.gro -p …/newtop.top -o nonequil.tpr -maxwarn 1

Ignoring obsolete mdp entry ‘ns-type’

NOTE 1 [file …/r_nonequil.mdp]:
With PME there is a minor soft core effect present at the cut-off,
proportional to (LJsigma/rcoulomb)^6. This could have a minor effect on
energy conservation, but usually other effects dominate. With a common
sigma value of 0.34 nm the fraction of the particle-particle potential at
the cut-off at lambda=0.5 is around 0.0e+00, while ewald-rtol is 1.0e-05.

Generating 1-4 interactions: fudge = 1
Number of degrees of freedom in T-Coupling group System is 50060.00

There was 1 NOTE

GROMACS reminds you: “I admired Bohr very much. We had long talks together, long talks in which Bohr did practically all the talking.” (Paul Dirac)

Setting the LD random seed to -2097415

Generated 118802 of the 118828 non-bonded parameter combinations

Generated 88948 of the 118828 1-4 parameter combinations

Excluding 3 bonded neighbours molecule type ‘Protein_chain_P’

turning H bonds into constraints…

Excluding 2 bonded neighbours molecule type ‘SOL’

turning H bonds into constraints…

Excluding 1 bonded neighbours molecule type ‘NA’

turning H bonds into constraints…

Excluding 1 bonded neighbours molecule type ‘CL’

turning H bonds into constraints…
Analysing residue names:
There are: 104 Protein residues
There are: 7608 Water residues
There are: 49 Ion residues
Analysing Protein…

The largest distance between non-perturbed excluded atoms is 0.432 nm between atom 463 and 470

Determining Verlet buffer for a tolerance of 0.00025 kJ/mol/ps at 298.15 K

Calculated rlist for 1x1 atom pair-list as 1.205 nm, buffer size 0.005 nm

Set rlist, assuming 4x4 atom pair-list, to 1.201 nm, buffer size 0.001 nm

Note that mdrun will redetermine rlist based on the actual pair-list setup
Calculating fourier grid dimensions for X Y Z
Using a fourier grid of 60x60x60, spacing 0.116 0.116 0.116

Estimate for the relative computational load of the PME mesh part: 0.29

This run will generate roughly 7 Mb of data
:slight_smile: GROMACS - gmx mdrun, 2023.2 (-:

Executable: /usr/local/gromacs/bin/gmx_mpi
Data prefix: /usr/local/gromacs
Working dir: /home/21616019/git_projects/v5/PSA_framework/work/d5/eca632fcf7c6986caf04f9e062bb0a/scratch/nxf.lXHjGvJx22/frame4
Command line:
gmx_mpi mdrun -s nonequil.tpr -deffnm nonequil -dhdl dgdl_rev4.xvg -v

Compiled SIMD is AVX2_256, but CPU also supports AVX_512 (see log).
Reading file nonequil.tpr, VERSION 2023.2 (single precision)
Changing nstlist from 10 to 100, rlist from 1.201 to 1.249

Update groups can not be used for this system because atoms that are (in)directly constrained together are interdispersed with other atoms

Using 1 MPI process
Using 72 OpenMP threads

starting mdrun ‘PMX MODEL in water’
40000 steps, 8.0 ps.

step 0
Step 1, time 0.0002 (ps) LINCS WARNING
relative constraint deviation after LINCS:
rms 2.918139, max 82.985596 (between atoms 1295 and 1298)
bonds that rotated more than 30 degrees:
atom 1 atom 2 angle previous, current, constraint length
1295 1296 90.0 0.1110 0.1288 0.1111
1295 1297 90.0 0.1110 0.1288 0.1111
1295 1298 81.3 0.1110 9.3308 0.1111
1284 1285 90.0 0.0996 0.9370 0.0997
Wrote pdb files with previous and current coordinates

Step 1, time 0.0002 (ps) LINCS WARNING
relative constraint deviation after LINCS:
rms 2.827562, max 80.210556 (between atoms 1295 and 1298)
bonds that rotated more than 30 degrees:
atom 1 atom 2 angle previous, current, constraint length
1295 1296 90.0 0.1110 0.5256 0.1111
1295 1297 90.0 0.1110 0.5243 0.1111
1295 1298 129.3 0.1110 9.0225 0.1111
1284 1285 90.0 0.0996 0.9369 0.0997

Back Off! I just backed up step1b.pdb to ./#step1b.pdb.1#

Back Off! I just backed up step1c.pdb to ./#step1c.pdb.1#
Wrote pdb files with previous and current coordinates

WARNING: Listed nonbonded interaction between particles 1291 and 1298
at distance 9.392 which is larger than the table limit 2.249 nm.

This is likely either a 1,4 interaction, or a listed interaction inside
a smaller molecule you are decoupling during a free energy calculation.
Since interactions at distances beyond the table cannot be computed,
they are skipped until they are inside the table limit again. You will
only see this message once, even if it occurs for several interactions.

IMPORTANT: This should not happen in a stable simulation, so there is
probably something wrong with your system. Only change the table-extension
distance in the mdp file if you are really sure that is the reason.

[n06:02481] *** Process received signal ***
[n06:02481] Signal: Segmentation fault (11)
[n06:02481] Signal code: Invalid permissions (2)
[n06:02481] Failing at address: 0x7f3792421d88
[n06:02481] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f4b5f5bb520]
[n06:02481] [ 1] /usr/local/gromacs/bin/…/lib/libgromacs_mpi.so.8(+0xe1d67b)[0x7f4b6094967b]
[n06:02481] [ 2] /lib/x86_64-linux-gnu/libgomp.so.1(+0x1dc0e)[0x7f4b5f465c0e]
[n06:02481] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7f4b5f60dac3]
[n06:02481] [ 4] /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7f4b5f69ea04]
[n06:02481] *** End of error message ***
/home/21616019/git_projects/v5/PSA_framework/work/d5/eca632fcf7c6986caf04f9e062bb0a/.command.sh: line 9: 2481 Segmentation fault (core dumped) gmx_mpi mdrun -s nonequil.tpr -deffnm nonequil -dhdl dgdl_rev$i.xvg -v.

MDP Non-equilibrium reverse:
;====================================================
; Non-equilibrium transition
;====================================================

; RUN CONTROL
;----------------------------------------------------
integrator = sd ; stochastic leap-frog integrator
nsteps = 40000 ; 2 * 40000 fs = 80 ps
dt = 0.0002 ; 2 fs
comm-mode = Linear ; remove center of mass translation
nstcomm = 1 ; frequency for center of mass motion removal

; OUTPUT CONTROL
;----------------------------------------------------
nstxout = 10000 ; save coordinates to .trr every 20 ps
nstvout = 10000 ; save velocities to .trr every 20 ps
nstfout = 10000 ; save forces to .trr every 20 ps
nstxout-compressed = 10000 ; xtc compressed trajectory output every 20 ps
compressed-x-precision = 1000 ; precision with which to write to the compressed trajectory file
nstlog = 5000 ; update log file every 10 ps
nstenergy = 1000 ; save energies every 2 ps
nstcalcenergy = 1 ; calculate energies at every step

; BONDS
;----------------------------------------------------
constraint_algorithm = lincs ; holonomic constraints
constraints = h-bonds ; constrain H-bonds
lincs-iter = 1 ; accuracy of LINCS (1 is default)
lincs-order = 6 ; also related to accuracy (4 is default)
lincs-warnangle = 30 ; maximum angle that a bond can rotate before LINCS will complain (30 is default)
continuation = yes ; formerly known as ‘unconstrained-start’ - useful for exact continuations and reruns

; NEIGHBOR SEARCHING
;----------------------------------------------------
cutoff-scheme = Verlet ; group or Verlet
ns-type = grid ; search neighboring grid cells
nstlist = 10 ; 20 fs (default is 10)
rlist = 1.2 ; short-range neighborlist cutoff (in nm)
pbc = xyz ; 3D PBC

; ELECTROSTATICS & EWALD
;----------------------------------------------------
coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics
coulomb-modifier = Potential-shift-Verlet
rcoulomb = 1.2 ; short-range electrostatic cutoff (in nm)
ewald-geometry = 3d ; Ewald sum is performed in all three dimensions
pme-order = 4 ; interpolation order for PME (default is 4)
fourierspacing = 0.12 ; grid spacing for FFT
ewald-rtol = 1e-5 ; relative strength of the Ewald-shifted direct potential at rcoulomb

; VAN DER WAALS
;----------------------------------------------------
vdw-type = Cut-off ; potential switched off at rvdw-switch to reach zero at rvdw
vdw-modifier = force-switch
verlet-buffer-tolerance = 0.00025
rvdw = 1.2 ; van der Waals cutoff (in nm)
rvdw-switch = 1.0
DispCorr = no ; apply analytical long range dispersion corrections for Energy and Pressure

; TEMPERATURE COUPLING (Langevin)
;----------------------------------------------------
tc-grps = System
tau-t = 1.0
ref-t = 298.15
gen-vel = no ; Velocity generation (if gen-vel is ‘yes’, continuation should be ‘no’)
gen-seed = -1

; PRESSURE COUPLING
;----------------------------------------------------
pcoupl = C-rescale
pcoupltype = isotropic ; uniform scaling of box vectors
tau_p = 2.0 ; time constant (ps)
ref_p = 1.0 ; reference pressure (bar)
compressibility = 4.5e-05 ; isothermal compressibility of water (bar^-1)
refcoord-scaling = no

; FREE ENERGY
;----------------------------------------------------
free-energy = yes
init-lambda = 1 ; start from state B
delta-lambda = -2.5e-05 ; complete transition in this number of steps
sc-coul = yes ; use soft-core also for coulombic interactions
sc-alpha = 0 ; soft-core
sc-sigma = 0.34 ;
sc-power = 1 ;
nstdhdl = 1 ; write to dhdl at each step

The same also occurs for my tripeptide M2A.

You need to switch soft-core on, e.g.
sc-alpha = 0.3

So I have switched on the soft-core for non-equilibrium and it works in the sense where I don’t get a segmentation fault and the command runs to completion however it does result in a warning that occurs. Also wanted to know if the note presented below is a cause for concern.

Below is the output and MDP file:

:slight_smile: GROMACS - gmx trjconv, 2023.2 (-:

Executable: /usr/local/gromacs/bin/gmx_mpi
Data prefix: /usr/local/gromacs
Working dir: /home/21616019/git_projects/v5/PSA_framework/work/5c/854c2e4ff34c252a3f48c663390378/scratch/nxf.rIzrYHGlPV
Command line:
gmx_mpi trjconv -f equil.trr -s equil.tpr -sep -b 100 -o frame_.gro

Will write gro: Coordinate file in Gromos-87 format
Reading file equil.tpr, VERSION 2023.2 (single precision)
Reading file equil.tpr, VERSION 2023.2 (single precision)
Group 0 ( System) has 24568 elements
Group 1 ( Protein) has 1695 elements
Group 2 ( Protein-H) has 878 elements
Group 3 ( C-alpha) has 104 elements
Group 4 ( Backbone) has 312 elements
Group 5 ( MainChain) has 415 elements
Group 6 ( MainChain+Cb) has 514 elements
Group 7 ( MainChain+H) has 518 elements
Group 8 ( SideChain) has 1177 elements
Group 9 ( SideChain-H) has 463 elements
Group 10 ( Prot-Masses) has 1695 elements
Group 11 ( non-Protein) has 22873 elements
Group 12 ( Water) has 22824 elements
Group 13 ( SOL) has 22824 elements
Group 14 ( non-Water) has 1744 elements
Group 15 ( Ion) has 49 elements
Group 16 ( Water_and_ions) has 22873 elements
Select a group: trr version: GMX_trn_file (single precision)

Skipping frame 0 time 0.000
Reading frame 1 time 100.000
Reading frame 2 time 200.000 → frame 0 time 100.000

Reading frame 3 time 300.000 → frame 1 time 200.000

Reading frame 4 time 400.000 → frame 2 time 300.000

Reading frame 5 time 500.000 → frame 3 time 400.000

Reading frame 6 time 600.000 → frame 4 time 500.000

Reading frame 7 time 700.000 → frame 5 time 600.000

Reading frame 8 time 800.000 → frame 6 time 700.000

Reading frame 9 time 900.000 → frame 7 time 800.000

Reading frame 10 time 1000.000 → frame 8 time 900.000

Reading frame 11 time 1100.000 → frame 9 time 1000.000

Reading frame 12 time 1200.000 → frame 10 time 1100.000

Reading frame 13 time 1300.000 → frame 11 time 1200.000

Reading frame 14 time 1400.000 → frame 12 time 1300.000

Reading frame 15 time 1500.000 → frame 13 time 1400.000

Reading frame 16 time 1600.000 → frame 14 time 1500.000

Reading frame 17 time 1700.000 → frame 15 time 1600.000

Reading frame 18 time 1800.000 → frame 16 time 1700.000

Reading frame 19 time 1900.000 → frame 17 time 1800.000

Reading frame 20 time 2000.000 → frame 18 time 1900.000

Reading frame 30 time 3000.000 → frame 28 time 2900.000

Reading frame 40 time 4000.000 → frame 38 time 3900.000

Reading frame 50 time 5000.000 → frame 48 time 4900.000

Last frame 50 time 5000.000
→ frame 49 time 5000.000
Last written: frame 49 time 5000.000

GROMACS reminds you: “Quite frankly, even if the choice of C were to do nothing but keep the C++ programmers out, that in itself would be a huge reason to use C.” (Linus Torvalds)

Note that major changes are planned in future for trjconv, to improve usability and utility.
Select group for output
Selected 0: ‘System’
:slight_smile: GROMACS - gmx grompp, 2023.2 (-:

Executable: /usr/local/gromacs/bin/gmx_mpi
Data prefix: /usr/local/gromacs
Working dir: /home/21616019/git_projects/v5/PSA_framework/work/5c/854c2e4ff34c252a3f48c663390378/scratch/nxf.rIzrYHGlPV/frame1
Command line:
gmx_mpi grompp -f …/f_nonequil.mdp -c frame.gro -p …/newtop.top -o nonequil.tpr -maxwarn 1

Ignoring obsolete mdp entry ‘ns-type’

WARNING 1 [file …/f_nonequil.mdp, line 87]:
You are using soft-core interactions while the Van der Waals interactions
are not decoupled (note that the sc-coul option is only active when using
lambda states). Although this will not lead to errors, you will need much
more sampling than without soft-core interactions. Consider using
sc-alpha=0.

NOTE 1 [file …/f_nonequil.mdp]:
With PME there is a minor soft core effect present at the cut-off,
proportional to (LJsigma/rcoulomb)^6. This could have a minor effect on
energy conservation, but usually other effects dominate. With a common
sigma value of 0.34 nm the fraction of the particle-particle potential at
the cut-off at lambda=0.5 is around 1.3e-05, while ewald-rtol is 1.0e-05.

Generating 1-4 interactions: fudge = 1
Number of degrees of freedom in T-Coupling group System is 50060.00

There was 1 NOTE

There was 1 WARNING

GROMACS reminds you: “Come on boys, Let’s push it hard” (P.J. Harvey)

Setting the LD random seed to -1292046657

Generated 118802 of the 118828 non-bonded parameter combinations

Generated 88948 of the 118828 1-4 parameter combinations

Excluding 3 bonded neighbours molecule type ‘Protein_chain_P’

turning H bonds into constraints…

Excluding 2 bonded neighbours molecule type ‘SOL’

turning H bonds into constraints…

Excluding 1 bonded neighbours molecule type ‘NA’

turning H bonds into constraints…

Excluding 1 bonded neighbours molecule type ‘CL’

turning H bonds into constraints…
Analysing residue names:
There are: 104 Protein residues
There are: 7608 Water residues
There are: 49 Ion residues
Analysing Protein…

The largest distance between non-perturbed excluded atoms is 0.445 nm between atom 886 and 1441

Determining Verlet buffer for a tolerance of 0.00025 kJ/mol/ps at 298.15 K

Calculated rlist for 1x1 atom pair-list as 1.202 nm, buffer size 0.002 nm

Set rlist, assuming 4x4 atom pair-list, to 1.200 nm, buffer size 0.000 nm

Note that mdrun will redetermine rlist based on the actual pair-list setup
Calculating fourier grid dimensions for X Y Z
Using a fourier grid of 60x60x60, spacing 0.116 0.116 0.116

Estimate for the relative computational load of the PME mesh part: 0.29

This run will generate roughly 7 Mb of data

MDP:
;====================================================
; Non-equilibrium transition
;====================================================

; RUN CONTROL
;----------------------------------------------------
integrator = sd ; stochastic leap-frog integrator
nsteps = 40000 ; 2 * 40000 fs = 80 ps
dt = 0.0001 ; 2 fs
comm-mode = Linear ; remove center of mass translation
nstcomm = 1 ; frequency for center of mass motion removal

; OUTPUT CONTROL
;----------------------------------------------------
nstxout = 10000 ; save coordinates to .trr every 20 ps
nstvout = 10000 ; save velocities to .trr every 20 ps
nstfout = 10000 ; save forces to .trr every 20 ps
nstxout-compressed = 10000 ; xtc compressed trajectory output every 20 ps
compressed-x-precision = 1000 ; precision with which to write to the compressed trajectory file
nstlog = 5000 ; update log file every 10 ps
nstenergy = 1000 ; save energies every 2 ps
nstcalcenergy = 1 ; calculate energies at every step

; BONDS
;----------------------------------------------------
constraint_algorithm = lincs ; holonomic constraints
constraints = h-bonds ; constrain H-bonds
lincs-iter = 1 ; accuracy of LINCS (1 is default)
lincs-order = 6 ; also related to accuracy (4 is default)
lincs-warnangle = 30 ; maximum angle that a bond can rotate before LINCS will complain (30 is default)
continuation = yes ; formerly known as ‘unconstrained-start’ - useful for exact continuations and reruns

; NEIGHBOR SEARCHING
;----------------------------------------------------
cutoff-scheme = Verlet ; group or Verlet
ns-type = grid ; search neighboring grid cells
nstlist = 10 ; 20 fs (default is 10)
rlist = 1.2 ; short-range neighborlist cutoff (in nm)
pbc = xyz ; 3D PBC

; ELECTROSTATICS & EWALD
;----------------------------------------------------
coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics
coulomb-modifier = Potential-shift-Verlet
rcoulomb = 1.2 ; short-range electrostatic cutoff (in nm)
ewald-geometry = 3d ; Ewald sum is performed in all three dimensions
pme-order = 4 ; interpolation order for PME (default is 4)
fourierspacing = 0.12 ; grid spacing for FFT
ewald-rtol = 1e-5 ; relative strength of the Ewald-shifted direct potential at rcoulomb

; VAN DER WAALS
;----------------------------------------------------
vdw-type = Cut-off ; potential switched off at rvdw-switch to reach zero at rvdw
vdw-modifier = force-switch
verlet-buffer-tolerance = 0.00025
rvdw = 1.2 ; van der Waals cutoff (in nm)
rvdw-switch = 1.0
DispCorr = no ; apply analytical long range dispersion corrections for Energy and Pressure

; TEMPERATURE COUPLING (Langevin)
;----------------------------------------------------
tc-grps = System
tau-t = 1.0
ref-t = 298.15
gen-vel = no ; Velocity generation (if gen-vel is ‘yes’, continuation should be ‘no’)
gen-seed = -1

; PRESSURE COUPLING
;----------------------------------------------------
pcoupl = C-rescale
pcoupltype = isotropic ; uniform scaling of box vectors
tau_p = 2.0 ; time constant (ps)
ref_p = 1.0 ; reference pressure (bar)
compressibility = 4.5e-05 ; isothermal compressibility of water (bar^-1)
refcoord-scaling = no

; FREE ENERGY
;----------------------------------------------------
free-energy = yes
init-lambda = 0 ; start from state A
delta-lambda = 2.5e-05 ; complete transition in this number of steps
sc-coul = yes ; use soft-core also for coulombic interactions
sc-alpha = 0.3 ; soft-core
sc-sigma = 0.34 ;
sc-power = 1 ;
nstdhdl = 1 ; write to dhdl at each step

Another question I have is why does a segmentation fault occur only for the reverse transformation when soft-core if off? What impact does it have?

This warning is safe to ignore.

As the note says, the effect will be very minor and the noise from other effects will be larger.

You see the effect of softcore in one direction only probably because you have more non-dummy atoms in stateA and they cause clashes with other real atoms in the system when going from B to A.

Thank you so much for your responses.

Another query on an error, so although the above errors were solved, the same parameters were applied to the tripeptide G2V and the result was an additional warning:

Command error:
Ignoring obsolete mdp entry ‘ns-type’

WARNING 1 [file …/r_nonequil.mdp, line 87]:
You are using soft-core interactions while the Van der Waals interactions
are not decoupled (note that the sc-coul option is only active when using
lambda states). Although this will not lead to errors, you will need much
more sampling than without soft-core interactions. Consider using
sc-alpha=0.

NOTE 1 [file …/r_nonequil.mdp]:
With PME there is a minor soft core effect present at the cut-off,
proportional to (LJsigma/rcoulomb)^6. This could have a minor effect on
energy conservation, but usually other effects dominate. With a common
sigma value of 0.34 nm the fraction of the particle-particle potential at
the cut-off at lambda=0.5 is around 1.3e-05, while ewald-rtol is 1.0e-05.

Generating 1-4 interactions: fudge = 1

WARNING 2 [file tripep_G2V.top, line 17]:
The bond in molecule-type Protein_chain_X between atoms 22 DCG1 and 23
DHG1 has an estimated oscillational period of 8.6e-03 ps, which is less
than 5 times the time step of 2.0e-03 ps.
Maybe you forgot to change the constraints mdp option.

Number of degrees of freedom in T-Coupling group System is 6014.00

There was 1 NOTE

There were 2 WARNINGs

The h-bonds are contrained, and I can reduce the time step, however the reduced time step would apply to both the tripeptide and the folded structure. And I am not sure of the effect this will have.

It seems you are using ‘master’ branch of pmx: with it only all-bond constraints are supported. h-bond constraints are supported with the ‘develop’ branch of pmx

I am using the develop branch of PMX, the simulation with the M205A mutation with H-bond constraints ran successfully. However the G127V gives the warning about oscillation period.

Could you make sure that you are using amber99sb-star-ildn-mut.ff, amber14sbmut.ff or charmm36m-mut.ff in the ‘develop’ branch? There is no atom type DHG1 defined for these force fields