Gpu update giving error with protein ligand complex

GROMACS version: 2022.3
GROMACS modification: No
Here post your question:

I am doing a simulation of a membrane protein complex with a small molecule ligand. I am running it on a cluster with nodes having four GPUs. I have seen that uisng all four GPUs and enabling direct GPU communication makes my simulation significantly faster when I tried with just the protein (without the ligand). The simualtion files are generated using CHARMM-GUI.

However, when I try to run the simulation with the system conatining ligand, I get the following error.

“Inconsistency in user input:
Update task on the GPU was required,
but the following condition(s) were not satisfied:
Domain decomposition is only supported with constraints when update groups are
used. This means constraining all bonds is not supported, except for small
molecules, and box sizes close to half the pair-list cutoff are not supported.”

My md.log file says “When checking whether update groups are usable:
At least one moleculetype does not conform to the requirements for using update groups”

My mdp files is the following:
integrator = md
dt = 0.002
nsteps = 500000000
nstxout = 50000
nstvout = 50000
nstfout = 50000
nstcalcenergy = 100
nstenergy = 1000
nstlog = 1000
;
cutoff-scheme = Verlet
nstlist = 100
rlist = 1.2
vdwtype = Cut-off
vdw-modifier = Force-switch
rvdw_switch = 1.0
rvdw = 1.2
coulombtype = PME
rcoulomb = 1.2
;
tcoupl = V-rescale
tc_grps = SOLU MEMB SOLV
tau_t = 1.0 1.0 1.0
ref_t = 303.15 303.15 303.15
;
pcoupl = Parrinello-Rahman
pcoupltype = semiisotropic
tau_p = 5.0
compressibility = 4.5e-5 4.5e-5
ref_p = 1.0 1.0
;
constraints = h-bonds
constraint_algorithm = LINCS
continuation = yes
;
nstcomm = 100
comm_mode = linear
comm_grps = SOLU_MEMB SOLV

And the commands I am using to run the simulation is
gmx grompp -f step7_production.mdp -o md.tpr -c step6.6_equilibration.gro -p topol.top -n index.ndx
gmx mdrun -v -deffnm md -ntomp 13 -ntmpi 4 -nb gpu -bonded gpu -update gpu -pme gpu -npme 1 -ntomp_pme 5

Any help on how to solve this issue will be appreciated.

Thank you

My guess is that your ligand has all hydrogens at the end instead of following after the heavy atom they are connected to. This prevents the use of update groups.

From version 2023 onward, the reason why update groups can’t be used is written in the log file.

Thank you for your reply.

I just checked the input .gro file and the hydrogens are all at the end as you pointed out. Is there any way I could circumvent this problem?

Also, just curious, why exactly does order of atoms in the input file affect the “update groups” feature?

Thank you

You could manually reorder the lines in the .gro file and reorder the topology, but that’s tedious.

Theoretically there is no reason why update groups couldn’t work, but is quite some effort to reorder atoms in the input to get the atoms in update groups to be consecutive.

1 Like

I manuall reordered them in my initial input file to CHARMM-GUI. So, all the inputs to GROMACS were in the right order and I was able to get it to work.
Thanks for your help and suggestions.

Hi is this still a thing and do atoms need to be reordered this way for PDB files too? I find it a bit impractical to have to reorder atoms this way prior and the lack of meaningful error messages for indicating this.

Yes, unfortunately this is still a thing. It’s quite some coding effort to internally reorder atoms in the topology. But you should get a, relatively, clear error message:

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

That’s too bad. I hope one day this is resolved as the main drawback to gromacs is quirky behavior such as this that makes it a bit challenging to adopt at first. Mostly speaking from firsthand experience.

I agree (but we are rather short on resources).

On the other hand, Charmm GUI not putting hydrogens after the heavy atoms they are connected to is also not great. One could ask the developers to use the common ordering instead.

I certainly agree though the issue is not particularly limited to Charmm GUI. For instance, I’m not using Charmm GUI and instead I am using RDkit for small molecule preparation, among a few other tools.

Sadly bioinformatic file formats are simply too inconsistent and I’m personally not aware of any tools that output SDFs in the format desired by gromacs.

If anyone is aware of any tools or scripts that can properly order the hydrogens for gromacs I would be very grateful.

To correctly sort atoms in your simulation files, you can use my Python 3 script. Place it in the simulation folder and run the following command in the terminal:

python3 Lig_sorter.py

Note: Ensure that your files are named exactly as “lig.mol2” and “lig.gro”. However, you are free to customize the code as needed for your specific use case.

Download the Code