GROMACS version:version 2021.3-MODIFIED GROMACS modification: Yes

Hi, I have a small system with 87 residues of a protein. And I want to maintain the tertiary structure of the protein, so I came up with some restraints which I am supplying in the topology file under the [bonds] directive. It is as follows

137  1188     6    3.253    8000
   271  1125     6    3.043    8000
    82  1004     6    1.386    8000
   319   979     6    2.600    8000
    82   923     6    1.309    8000
     7   764     6    2.059    8000
   257   662     6    2.415    8000
   319   829     6    1.809    8000
   151   371     6    1.859    8000
   371   500     6    1.752    8000
   462   764     6    1.440    8000
   923  1049     6    1.770    8000
  1004  1188     6    2.215    8000

Initially, I have a water padding of 1 nm (total number of atoms ~ 60k) and without the above restraints the simulation runs fine, but when I add the restraints, I got the following error. So, I am pretty sure that my type 6 restraints are causing the problem.

Fatal error: There is no domain decomposition for 96 ranks that is compatible with the given box and a minimum cell size of 4.21705 nm Change the number of ranks or mdrun option -rdd or -dds Look in the log file for details on the domain decomposition

I have searched the gromacs mailing list and other websites and found that if you increase the water padding (or make the box larger) you can avoid this error. So I tried going for 60-angstrom padding, but still have the same error and my total number of atoms reach close to 700k.

Is there a workaround for this problem? I do not want to simulate a bigger system because of my limited computational resources

I am attaching my log file for the NVT run.


  • $\begingroup$ I can't help, but I would suggest trying to run it with a single thread, or some number of threads less than 16, and see if it still runs. It won't be doing domain decomposition then, so if it works, I think we could assume the issue is that domain decomposition is struggling with constraints. If it doesn't work, then the issue probably isn't domain decomposition, but solely constraints. $\endgroup$
    – B. Kelly
    May 19, 2022 at 3:02
  • $\begingroup$ It may be worth trying the same thing with some version of GROMACS 2016 or 2018. That likely won't change anything, but maybe worth a shot. $\endgroup$
    – B. Kelly
    May 19, 2022 at 3:04
  • $\begingroup$ @B.Kelly, Thanks for the comment. Yes, I have tried decreasing my MPI ranks and found out that the maximum cores I can go for are 18 (which is terribly slow). I tried GROMACS 2019. still, the issue persists. $\endgroup$
    – Vasista
    May 19, 2022 at 8:18
  • 1
    $\begingroup$ I already posted the same question in the GROMACS forum before posting here. But, unfortunately, no one's responding. Anyway, I did find a way to get around this problem. Will write the answer on the weekend. $\endgroup$
    – Vasista
    May 20, 2022 at 0:16
  • 1
    $\begingroup$ @Vasista it looks like that weekend was a long one! Hopefully you still remember the answer :) If you can't, we can close this question so that the unanswered queue is able to give more attention to help users who are still struggling to find answers to their research problems. $\endgroup$ Dec 10, 2022 at 16:07

1 Answer 1


The answer is not the actual solution to the error posted but a workaround.

This is what I learned from the GROMACS mailing list:

There is a minimum cell length for each domain decomposition cell in each dimension, which depends on the chosen cutoff radii and possibly other inter-atomic constraints. So this is normally just a technical limitation and not a problem with the MD system. [Source]

For a successful domain decomposition, your box size must be twice your system's largest bond (couldn't find the reference, sorry). Since my restraints are quite large in length compared to a typical bond, I see this error often. So, I came up with the idea of not using bonded restraints in this case. Instead, use pulling, but keep the rate of pulling to zero, such that you are maintaining the distance between the atoms to be pulled fixed.

Here is the snippet of pull-code I used

pull-group1-name     = R1
pull-group2-name     = R2
pull-coord1-groups   = 1 2
pull-coord1-type     = umbrella
pull-coord1-geometry = distance
pull-coord1-dim      = Y Y Y
pull-coord1-k        = 3000
pull-coord1-init     = 1.2130461160248225
pull-coord1-rate     = 0

The domain-decomposition error can also arise in a normal system without any bonded restraints; It is usually due to the size of the system. If the size of your system is small and the requested number of cores is large, then you may have a bad domain decomposition. The only way to overcome this is to increase your system size by increasing your box size (viz. adding more water molecules) or decreasing the total number of cores. A good rule of thumb is ~100 atoms per core.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .