# How to apply position restrain on one molecule in umbrella sampling?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-apply-position-restrain-on-one-molecule-in-umbrella-sampling/3429>\
**Category:** User discussions\
**Tags:** forcefield\
**Created:** [January 9, 2022, 11:05am UTC](https://gromacs.bioexcel.eu/t/how-to-apply-position-restrain-on-one-molecule-in-umbrella-sampling/3429 "2022-01-09T11:05:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bappa](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@Bappa](https://gromacs.bioexcel.eu/u/Bappa)\
**Post date:** [January 9, 2022, 11:05am UTC](https://gromacs.bioexcel.eu/t/how-to-apply-position-restrain-on-one-molecule-in-umbrella-sampling/3429/1 "2022-01-09T11:05:26Z")

</div>

GROMACS version: 2021.4  
GROMACS modification: Yes/No  
Hi all,  
In umbrella sampling, We try to extract the potential of mean force (PMF) by adding a center-of-mass (COM) pulling (in pull code) between two identical types of molecules. I want to restrain the position of one molecule, whereas the second molecule will be free to move.  
Can you please help how I can do that?

Thank you for your responses in advance.

Kind regards,  
Bappaditya

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [January 9, 2022, 1:48pm UTC](https://gromacs.bioexcel.eu/t/how-to-apply-position-restrain-on-one-molecule-in-umbrella-sampling/3429/2 "2022-01-09T13:48:21Z")

</div>

Since restraints are applied on the topology level, you need to have two copies of the same `[moleculetype]` and assign them different names. Then you can apply restraints within one of those `[moleculetype]` entries.

---

<div class="post-metadata">

**Author:** ![Bappa](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@Bappa](https://gromacs.bioexcel.eu/u/Bappa)\
**Post date:** [January 24, 2022, 1:08pm UTC](https://gromacs.bioexcel.eu/t/how-to-apply-position-restrain-on-one-molecule-in-umbrella-sampling/3429/3 "2022-01-24T13:08:34Z")

</div>

Thank you for your valuable reply.
