# Gpu update giving error with protein ligand complex

**URL:** <https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925>\
**Category:** User discussions\
**Tags:** mdrun, gpu, constraint-algorithms\
**Created:** [March 6, 2023, 5:39pm UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925 "2023-03-06T17:39:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adwaith99](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Adwaith99](https://gromacs.bioexcel.eu/u/Adwaith99)\
**Post date:** [March 6, 2023, 5:39pm UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/1 "2023-03-06T17:39:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 7, 2023, 9:50am UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/2 "2023-03-07T09:50:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Adwaith99](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Adwaith99](https://gromacs.bioexcel.eu/u/Adwaith99)\
**Post date:** [March 7, 2023, 2:10pm UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/3 "2023-03-07T14:10:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 10, 2023, 7:54am UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/4 "2023-03-10T07:54:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Adwaith99](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Adwaith99](https://gromacs.bioexcel.eu/u/Adwaith99)\
**Post date:** [March 12, 2023, 6:50pm UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/5 "2023-03-12T18:50:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael1](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Michael1](https://gromacs.bioexcel.eu/u/Michael1)\
**Post date:** [December 9, 2024, 6:46pm UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/6 "2024-12-09T18:46:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [December 10, 2024, 7:59am UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/7 "2024-12-10T07:59:02Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![Michael1](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Michael1](https://gromacs.bioexcel.eu/u/Michael1)\
**Post date:** [December 10, 2024, 4:15pm UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/8 "2024-12-10T16:15:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [December 12, 2024, 8:42am UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/9 "2024-12-12T08:42:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael1](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Michael1](https://gromacs.bioexcel.eu/u/Michael1)\
**Post date:** [December 12, 2024, 4:21pm UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/10 "2024-12-12T16:21:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EisaKaveh](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@EisaKaveh](https://gromacs.bioexcel.eu/u/EisaKaveh)\
**Post date:** [December 23, 2024, 11:58am UTC](https://gromacs.bioexcel.eu/t/gpu-update-giving-error-with-protein-ligand-complex/5925/12 "2024-12-23T11:58:24Z")

</div>

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:

```auto
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](https://www.researchgate.net/profile/Eisa-Kaveh-Vernousfaderani/publication/387328009_Ligand's_Atoms_Soreter_for_Gromacs/data/67694cab00aa3770e0b39cc8/Lig-sorter.py?_tp=eyJjb250ZXh0Ijp7ImZpcnN0UGFnZSI6InByb2ZpbGUiLCJwYWdlIjoicHVibGljYXRpb24iLCJwcmV2aW91c1BhZ2UiOiJwcm9maWxlIiwicG9zaXRpb24iOiJwYWdlQ29udGVudCJ9fQ)
