# POSRES in membrane-drug simulation

**URL:** https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318
**Category:** User discussions
**Created:** [June 6, 2024, 5:47am UTC](https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318 "2024-06-06T05:47:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Elahe](https://avatars.discourse-cdn.com/v4/letter/e/e68b1a/32.png) [@Elahe](https://gromacs.bioexcel.eu/u/Elahe)
#### Post date: [June 6, 2024, 5:47am UTC](https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318/1 "2024-06-06T05:47:57Z")

</div>

Hi all dear  
I want to do drug-membrane simulation in gromacs. I use this command and I insert my drug:  
gmx insert-molecules -f md.gro -nmol 1 -ci drug.pdb -o complex.gro -ip positions.dat -replace  
In nvt step, I have an error:

**Error 1 [file DOPE.itp, Line 1211]:**  
**Incorrect number of parameters - found 2, expected 3 or 6 for positions rest. (after function type)**

In the nvt.mdp file I have this line:  
define = -DPOSRES POSRES\_FC\_LIPID=1000.0

I made changes in the DOPE.itp and nvt.mdp files. In DOPE. itp I added a parameter:  
11 1 0.0 **0.0** 0.0 POSRES\_FC\_LIPID  
In the nvt. mdp file, I changed **1000.0 to 100.0**  
But I don’t know, if these changes are correct or not.

The value of the number we put in front of -DPOSRES is 100 or 1000, etc., on what basis are they determined?

The DOPE.itp file is attached.  
I would be happy to know your opinions and get your advice. I’m thankful if you guide me on how I can solve this problem.

[DOPE.txt](https://gromacs.bioexcel.eu/uploads/short-url/crd5C7I9tZEEJIwRFTxwl3NGifJ.txt) (35.7 KB)

---

<div class="post-metadata">

### Author: ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)
#### Post date: [June 8, 2024, 1:26pm UTC](https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318/2 "2024-06-08T13:26:18Z")

</div>

Dear @Elahe ,

I think you have two problems. First, you write

```auto
11 1 0.0 0.0 0.0 POSRES_FC_LIPID

```

but this restraint the restraint should have the atom number you are applying it to (`11`), the type (`1`) and three values for x,y,z. You can use numbers or variables that you define in the .mdp file. Here you are using a variable, `POSRES_FC_LIPID`, which per se is fine, but you have one number too much, since you have three zeroes and then the variable. The line should look something like this

```auto
11 1 0.0 0.0 POSRES_FC_LIPID

```

which means that you are restraining with respect to z (x and y components are 0.0) the atom 11 by a force constant `POSRES_FC_LIPID`. Differently from what you wrote here in the forum, the .itp file you upload is correct, that is, it has the correct number of parameters, but double check nevertheless.

The other problem is that you have to use the `-D` flag also for the definition of the variables. As such, your line in the .mdp file becomes:

```auto
define = -DPOSRES -DPOSRES_FC_LIPID=1000.0

```

Regarding the value, I guess 1000 kJ/mol is not really linked to anything specific, but rather it is a big number that tells you that the atoms can be considered nearly fixed at the chosen position. Generally, during the equilibration phases, these values are decreased progressively to let the system relax and avoid sharp conformational changes that may happen in the first steps due to protein-solvent/protein-lipid/etc interactions.

---

<div class="post-metadata">

### Author: ![Elahe](https://avatars.discourse-cdn.com/v4/letter/e/e68b1a/32.png) [@Elahe](https://gromacs.bioexcel.eu/u/Elahe)
#### Post date: [June 9, 2024, 4:10am UTC](https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318/3 "2024-06-09T04:10:32Z")

</div>

Thank you  
I used  
11 1 0.0 0.0 POSRES\_FC\_LIPID  
in the itp file and  
define = -DPOSRES -DPOSRES\_FC\_LIPID=1000.0  
in the first line of the mdp file but I still get this error:

Error 1 [file DOPE.itp, Line 1211]:  
Incorrect number of parameters - found 2, expected 3 or 6 for positions rest. (after function type)

I am uncertain of how to resolve this issue and would be grateful for your advice. Thank you

---

<div class="post-metadata">

### Author: ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)
#### Post date: [June 10, 2024, 8:17am UTC](https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318/4 "2024-06-10T08:17:06Z")

</div>

Both the DOPE.itp file and the flags in the .mdp file seem good to me. Are you sure you are not triggering some other `POSRES` related flags? For example, do you have other lipid types or other molecules that contain a

```auto
#ifdef POSRES
[position_restraints]
...
...
#endif

```

section?

---

<div class="post-metadata">

### Author: ![Elahe](https://avatars.discourse-cdn.com/v4/letter/e/e68b1a/32.png) [@Elahe](https://gromacs.bioexcel.eu/u/Elahe)
#### Post date: [June 10, 2024, 5:00pm UTC](https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318/5 "2024-06-10T17:00:18Z")

</div>

I have 4 types of lipids and I get this error for all 4 of them. These are CHARMM-GUI output.  
In Topol file, I include these files, and the first of them is DOPE I received the mentioned error. I received the same error when I put another lipid in the first line like DOPC.

---

<div class="post-metadata">

### Author: ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)
#### Post date: [June 12, 2024, 1:52pm UTC](https://gromacs.bioexcel.eu/t/posres-in-membrane-drug-simulation/9318/6 "2024-06-12T13:52:59Z")

</div>

Check the topology files for all the component in your system and, there, check if you are activating some position restraints with the `POSRES` flag. I think you might be missing some parameters in those restraints.
