Periodic boundary for Flat-bottomed position restraints

GROMACS version: 2023.3
GROMACS modification: No
Hi,
I am using flat-bottomed position restraints to constrain all atoms within a cylinder of radius r. I used the Not inverted method, so r is a positive value, and the system is fixed at the center. However, I’m not sure how GROMACS handles this restraint potential in a periodic boundary box. Can anyone help clarify this?
[ position_restraints ]
; id funct g r k
1 2 8 2.0 10000
The guidelines I followed, Restraints - GROMACS 2024 documentation and Methodology for flat-bottomed position restraints .

Hi @xudi22

What do you mean specifically? The cylinder will be most likely defined by some combination of positions that you provide to GROMACS with the -r flag, depending on what you are restraining. Then when the forces are calculated there will be an additional force on those atoms that you are restraining which depends on where they are with respect to the cylinder. These positions will be corrected for PBCs, so the “absolute” position doesn’t matter, only the one relative to the cylinder.

Thank you very much!
When setting the radius, they always mention using negative values, but I used positive numbers instead. I’m wondering if they actually work the same way.
I now realize they are consistent—it’s just the positioning setup that differs. The PBCs works as usual.

I think the radius sign is really just to have a compact way of representing both states of a cylinder restraint, that is, push in or push out. With one you get a potential wall that confines inside, with the other one that confines outside - in both cases the radius of the cylinder is still the absolute value or the r you use, irrespective of whatever PBC setup you have! :)