# Pull Code for Umbrella Sampling: Choosing atom as group

**URL:** <https://gromacs.bioexcel.eu/t/pull-code-for-umbrella-sampling-choosing-atom-as-group/6980>\
**Category:** User discussions\
**Tags:** umbrella-sampling\
**Created:** [August 7, 2023, 5:42pm UTC](https://gromacs.bioexcel.eu/t/pull-code-for-umbrella-sampling-choosing-atom-as-group/6980 "2023-08-07T17:42:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![istewart\_mit](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/istewart_mit/32/2920_2.png) [@istewart\_mit](https://gromacs.bioexcel.eu/u/istewart_mit)\
**Post date:** [August 7, 2023, 5:42pm UTC](https://gromacs.bioexcel.eu/t/pull-code-for-umbrella-sampling-choosing-atom-as-group/6980/1 "2023-08-07T17:42:33Z")

</div>

GROMACS version: 2018.4  
GROMACS modification: No

I am using the umbrella sampling tutorial and I have a question:  
I’m wondering if there is a way to specify an atom in a group rather than a whole group in the pull-code? For example, I am interested in a ligand binding to a surface atom of a metal-oxide slab (instead of looking at its distance to the center of mass of the slab)

How would I modify this:  
; Pull code  
pull = yes  
pull\_ncoords = 1 ; only one reaction coordinate  
pull\_ngroups = 2 ; two groups defining one reaction coordinate  
pull\_group1\_name = Chain\_A  
pull\_group2\_name = Chain\_B  
pull\_coord1\_type = umbrella ; harmonic potential  
pull\_coord1\_geometry = distance ; simple distance increase  
pull\_coord1\_dim = N N Y ; pull along z  
pull\_coord1\_groups = 1 2 ; groups 1 (Chain A) and 2 (Chain B) define the reaction coordinate  
pull\_coord1\_start = yes ; define initial COM distance \> 0  
pull\_coord1\_rate = 0.01 ; 0.01 nm per ps = 10 nm per ns  
pull\_coord1\_k = 1000 ; kJ mol^-1 nm^-2

---

<div class="post-metadata">

**Author:** ![Karis](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@Karis](https://gromacs.bioexcel.eu/u/Karis)\
**Post date:** [August 9, 2023, 3:56am UTC](https://gromacs.bioexcel.eu/t/pull-code-for-umbrella-sampling-choosing-atom-as-group/6980/2 "2023-08-09T03:56:37Z")

</div>

You can use gmx make\_ndx to define your own groups in an index file. You can define a group containing only 1 atom, and as long as the index file is included in the commands, you will be able to use it in the mdp file.

---

<div class="post-metadata">

**Author:** ![NUAA](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@NUAA](https://gromacs.bioexcel.eu/u/NUAA)\
**Post date:** [June 24, 2024, 1:02pm UTC](https://gromacs.bioexcel.eu/t/pull-code-for-umbrella-sampling-choosing-atom-as-group/6980/3 "2024-06-24T13:02:43Z")

</div>

pull\_coord1\_k = 1000，what does it mean？Could I see it as elastic constant，THanks

---

<div class="post-metadata">

**Author:** ![Karis](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@Karis](https://gromacs.bioexcel.eu/u/Karis)\
**Post date:** [June 24, 2024, 2:47pm UTC](https://gromacs.bioexcel.eu/t/pull-code-for-umbrella-sampling-choosing-atom-as-group/6980/4 "2024-06-24T14:47:37Z")

</div>

Yes, in the case where pull\_coord1\_type is set to umbrella, this is the force constant to the harmonic potential (see [Molecular dynamics parameters (.mdp options) — GROMACS 2018 documentation](https://manual.gromacs.org/documentation/2018/user-guide/mdp-options.html#mdp-pull-coord1-k))
