# Scaling position restraints with restraint-lambdas

**URL:** https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462
**Category:** User discussions
**Tags:** mdp-parameters, free-energy, restraints
**Created:** [January 11, 2022, 6:07pm UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462 "2022-01-11T18:07:01Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![tug27224](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tug27224](https://gromacs.bioexcel.eu/u/tug27224)
#### Post date: [January 11, 2022, 6:07pm UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/1 "2022-01-11T18:07:02Z")

</div>

GROMACS version: 2020.3  
GROMACS modification: No

I am attempting to restrain the orientation of a small molecule using three position restraints that span the ligand and to scale these restraints from 0-800 kJ mol-1 nm-2 using restraint-lambdas in order to compute the free energy of coupling the restraints.  
After first using [position\_restraints] in the ligand topology and seeing that restraint-lambdas “only the restraint interactions: dihedral restraints, and the pull code restraints are controlled with this component of the lambda vector,” I opted to define three pull groups between each of the ligand atoms and a super-imposed, frozen dummy atom.  
However, the restraint-lambdas still have no effect on de-coupling these restraints.  
I saw a post recently: [https://gromacs.bioexcel.eu/t/restraints-with-fep/2109](https://gromacs.bioexcel.eu/t/restraints-with-fep/2109) that seems to be attempting a similar protocol, but they also had no success implementing restraint-lambdas.  
Am I missing a crucial mdp parameter or topology definition?

---

<div class="post-metadata">

### Author: ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)
#### Post date: [January 13, 2022, 12:46pm UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/2 "2022-01-13T12:46:28Z")

</div>

The position restraint force constant should be coupled by the restraint lambda. Have you provides values 0 for the A state and values 800 for the B state in the topology file?

---

<div class="post-metadata">

### Author: ![tug27224](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tug27224](https://gromacs.bioexcel.eu/u/tug27224)
#### Post date: [January 13, 2022, 5:01pm UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/3 "2022-01-13T17:01:43Z")

</div>

Ah, I had assumed that lambda 1.0 would simply use the k defined by pull-coord1-k in the pull code and other lambdas would scale this linearly.  
Am I able to use standard position restraints instead of pull code and then add A and B force constants in the [position\_restraints] section of the topology? e.g.

[position\_restraints]  
; ai funct fcxA fcyA fczA fcxB fcyB fczB  
53 1 0 0 0 1000 1000 1000

Otherwise, I’m unable to find the relevant documentation in the manual.

---

<div class="post-metadata">

### Author: ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)
#### Post date: [January 14, 2022, 9:03am UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/4 "2022-01-14T09:03:54Z")

</div>

Exactly!

---

<div class="post-metadata">

### Author: ![tug27224](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tug27224](https://gromacs.bioexcel.eu/u/tug27224)
#### Post date: [January 14, 2022, 4:25pm UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/5 "2022-01-14T16:25:13Z")

</div>

Great, thank you!  
I may also try scaling COM distance restraints between two index groups using the pull code in the future.  
Is there also a way to couple restraint-lambdas to those?

---

<div class="post-metadata">

### Author: ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)
#### Post date: [January 17, 2022, 10:55am UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/6 "2022-01-17T10:55:57Z")

</div>

The lambda in the pull code is part of the restraint lambda group.

---

<div class="post-metadata">

### Author: ![s.pallav](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/s.pallav/32/1099_2.png) [@s.pallav](https://gromacs.bioexcel.eu/u/s.pallav)
#### Post date: [July 20, 2023, 3:12pm UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/7 "2023-07-20T15:12:57Z")

</div>

Wouldn’t fep-lambdas take care of all of the other options?

---

<div class="post-metadata">

### Author: ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)
#### Post date: [July 24, 2023, 2:03pm UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/8 "2023-07-24T14:03:52Z")

</div>

I don’t understand your question.

---

<div class="post-metadata">

### Author: ![s.pallav](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/s.pallav/32/1099_2.png) [@s.pallav](https://gromacs.bioexcel.eu/u/s.pallav)
#### Post date: [July 25, 2023, 3:52am UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/9 "2023-07-25T03:52:15Z")

</div>

What I mean to say is that wouldn’t fep-lambdas override all the options?  
If and if only I use fep-lambdas specifically.  
or do I need to specifically use coul-lambdas and vdw-lambdas or in this case restraint-lambdas?

---

<div class="post-metadata">

### Author: ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)
#### Post date: [July 25, 2023, 10:25am UTC](https://gromacs.bioexcel.eu/t/scaling-position-restraints-with-restraint-lambdas/3462/10 "2023-07-25T10:25:21Z")

</div>

Yes, you can use only fep-lambdas to control all components at once.
