# Umbrella Sampling via Gromacs

**URL:** <https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539>\
**Category:** User discussions\
**Tags:** mdrun\
**Created:** [July 1, 2024, 4:47am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539 "2024-07-01T04:47:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maha\_Yousaf](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Maha\_Yousaf](https://gromacs.bioexcel.eu/u/Maha_Yousaf)\
**Post date:** [July 1, 2024, 4:47am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/1 "2024-07-01T04:47:32Z")

</div>

GROMACS version: 2018.8  
GROMACS modification: No  
Here post your question I am trying to run umbrella sampling via GROMACS 2018.8 version.  
My system is of a ligand embedded in a lipid by layer membrane which i have prepared via CHARMM GUI.

Running the following command, i got error  
Command line:  
**gmx grompp -f step6.0\_minimization.mdp -c step5\_input.gro -p topol.top -o em.tpr**

Setting the LD random seed to 2121802801  
Generated 462 of the 465 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 1  
Generated 326 of the 465 1-4 parameter combinations  
Excluding 3 bonded neighbours molecule type ‘LIG’  
turning H bonds into constraints…  
Excluding 3 bonded neighbours molecule type ‘DOPC’  
turning H bonds into constraints…  
Excluding 3 bonded neighbours molecule type ‘DOPG’  
turning H bonds into constraints…  
Excluding 1 bonded neighbours molecule type ‘POT’  
turning H bonds into constraints…  
Excluding 1 bonded neighbours molecule type ‘CLA’  
turning H bonds into constraints…  
Excluding 2 bonded neighbours molecule type ‘TIP3’  
turning H bonds into constraints…

**ERROR 1 [file LIG.itp, line 13]:**  
\*\* moleculetype LIG is redefined\*\*

Please guide how to fix it.

i am uploading my “topol.top” file so you can review.  
[topol.top](https://gromacs.bioexcel.eu/uploads/short-url/qr5SF6sXdEjgizdFefKrGwBIFcX.top) (994 Bytes)

---

<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:** [July 1, 2024, 6:30am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/2 "2024-07-01T06:30:58Z")

</div>

It seems you have #include “toppar/LIG.itp” twice in the file, as well as for every other .itp file. You only need them once, it’s not necessary to do so before setting up the posres files

---

<div class="post-metadata">

**Author:** ![Maha\_Yousaf](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Maha\_Yousaf](https://gromacs.bioexcel.eu/u/Maha_Yousaf)\
**Post date:** [July 5, 2024, 5:24am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/3 "2024-07-05T05:24:00Z")

</div>

Thanks for your suggestion. I tried almost every option but it worked when i removed the **-define details**.

---

<div class="post-metadata">

**Author:** ![Maha\_Yousaf](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Maha\_Yousaf](https://gromacs.bioexcel.eu/u/Maha_Yousaf)\
**Post date:** [July 5, 2024, 5:34am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/4 "2024-07-05T05:34:10Z")

</div>

There are few things that i need to ask. what is meant by this error

**Fatal error:**  
**Distance between pull groups 1 and 2 (6.791968 nm) is larger than 0.49 times**  
**the box size (6.791871).**

For pulling simulations i used  
[pull1.mdp](https://gromacs.bioexcel.eu/uploads/short-url/ppGuQfb6MzBNLevA2apDofFZDuC.mdp) (2.0 KB) i have used pull\_coord1\_init = 0.00001 ; Initial distance set to 1.0 nm  
pull\_coord1\_rate = 0.00005 ; 0.01 nm per ps = 10 nm per ns in pulling simulations because if i dont use them i get error **Fatal error:**  
**Distance between pull groups 1 and 2 (6.791968 nm) is larger than 0.49 times**  
**the box size (6.791871).**. now using these parameters i successfully did steered md simulations, prepared npt.tpr files for umbrella sampling. please find attached npt.mdp file  
[npt\_umbrella.mdp](https://gromacs.bioexcel.eu/uploads/short-url/dZYjOac9FCxWJDJboscf3Rdr0Fb.mdp) (2.0 KB). but when i run final umbrella sampling simulation using these parameters i get same error.  
[md\_umbrella.mdp](https://gromacs.bioexcel.eu/uploads/short-url/ryJgDTGRpzESHUWx0mgmdkUPt6c.mdp) (1.9 KB)

---

<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:** [July 5, 2024, 6:28am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/5 "2024-07-05T06:28:24Z")

</div>

You need to make sure the pull groups you choose are never pulled to greater than 0.49 times the length of the box in the direction it’s pulling. So if you’re pulling in the z-direction, and the 2 pull groups are pulled up to 7 nm apart, your box should be at least 14 nm long in the z-direction

---

<div class="post-metadata">

**Author:** ![Maha\_Yousaf](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Maha\_Yousaf](https://gromacs.bioexcel.eu/u/Maha_Yousaf)\
**Post date:** [July 5, 2024, 6:33am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/6 "2024-07-05T06:33:28Z")

</div>

i got your point but can you give me some suggestions to fix the issue. I have prepared the system via charmm gui. Please check this image

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/9/900bb3596805ddaa739dd0821bf4500af553667f.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:** [July 5, 2024, 9:31am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/7 "2024-07-05T09:31:23Z")

</div>

There are two things to try.

1. Instead of `pull_coord1_geometry = distance` use `pull_coord1_geometry = direction` and `pull_coord1_vec = 0 0 1`.
2. Use a larger water layer. Set Water thickness to 100 Å (or something).

I would recommend alternative 1.

By the way, why do you have `pull_coord1_init = 0.00000001` and `pull_coord1_rate = 0.00000005` in your umbrella simulation file? They can (or should) both be 0.

---

<div class="post-metadata">

**Author:** ![Maha\_Yousaf](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Maha\_Yousaf](https://gromacs.bioexcel.eu/u/Maha_Yousaf)\
**Post date:** [July 6, 2024, 6:32am UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/8 "2024-07-06T06:32:44Z")

</div>

i followed your first suggestion and got error while running steered md simulation ([Umbrella Sampling](http://www.mdtutorials.com/gmx/umbrella/05_pull.html))

 ![Screenshot from 2024-07-06 15-29-04](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/c/c0af9adb91e830eac5cc0d62f1ddcf6003e0739c.png)  
[md\_pull.mdp](https://gromacs.bioexcel.eu/uploads/short-url/x5FQOXq6RV82EqNuqvy4THqXHap.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:** [July 6, 2024, 12:07pm UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/9 "2024-07-06T12:07:22Z")

</div>

Sorry, my mistake. Try `direction-periodic` instead of `direction`.

---

<div class="post-metadata">

**Author:** ![ChefCaleb12](https://avatars.discourse-cdn.com/v4/letter/c/b5e925/32.png) [@ChefCaleb12](https://gromacs.bioexcel.eu/u/ChefCaleb12)\
**Post date:** [July 30, 2024, 3:41pm UTC](https://gromacs.bioexcel.eu/t/umbrella-sampling-via-gromacs/9539/10 "2024-07-30T15:41:14Z")

</div>

Excellent post! Very informative.
