How to apply Flat Bottom Position Restrains to 8 peptides

GROMACS version: 2021.5
GROMACS modification: No

Hello,

I need to simulate the interaction of 8 identical peptides with a lipidic membrane. But I have to make sure they only interact with one monolayer, i.e I have to keep them in the upper half of the simulation box only with respect to the z coordinate, also I don’t want to lock the peptides in a z coordinate I just don’t want the periodic images to cross to the other side. I was told to use flat bottom position restraints to restrain the peptides to some z coordinates. But I can’t find any usage example in the gromacs website, and the information in the forum is insufficient to understand how to use it.

I found the following here in the forums,

[ position_restraints ]
; i funct g r k
1 2 5 0.5 1000

But I don’t quite understand, I believe that g is the type of spatial restriction and ris the reference position, while k is the applied force if the molecule crosses the barrier. But how could r be the reference position if it’s only one number? How can I set a maximum z coordinate to restrict my peptides to? Do I have to do it only for the molecule in the topology just like the regular position restraints or do I have to define the restraints 8 times?

Any help will be really appreciated

So I guess there is no answer to this?

I have a similar question, I want to confine atoms to a sphere. In all the documentation I can see only how to define the force constant and the radius, but NOWHERE do I see any way to specify the reference position. Is it just the origin?

Thanks in advance,
Randy

The reference position is provided with a structure file via the flag -r when you produce the .tpr file with gmx grompp, as reported here. So, suppose you define a spherical position restraint for the atom 1C and set radius to 1.0nm and 1000 as force constant, that atom will be confined in a sphere of radius 1nm centered at the position (x,y,z) of the atom 1C reported in the -r file with a spring with force constant 1000.

OK, so if all the atoms are confined in a SINGLE spherical volume, then the reference file would have the sphere center repeated as reference position for every atom?

Thanks !

Yes, exactly. If you want to keep every molecule of a certain type within a sphere centered in X,Y,Z then I would modify the topology of that molecule to include the constraints and write a script that takes a structure file (e.g. .gro file) and modifies the coordinates of all the entries of that molecule type with the wanted X,Y,Z, and then compile the .tpr file passing this modified file with the -r flag.