# Define position restraints in mdp

**URL:** <https://gromacs.bioexcel.eu/t/define-position-restraints-in-mdp/1176>\
**Category:** User discussions\
**Created:** [December 1, 2020, 10:25am UTC](https://gromacs.bioexcel.eu/t/define-position-restraints-in-mdp/1176 "2020-12-01T10:25:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amnah](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@amnah](https://gromacs.bioexcel.eu/u/amnah)\
**Post date:** [December 1, 2020, 10:25am UTC](https://gromacs.bioexcel.eu/t/define-position-restraints-in-mdp/1176/1 "2020-12-01T10:25:50Z")

</div>

GROMACS version: 2020  
GROMACS modification: Yes/No  
Here post your question

Dear GROMACS user  
How to define the position restrain constant in the .mdp file? For example, I want to run NVT simulation at 100 kcal/mol so I chose -DPOSRES to FC=418 KJ which is equal to 100kcal and I also changed the topol.top to include -DPOSRES\_FC is that correct? I am not sure if this method is correct or no

Thank you

; Preprocessing  
define = -DPOSRES -DPOSRES\_FC=418 ; position restrain the protein

; Run Control  
integrator = md ; leap-frog integrator  
dt = 0.002 ; [ps] time step for integration 2fs  
nsteps = 10000 ; 2 \* 10000 = 20 ps

---

<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:** [December 1, 2020, 6:11pm UTC](https://gromacs.bioexcel.eu/t/define-position-restraints-in-mdp/1176/2 "2020-12-01T18:11:20Z")

</div>

If your topology makes use of a keyword `POSRES_FC`, then yes, this is correct.
