# Calculation of distance between two atoms (amino acid and linad)

**URL:** <https://gromacs.bioexcel.eu/t/calculation-of-distance-between-two-atoms-amino-acid-and-linad/9238>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [May 28, 2024, 5:21am UTC](https://gromacs.bioexcel.eu/t/calculation-of-distance-between-two-atoms-amino-acid-and-linad/9238 "2024-05-28T05:21:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akhilesh](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@Akhilesh](https://gromacs.bioexcel.eu/u/Akhilesh)\
**Post date:** [May 28, 2024, 5:21am UTC](https://gromacs.bioexcel.eu/t/calculation-of-distance-between-two-atoms-amino-acid-and-linad/9238/1 "2024-05-28T05:21:52Z")

</div>

GROMACS version: 2022  
GROMACS modification: Yes/No  
Here post your question

How can I calculate distnace between two atoms (interacted amino acid and lignad molecule’s atom).  
How will I select a particular atom of amino acid and ligand which are interacting.

Please help me.

---

<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 28, 2024, 11:24am UTC](https://gromacs.bioexcel.eu/t/calculation-of-distance-between-two-atoms-amino-acid-and-linad/9238/2 "2024-05-28T11:24:31Z")

</div>

`gmx distance -h` might be a good start.

---

<div class="post-metadata">

**Author:** ![Akhilesh](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@Akhilesh](https://gromacs.bioexcel.eu/u/Akhilesh)\
**Post date:** [May 29, 2024, 1:46pm UTC](https://gromacs.bioexcel.eu/t/calculation-of-distance-between-two-atoms-amino-acid-and-linad/9238/3 "2024-05-29T13:46:12Z")

</div>

Thank you for your suggetions

How can I make index file of a particular atoms of proteins amino acid and nearest atom of lignads with that amino acid

---

<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 30, 2024, 1:49pm UTC](https://gromacs.bioexcel.eu/t/calculation-of-distance-between-two-atoms-amino-acid-and-linad/9238/4 "2024-05-30T13:49:21Z")

</div>

If the selection changes during the trajectory it is not very easy. Otherwise you could follow the instructions of `gmx distance`, especially the `-select` option.
