# GROMACS cannot identify position restraints given in topper/ directory for some molecules

**URL:** <https://gromacs.bioexcel.eu/t/gromacs-cannot-identify-position-restraints-given-in-topper-directory-for-some-molecules/10202>\
**Category:** User discussions\
**Created:** [September 20, 2024, 12:50pm UTC](https://gromacs.bioexcel.eu/t/gromacs-cannot-identify-position-restraints-given-in-topper-directory-for-some-molecules/10202 "2024-09-20T12:50:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![I\_Noble](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@I\_Noble](https://gromacs.bioexcel.eu/u/I_Noble)\
**Post date:** [September 20, 2024, 12:50pm UTC](https://gromacs.bioexcel.eu/t/gromacs-cannot-identify-position-restraints-given-in-topper-directory-for-some-molecules/10202/1 "2024-09-20T12:50:15Z")

</div>

GROMACS version: 5.1.4  
GROMACS modification: No

Hello,

I am trying to run a GROMACS NPT equilibration simulation on a molecular system containing a single 2-heptyl-3-hydroxy-4-quinolone in an ethanol/water solvent.

I generated the input system using CHARMM-GUI and successfully ran energy minimisation and NVT equilibration simulations in GROMACS. However, whilst attempting to prepare a NPT equilibration simulation using the command below, GROMACS was only able to find the position restraints for water (TIP3). The position restraints for ethanol (ETOH) and PQS (LIG) were unable to be identified.

```
gmx grompp -f step5.2_equilibration_npt.mdp -c step5.1_equilibration.gro -r step5.1_equilibration.gro -t step5.1_equilibration.cpt -p topol.top -o step5.2_equilibration_npt.tpr -n index.ndx

```

Here is the output:

```
Setting the LD random seed to 4013252236
Generated 210 of the 210 non-bonded parameter combinations
Generating 1-4 interactions: fudge = 1
Generated 136 of the 210 1-4 parameter combinations

ERROR 1 [file LIG.itp, line 397]:
  No default Position Rest. types

ERROR 2 [file LIG.itp, line 398]:
  No default Position Rest. types

ERROR 3 [file LIG.itp, line 399]:
  No default Position Rest. types

ERROR 4 [file LIG.itp, line 400]:
  No default Position Rest. types

ERROR 5 [file LIG.itp, line 401]:
  No default Position Rest. types

ERROR 6 [file LIG.itp, line 402]:
  No default Position Rest. types

ERROR 7 [file LIG.itp, line 403]:
  No default Position Rest. types

ERROR 8 [file LIG.itp, line 404]:
  No default Position Rest. types

ERROR 9 [file LIG.itp, line 405]:
  No default Position Rest. types

ERROR 10 [file LIG.itp, line 406]:
  No default Position Rest. types

ERROR 11 [file LIG.itp, line 407]:
  No default Position Rest. types

ERROR 12 [file LIG.itp, line 408]:
  No default Position Rest. types

ERROR 13 [file LIG.itp, line 409]:
  No default Position Rest. types

ERROR 14 [file LIG.itp, line 410]:
  No default Position Rest. types

ERROR 15 [file LIG.itp, line 411]:
  No default Position Rest. types

ERROR 16 [file LIG.itp, line 412]:
  No default Position Rest. types

ERROR 17 [file LIG.itp, line 413]:
  No default Position Rest. types

ERROR 18 [file LIG.itp, line 414]:
  No default Position Rest. types

ERROR 19 [file LIG.itp, line 415]:
  No default Position Rest. types

ERROR 20 [file ETOH.itp, line 87]:
  No default Position Rest. types

ERROR 21 [file ETOH.itp, line 88]:
  No default Position Rest. types

ERROR 22 [file ETOH.itp, line 89]:
  No default Position Rest. types

Excluding 3 bonded neighbours molecule type 'LIG'
turning H bonds into constraints...
Excluding 3 bonded neighbours molecule type 'ETOH'
turning H bonds into constraints...
Excluding 2 bonded neighbours molecule type 'TIP3'
turning H bonds into constraints...
Removing all charge groups because cutoff-scheme=Verlet

-------------------------------------------------------
Program gmx grompp, VERSION 5.1.4
Source code file: /scratch/scsjh/build/gromacs/5.1.4/default/gromacs-5.1.4/src/gromacs/gmxpreprocess/grompp.c, line: 1738

Fatal error:
There were 22 errors in input file(s)
For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------

```

However, the .itp files for PQS and Ethanol do contain position restraints at the end of their files (see below for ethanol’s .itp end of file).

```
#ifdef POSRES
[position_restraints]
    1 1 POSRES_FC_BB POSRES_FC_BB POSRES_FC_BB   
    2 1 POSRES_FC_BB POSRES_FC_BB POSRES_FC_BB   
    6 1 POSRES_FC_BB POSRES_FC_BB POSRES_FC_BB   
#endif

```

Is there a reason these position restraints cannot be considered by GROMACS. Any help would be appreciated.

P.S., removing the hash symbols on the “if” and “endif” surrounding the restraints led to the sam problem.

Κίind Regards,  
I\_Noble

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [September 21, 2024, 9:15am UTC](https://gromacs.bioexcel.eu/t/gromacs-cannot-identify-position-restraints-given-in-topper-directory-for-some-molecules/10202/2 "2024-09-21T09:15:14Z")

</div>

I think the problem might be that you have not defined `POSRES_FC_BB`, so you haven’t actually defined the restraints - just said that they should exist. The error you get shows that it cannot find them define elsewhere (i.e., no default restraints can be found).

Does it work if you add `-DPOSRES_FC_BB=1000` to the `define` settings in the mdp file?

---

<div class="post-metadata">

**Author:** ![I\_Noble](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@I\_Noble](https://gromacs.bioexcel.eu/u/I_Noble)\
**Post date:** [September 23, 2024, 10:38pm UTC](https://gromacs.bioexcel.eu/t/gromacs-cannot-identify-position-restraints-given-in-topper-directory-for-some-molecules/10202/3 "2024-09-23T22:38:21Z")

</div>

> [@MagnusL](#):
>
> `-DPOSRES_FC_BB=1000`

Hello MagnusL,

Thank you for your help. Specifying `-DPOSRES_FC_BB` in the `.mdp` file as you had described allowed me to progress further than I had done before.

Unfortunately, I ran into another error whilst trying to construct the `.tpr` file with `gmx grompp`. According to the output, GROMACS was unable to recognise the `tc-grps` provided in the `.mdp` file. Whilst I was able to resolve this by differentiating my system’s ligand (LIG) and solvent molecules (ETOH/TIP3) within a newly constructed `.ndx` file, the set-up remains unsuccesful due to there being the following warnings:

```
WARNING 1 [file LIG.itp, line 395]:
   Too few parameters on line (source file
   /scratch/scsjh/build/gromacs/5.1.4/default/gromacs5.1.4/src/gromacs/gmxpreprocess/toppush.c, line 1790)
WARNING 2 [file LIG.itp, line 416]:
   Too few parameters on line (source file
   /scratch/scsjh/build/gromacs/5.1.4/default/gromacs5.1.4/src/gromacs/gmxpreprocess/toppush.c, line 1790)

```

GROMACS provides the suggestion that I can ignore these warnings by adding the argument `-maxwarn` to `gmx grompp`. Please could I check with you the meaning of these warnings?

Kind regards,  
I\_Noble

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [September 24, 2024, 5:37am UTC](https://gromacs.bioexcel.eu/t/gromacs-cannot-identify-position-restraints-given-in-topper-directory-for-some-molecules/10202/4 "2024-09-24T05:37:47Z")

</div>

First, I would argue that in most cases (there are definitely exceptions) you don’t need separate temperature coupling groups anyhow. I know that it is very popular to divide the system into small temperature coupling groups, but as long as there is temperature exchange between them it should not be necessary. A separate temperature coupling group for a ligand in solvent is not necessary.

Anyhow, the warning message gives you a reasonable clear indication where there are problems, lines 395 and 416 in LIG.itp. I would recommend looking at those lines and reading the manual (for GROMACS 5.1.4) for how the force field parameters should be specified. I would not recommend ignoring warnings unless you are really sure that it is a good idea in your case.
