# How to pull ligand in negative/opposite direction of axis?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060>\
**Category:** User discussions\
**Created:** [May 5, 2024, 6:13am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060 "2024-05-05T06:13:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 5, 2024, 6:13am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/1 "2024-05-05T06:13:34Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question I want to pull the ligand from protein in negative y axis. I have also made changes in script and added pullvec coordinates as 0 -1 0 but still it  
[pull.mdp](https://gromacs.bioexcel.eu/uploads/short-url/8Mte9V20RvZ8NAoeSsYTeAuiVfq.mdp) (2.1 KB)  
s pulling positive direction of axis. What could be the solution?

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [May 5, 2024, 7:58am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/2 "2024-05-05T07:58:53Z")

</div>

Hello @Manish ,

You are using

```auto
pull_coord1_geometry = distance 

```

which, as per the [manual](https://manual.gromacs.org/documentation/current/user-guide/mdp-options.html#mdp-pull-coord1-geometry), requires the definition of `pull-coord1-dim`. As such, in your .mdp file you require the following

```auto
pull_coord1_dim = N Y N
pull-coord1-vec = 0 -1 0  
pull_coord1_rate = 0.01

```

but the second one is not required and is not used, so you are asking for dragging along the y axis (`pull_coord1_dim = N Y N`) with a positive speed (`pull_coord1_rate = 0.01`), and so you have an increase of the y axis distance of the two groups. Just switch the speed to a negative value, e.g. -0.01, and you should be fine!

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 6, 2024, 2:22am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/3 "2024-05-06T02:22:50Z")

</div>

Sir, I did what you said in your answer and got this error.  
**Fatal error:**  
**Pull reference distance for coordinate 1 (-0.000011) needs to be non-negative**

**pull.mdp**  
pull\_ncoords = 1 ; only one reaction coordinate  
pull\_ngroups = 2 ; two groups defining one reaction coordinate  
pull\_group1\_name = Protein\_&_r\_885_&\_N  
pull\_group2\_name = UNK  
pull\_coord1\_type = umbrella ; harmonic potential  
pull\_coord1\_geometry = distance ; simple distance increase  
pull\_coord1\_dim = N Y N  
pull-coord1\_vec = 0 -1 0  
pull\_coord1\_groups = 1 2  
pull\_coord1\_start = yes ; define initial COM distance \> 0  
pull\_coord1\_rate = -0.01 ; 0.01 nm per ps = 1 nm per ns  
pull\_coord1\_k = 1000 ; kJ mol^-1

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [May 6, 2024, 7:25am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/4 "2024-05-06T07:25:05Z")

</div>

This happens because the pull coordinate geometry distance is not happy with negative defined distances. I think you can by-pass this (if you know you are pulling towards negative distances) by changing the geometry type:

```auto
pull_ncoords = 1
pull_ngroups = 2
pull_group1_name = Protein_&r_885&_N
pull_group2_name = UNK
pull_coord1_type = umbrella
pull_coord1_geometry = direction
pull-coord1_vec = 0 1 0
pull_coord1_groups = 1 2
pull_coord1_start = yes
pull_coord1_rate = -0.01
pull_coord1_k = 1000

```

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 6, 2024, 8:42am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/5 "2024-05-06T08:42:09Z")

</div>

sir did this but it is still pulling towards y axis positive side

also giving the same error

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 6, 2024, 9:57am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/6 "2024-05-06T09:57:03Z")

</div>

Are you still (as in the input you posted above) using the input values you posted above?

```auto
pull-coord1_vec = 0 -1 0
...
pull_coord1_rate = -0.01 ; 0.01 nm per ps = 1 nm per ns

```

If both are negative you will be pulling in the positive direction.

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 7, 2024, 5:00am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/7 "2024-05-07T05:00:02Z")

</div>

sir it worked when I removed pull dim and only implemented pull rate. But now it is showing **negative pulling force**. How can a force be negative as if added spring force to 1000 kJ/mol/nm. If this is possible how to interpret this.  
 ![Screenshot 2024-05-07 102449](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/1/1397bd237b55f52e068dad27ce716706da29b4c9.png)

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 7, 2024, 6:05am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/8 "2024-05-07T06:05:56Z")

</div>

Could you post the settings you are using again? Since there have been a few iterations, it is difficult to know exactly the settings of your last plot.

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 7, 2024, 6:29am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/9 "2024-05-07T06:29:25Z")

</div>

Sir, I have attached the pull.mdp file i am using and after simulation to view the file i just entered xmgrace pull.xvg.

[pull.mdp](https://gromacs.bioexcel.eu/uploads/short-url/buq60sqFEZGoJoMIEmVGVQQ6zYp.mdp) (2 KB)

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 7, 2024, 7:02am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/10 "2024-05-07T07:02:14Z")

</div>

Pulling along a positive vector with a negative rate will give a negative force (along the vector).

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 7, 2024, 7:19am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/11 "2024-05-07T07:19:48Z")

</div>

ok sir, but I have read papers and haven’t found any results with such negative pulling force. Therefore I am confused about whether it is correct or not. Can you please suggest some solution to this.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 7, 2024, 7:45am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/12 "2024-05-07T07:45:17Z")

</div>

It’s just a matter of interpretation in this case. But try with a negative vector and a positive rate instead. Unless I’m mistaken, that should give you a positive force.

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 8, 2024, 4:21am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/13 "2024-05-08T04:21:27Z")

</div>

Thank you sir, my problem solved with this solution. I tried removing pull-dim, adding pull-vrc= 0 -1 0 and pull rate = 0.01 , it worked and gave positive force with -y pull.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 8, 2024, 6:57am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/14 "2024-05-08T06:57:56Z")

</div>

Great that it helped.

---

<div class="post-metadata">

**Author:** ![com\_gro](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@com\_gro](https://gromacs.bioexcel.eu/u/com_gro)\
**Post date:** [May 10, 2024, 2:04pm UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/15 "2024-05-10T14:04:38Z")

</div>

You can also use the following:  
; Define pull coordinates  
pull-coord1-type = umbrella ; umbrella  
pull-coord1-groups = 0 1 ; 0 for absolute reference, 1 for the atom  
pull-coord1-geometry = direction ; Pulling in a specified direction  
**pull-coord1-dim = N Y N ; Pulling only in Y direction**  
pull-coord1-start = yes ; Start from the initial configuration  
**pull-coord1-vec = 0 1 0 ; Direction vector for pulling (along Y-axis)**  
pull\_coord1\_rate = 0.01 ; 0.08 nm per ps = 80 nm per ns  
pull\_coord1\_k = 3 ; kJ mol^-1 nm^-2

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 10, 2024, 3:04pm UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/16 "2024-05-10T15:04:31Z")

</div>

Thank sir (com\_gro) but we tried this approach but didn’t worked.

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 12, 2024, 8:33am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/17 "2024-05-12T08:33:34Z")

</div>

Hello sir , when I am pulling the ligand out from protein, using

pull-coord1-geometry = distance  
pull-coord1-dim = N Y N  
pull-coord1-start = yes  
pull\_coord1\_rate = 0.01 ;  
pull\_coord1\_k = 1000

**the protein is not revolving with pulling, which is good with restrain**

but when I am using…

pull-coord1-geometry = direction  
pull-coord1-start = yes  
pull-coord1-vec = 1 0 0  
pull\_coord1\_rate = 0.01 ; 0.08 nm per ps = 80 nm per ns  
pull\_coord1\_k = 1000; kJ mol^-1 nm^-2

Protein is also revolving with the pulling which is not restaining the protein.

please help to resolve

Attached Pull.mdp  
[pull.mdp](https://gromacs.bioexcel.eu/uploads/short-url/zw0xoBkpa23aLJ0wJjPNxzaLILU.mdp) (2.0 KB)

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 12, 2024, 10:36am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/18 "2024-05-12T10:36:22Z")

</div>

It seems like your problem is described in [https://manual.gromacs.org/current/reference-manual/special/pulling.html#definition-of-the-pull-direction](https://manual.gromacs.org/current/reference-manual/special/pulling.html#definition-of-the-pull-direction). I’ve never used `direction-relative` myself, but it seems like it should be reasonably easy to set up, with more selection groups. I hope it will solve your problem.

---

<div class="post-metadata">

**Author:** ![scinikhil](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/scinikhil/32/3483_2.png) [@scinikhil](https://gromacs.bioexcel.eu/u/scinikhil)\
**Post date:** [May 13, 2024, 9:03pm UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/19 "2024-05-13T21:03:47Z")

</div>

@Manish why do you want to pull -y axis? can you attach the simulation box and orientation of ligand in receptor?

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://gromacs.bioexcel.eu/u/Manish)\
**Post date:** [May 14, 2024, 7:41am UTC](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060/20 "2024-05-14T07:41:59Z")

</div>

sir I have attached the files below and I want to pull the ligand from -y axis becz it shows important interactions towards that side.

(Attachment newbox.gro is missing)

[pull (1).mdp](https://gromacs.bioexcel.eu/uploads/short-url/bi7gt2B1ZM5Ku1ZVXuc4OqB29xF.mdp) (2 KB)

[Next page](https://gromacs.bioexcel.eu/t/how-to-pull-ligand-in-negative-opposite-direction-of-axis/9060.md?page=2)
