# Simple Pulling script 1D 1 group

**URL:** https://gromacs.bioexcel.eu/t/simple-pulling-script-1d-1-group/12100
**Category:** User discussions
**Tags:** pull-code
**Created:** [May 17, 2025, 10:35am UTC](https://gromacs.bioexcel.eu/t/simple-pulling-script-1d-1-group/12100 "2025-05-17T10:35:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lazzari26](https://avatars.discourse-cdn.com/v4/letter/l/9f8e36/32.png) [@lazzari26](https://gromacs.bioexcel.eu/u/lazzari26)
#### Post date: [May 17, 2025, 10:35am UTC](https://gromacs.bioexcel.eu/t/simple-pulling-script-1d-1-group/12100/1 "2025-05-17T10:35:06Z")

</div>

I always struggled in finding a good algorithm for pulling in GROMACS, the tool is good but the documentation is awful.  
Here I’m just sharing a good script that work for pulling in 1 dimension (x-axis), with a constant force, just one group (WATER) in relation to the simulation box, with periodic boundary conditions (pbc).

; ---------- constant‑force pulling (one coordinate) ----------  
pull = yes  
pull-ncoords = 1 ; one reaction coordinate  
pull-ngroups = 1 ; one group is enough – reference is the box  
pull-group1-name = WATER ; must match the name in index.ndx

; What type of force?  
pull-coord1-type = constant-force ; linear potential → constant F

; Geometry: along a fixed vector that respects PBC  
pull-coord1-geometry = direction-periodic  
pull-coord1-groups = 1 0 ; WATER vs. absolute reference  
pull-coord1-vec = 1 0 0 ; +x  
pull-coord1-dim = Y N N ; only x component is active

; Magnitude of the force (kJ mol⁻¹ nm⁻¹)  
; k (mdp units) = F(pN) = F(10-12N)/ 1.66054  
pull-coord1-k = 300 ; ≈ 500 pN on the COM

pull-pbc-ref-prev-step-com = yes  
pull-group1-pbcatom = 17996 ; reference atom from the WATER group  
; this helps with the size of the box problem for PBC

pull-coord1-start = yes ; take current COM as zero  
pull-print-ref-values = yes ; handy for analysis  
; ---------------------------------------------------------------

Hopes it can help anyone…
