No domain decomposition while using restraints

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 mailing list 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.

nvt.log (15.5 KB)

I found a similar post in the mailing archive, a solution to this problem.
Here is the post:

A real fix would then be adding
i!=F_HARMONIC &&
to the if statement on line 272 of src/gmxlib/mshift.c
and recompiling Gromacs, such that the harmonic potentials
are not put into the graph.

But I couldn’t find this line In the current GROMACS version (2021.3) mshift.cpp, As this answer was written 15 years ago, I assume the code changed slightly. Could anyone help regarding where should I change the code and recompile it?

The code has changed massively in 15 years, and the fix proposed above may even pre-date domain decomposition (which I believe was released in 2008).