Error: One or more water molecules can not be settled

GROMACS version:
GROMACS modification: No

Hi there,

I was running simulations of aqueous solutions of carbohydrates and had no problems. However, I attempted to run simulations of aqueous solutions of two types of carbohydrate molecules in the same box (20 molecules each, 2000 molecules of water). I followed the same calculation method: generate simulation boxes with insert-molecules and solvate, create .itp files with LigParGen (I’m using OPLS-AA), running energy minimization, equilibration and production run.

The first thing I noticed was during energy minimization: even changing the value of emtol (I tried 100, 800, and 1000), it stops even if the forces have not converged. It is not exactly an error, but something that has changed compared to the simulations containing only one type of carbohydrate molecule.

Then, during the NVT equilibration, I got:

Step 0, time 0 (ps) LINCS WARNING
relative constraint deviation after LINCS:
rms 0.959124, max 22.697025 (between atoms 853 and 852)
bonds that rotated more than 30 degrees:
atom 1 atom 2 angle previous, current, constraint length
853 852 136.3 0.0945 2.2394 0.0945

step 0: One or more water molecules can not be settled.
Check for bad contacts and/or reduce the timestep if appropriate.

I tried reducing the timestep (= 0.001) but I still get this error. Is there a way to solve it?

Thanks!

A good starting point is to investigate atoms 853 and 852 and atoms within 2Å from them. Do the bonds look correct? Are there any atoms that are too close? Does it look correct when you show periodical representations of the system?

Thank you for your answer. Actually, each time I run the same simulation the atoms that overlap are different. A water molecule is systematically overlapping with a carbohydrate molecule, and I don’t know why…

Could you post the exact gmx insert-molecules and gmx solvate commands you are using?

Yes, it is a bash script that goes like:

    gmx insert-molecules -ci "$gro_file_1" -o "$boxes_folder/box_${name_project}.gro" -nmol "$num_1" -box "$box_size" "$box_size" "$box_size"
    gmx insert-molecules -f "$boxes_folder/box_${name_project}.gro" -ci "$gro_file_2" -o "$boxes_folder/box_${name_project}.gro" -nmol "$num_2"
    gmx solvate -cp "$boxes_folder/box_${name_project}.gro" -cs ${water_model} -o "$boxes_folder/${name_project}.gro" -p "$top_file"

That looks OK.

What happens if you energy minimize and equilibrate (NVT) without water in the system? And do the carbohydrates look good after EM?

That’s weird, now I got:

Program: gmx mdrun, version 2024.3
Source file: src/gromacs/gpu_utils/devicebuffer.cuh (line 111)
Function: freeDeviceBuffer<gmx::BasicVector*>(gmx::BasicVector**)::<lambda()>

Assertion failed:
Condition: stat == cudaSuccess
Freeing of the device buffer failed. CUDA error #700
(cudaErrorIllegalAddress): an illegal memory access was encountered.

OK. So, do the carbohydrates look good before EM? In that case you’ll only have to inspect one of each type.

Your answer actually made me realize that the simulation setup was completely unrealistic. I solved the problem, thank you :)

Hi,

In these cases:
1- choose a relatively large simulation box to avoid overlapping

2- Use gmx solvate

3- Start from tiny time steps ( e.g., dt = 0.0002 or 0.2 fs) for short simulation times (e.g., 200 ps, which differs system by system). Then, gradually increase the time steps to 0.5, 1fs, or more.

Good luck