# Applying distance constraints to ligand and Mg ion

**URL:** https://gromacs.bioexcel.eu/t/applying-distance-constraints-to-ligand-and-mg-ion/540
**Category:** User discussions
**Created:** [July 20, 2020, 1:57pm UTC](https://gromacs.bioexcel.eu/t/applying-distance-constraints-to-ligand-and-mg-ion/540 "2020-07-20T13:57:11Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![joshhayden](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@joshhayden](https://gromacs.bioexcel.eu/u/joshhayden)
#### Post date: [July 20, 2020, 6:40pm UTC](https://gromacs.bioexcel.eu/t/applying-distance-constraints-to-ligand-and-mg-ion/540/5 "2020-07-20T18:40:35Z")

</div>

I see, thank you.

Do you think that these pull code options in my md.mdp would suffice? The Mg ion is a\_10900 and the ligand oxygen is a\_10908.

; Pull code  
pull = yes  
pull-ngroups = 2  
pull-ncoords = 1  
pull-group1-name = a\_10908  
pull-group2-name = a\_10900  
pull-coord1-type = umbrella  
pull-coord1-geometry = distance ; simple distance increase  
pull-coord1-groups = 1 2  
pull-coord1-dim = Y Y Y  
pull-coord1-rate = 0.0 ; not pull, just distance restraint at a reference  
distance bw 2 groups  
pull-coord1-k = 1000 ; kJ mol^-1 nm^-2  
pull-coord1-start = yes ; define initial COM distance \> 0  
pull-nstxout = 5000  
pull-nstfout = 5000

---

_[View the full topic](https://gromacs.bioexcel.eu/t/applying-distance-constraints-to-ligand-and-mg-ion/540)._
