# Trouble to apply distance restraints

**URL:** <https://gromacs.bioexcel.eu/t/trouble-to-apply-distance-restraints/3624>\
**Category:** User discussions\
**Tags:** mdp-parameters, restraints, simulation-setup\
**Created:** [February 8, 2022, 5:52pm UTC](https://gromacs.bioexcel.eu/t/trouble-to-apply-distance-restraints/3624 "2022-02-08T17:52:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srdjan](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@srdjan](https://gromacs.bioexcel.eu/u/srdjan)\
**Post date:** [February 8, 2022, 5:52pm UTC](https://gromacs.bioexcel.eu/t/trouble-to-apply-distance-restraints/3624/1 "2022-02-08T17:52:45Z")

</div>

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

Hello,

I am trying to apply distance restraint on protein in SIrah force field to prevent deformation of protein during pulling (as reducing force constant or with lower rate did not help).  
In my topology I have 4 chains: ChainA, ChainB, ChainC, ChainD

Dimer1 consists of chains A,B and they are fixed during pulling by including following command in topology files:  
#ifdef POSRES\_A  
#include “posre\_Other\_chain\_A.itp”  
#endif

#ifdef POSRES\_B  
#include “posre\_Other\_chain\_B.itp”  
#endif

I have created distance restraint files by following command:  
gmx genrestr -f C.pdb -n C.ndx -o C.itp -disre yes -fc 1000 1000 1000 (for chain C and chain D)

and then included following command in topology of chain C:  
#ifdef CONF\_C  
#include “C.itp”  
#endif

end in mdp file: DEFINE = -DCONF\_C

and then simulation works.

However, if I try to distance restrain chain D too, it does not work, I am getting some error in gromacs:  
DEFINE = -DCONF\_C -DCONF\_D

I was also getting same error if I use only :  
DEFINE = -DCONF\_C

and write in corresponding topology files:  
#ifdef CONF\_C  
#include “C.itp”  
#endif

#ifdef CONF\_C  
#include “D.itp”  
#endif

I have tried to start simulation again by making gromacs merge chain A,B into one chain1, and merge chains C,D into another chain2, and then I have create distance restraints to chain2, and simulation started without showing any error, but I see no progress in .log file, it is on timestep 0 for hours.

I would appreciate if someone could help me with this issue. Thank you in advance.

PS. The error I get when I try to apply distance restraints to two chains simultaneously is:

getting the following error:  
Program: gmx mdrun, version 2019.2  
Source file: src/gromacs/listed-forces/disre.cpp (line 174)  
Function: init\_disres(FILE\*, const gmx\_mtop\_t\*, t\_inputrec\*, const t\_commrec\*, const gmx\_multisim\_t\*, t\_fcdata\*, t\_state\*, gmx\_bool)::\<lambda()\>

Assertion failed:  
Condition: type\_max - type\_min + 1 == dd-\>nres  
All distance restraint parameter entries in the topology should be consecutive

---

<div class="post-metadata">

**Author:** ![srdjan](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@srdjan](https://gromacs.bioexcel.eu/u/srdjan)\
**Post date:** [February 9, 2022, 9:54am UTC](https://gromacs.bioexcel.eu/t/trouble-to-apply-distance-restraints/3624/2 "2022-02-09T09:54:26Z")

</div>

Hello,

I would also appreciate if someone can give advice how to prevent protein being deformed during pulling, I have tried to reduce force and apply slower pulling, the slowest I tried is 0.001 and force 500 (with force 250 it was difficult to move them).  
But maybe there are some another useful tips or advices?  
If I would manage to get proteins not deformed during pulling, then I would not need distance restraints.

Thanx a lot.

---

<div class="post-metadata">

**Author:** ![srdjan](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@srdjan](https://gromacs.bioexcel.eu/u/srdjan)\
**Post date:** [April 4, 2022, 10:18am UTC](https://gromacs.bioexcel.eu/t/trouble-to-apply-distance-restraints/3624/3 "2022-04-04T10:18:46Z")

</div>

I managed to resolve problem on another way, by inserting special bonds of type 10.

> [@Distance restraints applied to multiple proteins](https://gromacs.bioexcel.eu/t/distance-restraints-applied-to-multiple-proteins/3389/11):
>
> Thanx :). For me even worked when I have put “force constant 10” although I was not checking thoroughly by RMSD how stable is conformation, but visually in VMD it looked pretty fine.
