# Relaxing a harmonic restraint using restraint-lambda

**URL:** <https://gromacs.bioexcel.eu/t/relaxing-a-harmonic-restraint-using-restraint-lambda/7052>\
**Category:** User discussions\
**Tags:** mdp-parameters, free-energy, restraints, simulation-setup\
**Created:** [August 22, 2023, 3:11am UTC](https://gromacs.bioexcel.eu/t/relaxing-a-harmonic-restraint-using-restraint-lambda/7052 "2023-08-22T03:11:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xywang181](https://avatars.discourse-cdn.com/v4/letter/x/b19c9b/32.png) [@xywang181](https://gromacs.bioexcel.eu/u/xywang181)\
**Post date:** [August 22, 2023, 3:11am UTC](https://gromacs.bioexcel.eu/t/relaxing-a-harmonic-restraint-using-restraint-lambda/7052/1 "2023-08-22T03:11:41Z")

</div>

GROMACS version: 2023  
GROMACS modification: No

Dear GROMACS users,

I want to calculate the free energy (alchemical) of relaxing a harmonic potential in a molecule. The restraint between two atoms will force the molecule to stay at one conformation, while gradually relaxing the harmonic potential will let the molecule convert into another conformation.

After I searched the manual and the forum, I think I should use restraint potential (type 10) in the “bonds” section:

[bonds]  
; a1 a2 funct lowA up1A up2A kA lowB up1B up2B kB  
1 2 10 2.8 2.8 2.8 100000 2.8 2.8 2.8 0

Then, define the “bonded-lambdas” in mdp file to propagate lambda windows:  
1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0

Please let me know whether I am doing this right or wrong. Any suggestions are appreciated.
