POSRES in membrane-drug simulation

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 (35.7 KB)

Dear @Elahe ,

I think you have two problems. First, you write

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

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:

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.

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

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

#ifdef POSRES
[ position_restraints ]


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.

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.