# How to calculate Ligand-active site distance in a ligand-protein complex from MD simulation?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654>\
**Category:** User discussions\
**Created:** [February 28, 2021, 2:22pm UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654 "2021-02-28T14:22:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maninder](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@Maninder](https://gromacs.bioexcel.eu/u/Maninder)\
**Post date:** [February 28, 2021, 2:22pm UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654/1 "2021-02-28T14:22:12Z")

</div>

GROMACS version: 2018.7 and 5.1.4  
GROMACS modification: Yes/No

Dear experts,  
I have run MD simulations of ligand-protein complexes in GROMACS2018.7 and 5.1.4 using CHARMM36 forcefield. Reviewer has asked me to calculate Ligand-active site distance and binding free energy of ligand with protein from MD simulation. How can I calculate Ligand-active site distance from MD simulation data?  
Thanks and regards

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [March 8, 2021, 4:23pm UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654/2 "2021-03-08T16:23:16Z")

</div>

Hi,  
a variety of tools are available in GROMACS to calculate distance.  
Maybe you can find some help from this conversation

> [@What is the difference between gmx distance, gmx mindist and gmx pairdist?](https://gromacs.bioexcel.eu/t/what-is-the-difference-between-gmx-distance-gmx-mindist-and-gmx-pairdist/649):
>
> Hi, I am trying to compute distance between four residues of a protein involved in active site. I am getting confused in mindist, pairdist and gmx distance. What are the limits and differences in three? Which analysis can be helpful in plotting distance between A-B, B-C, C-D and D-A residues over time, where ABCD are 4 residues forming bottleneck for ligand entry.

Or other in the forum.  
Best regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![Maninder](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@Maninder](https://gromacs.bioexcel.eu/u/Maninder)\
**Post date:** [March 11, 2021, 6:43am UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654/3 "2021-03-11T06:43:39Z")

</div>

Thank you Alessandra @alevilla, the discussion link you provided is very informative. I used the gmx distance option and calculated the distance of an atom of the ligand ( like atom O) from an atom of the four residues (atom like OE1) of the active site, individually, and plotted these distances using xmgrace showing these four distances in a single plot. Is it an appropriate way to show the distance?  
Thanks & Regards,  
Maninder

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [March 11, 2021, 9:18am UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654/4 "2021-03-11T09:18:24Z")

</div>

Hi,  
In alternative you can also monitor the distance between the com of the ligand and the com of the key residues.

To know more on selection syntax look here [Selection syntax and usage — GROMACS 2021.1 documentation](https://manual.gromacs.org/current/onlinehelp/selections.html?highlight=selection)

Best regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![Maninder](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@Maninder](https://gromacs.bioexcel.eu/u/Maninder)\
**Post date:** [March 11, 2021, 10:17am UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654/5 "2021-03-11T10:17:03Z")

</div>

Thank you Alessandra for the prompt reply and suggestion. I will try to do as you suggested and get back to you.  
Thanks & Regards,  
Maninder

---

<div class="post-metadata">

**Author:** ![Maninder](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@Maninder](https://gromacs.bioexcel.eu/u/Maninder)\
**Post date:** [March 12, 2021, 3:04pm UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-ligand-active-site-distance-in-a-ligand-protein-complex-from-md-simulation/1654/6 "2021-03-12T15:04:43Z")

</div>

Hello Alessandra, as per your suggestion I tried to calculate the distance between ‘com’ of ligand and ‘com’ of five residues of the active site (residues 211, 252, 255, 244, 237).

For this I made an index file from command:

gmx make\_ndx -f md.tpr -o 5res.ndx

> r 211 | r 252 | r 255 | r 244 | r 237 (group 24)

and further grouped it with ligand (13|24) (group 25)

My system in the index file 5res.ndx consists of:

Group 0 “System” (52939 atoms)

Group 1 “Protein” (5538 atoms)

Group 2 “Protein-H” (2747 atoms)

Group 3 “C-alpha” (349 atoms)

Group 4 “Backbone” (1047 atoms)

Group 5 “MainChain” (1395 atoms)

Group 6 “MainChain+Cb” (1721 atoms)

Group 7 “MainChain+H” (1730 atoms)

Group 8 “SideChain” (3808 atoms)

Group 9 “SideChain-H” (1352 atoms)

Group 10 “Prot-Masses” (5538 atoms)

Group 11 “non-Protein” (47401 atoms)

Group 12 “Other” (45 atoms)

Group 13 “LIG” (45 atoms)

Group 14 “NA” (33 atoms)

Group 15 “CL” (34 atoms)

Group 16 “Water” (47289 atoms)

Group 17 “SOL” (47289 atoms)

Group 18 “non-Water” (5650 atoms)

Group 19 “Ion” (67 atoms)

Group 20 “LIG” (45 atoms)

Group 21 “NA” (33 atoms)

Group 22 “CL” (34 atoms)

Group 23 “Water\_and\_ions” (47356 atoms)

Group 24 “r\_211\_r\_252\_r\_255\_r\_244\_r\_237” (81 atoms)

Group 25 “LIG\_r\_211\_r\_252\_r\_255\_r\_244\_r\_237” (126 atoms)

I run the following command:

gmx distance -f md.xtc -s md.tpr -n 5res.ndx -oav distave.xvg -oall dist.xvg -oxyz distxyz.xvg -oh disthist.xvg -oallstat diststat.xvg -select `com of group "24" plus com of group "13"` -tu ns -dt 50

but shows the following message:

No command ‘com’ found, but there are 21 similar ones

com: command not found

Instead it takes command as:

gmx distance -f md.xtc -s md.tpr -n 5res.ndx -oav distave.xvg -oall dist.xvg -oxyz distxyz.xvg -oh disthist.xvg -oallstat diststat.xvg -select -tu ns -dt 50

and when prompted, I selected 25, it gives following output:

Analyzed 1 frames, last time 20000.000

LIG\_r\_211\_r\_252\_r\_255\_r\_244\_r\_237:

Number of samples: 63

Average distance: 0.33105 nm

Standard deviation: 0.29256 nm

But the dist.xvg and distave.xvg file are empty (blank)

please let me know if there is any syntax error, or suggest an appropriate command.

Thanks and regards,
