# Cluster analysis on the MD trajectories extracted from LAMMPS

**URL:** <https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346>\
**Category:** User discussions\
**Created:** [June 23, 2022, 12:16pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346 "2022-06-23T12:16:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![khizar](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@khizar](https://gromacs.bioexcel.eu/u/khizar)\
**Post date:** [June 23, 2022, 12:16pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346/1 "2022-06-23T12:16:01Z")

</div>

GROMACS version: 2020.1  
GROMACS modification: Yes/No

Dear GROMACS community,

Greetings!

I have performed Reactive forcefield MD simulations using LAMMPS software. During production run, I have extracted trajectories at 10 fs. Next, I wanna perform cluster analysis using GROMACS. Can you please guide me how to perform cluster analysis on the trajectories extracted from the software other than GROMACS?

Regards  
Khizar Hayat

---

<div class="post-metadata">

**Author:** ![giacomo.fiorin](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/giacomo.fiorin/32/2862_2.png) [@giacomo.fiorin](https://gromacs.bioexcel.eu/u/giacomo.fiorin)\
**Post date:** [June 23, 2022, 4:20pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346/2 "2022-06-23T16:20:12Z")

</div>

Hi, for the clustering, I’d check the documentation of `gmx cluster` and start there.

The only slight complication is the trajectory conversion from whichever format you used for the LAMMPS trajectory `dump`. If you used XTC, you’re in luck, otherwise most other formats that LAMMPS supports GROMACS can’t read directly, and you should convert them first.

Giacomo

---

<div class="post-metadata">

**Author:** ![khizar](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@khizar](https://gromacs.bioexcel.eu/u/khizar)\
**Post date:** [June 23, 2022, 5:36pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346/3 "2022-06-23T17:36:37Z")

</div>

Hello Giacomo,

Thanks. I wanna perform cluster analysis using gmx clustsize, however, the issue is that my LAMMPS trajectories are not xtc file type. As you mentioned, yes I am trying to convert them first but couldn’t find suitable tool. Anyone please refer any tool to convert LAMMPS dump file to xtc file.

Looking forward.

Regards

---

<div class="post-metadata">

**Author:** ![giacomo.fiorin](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/giacomo.fiorin/32/2862_2.png) [@giacomo.fiorin](https://gromacs.bioexcel.eu/u/giacomo.fiorin)\
**Post date:** [June 23, 2022, 5:53pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346/4 "2022-06-23T17:53:36Z")

</div>

Did you check the tools in this page first?  
[https://lammps.org/prepost.html](https://lammps.org/prepost.html)  
You should be already _closely_ familiar with that list if you have used LAMMPS.

Look for a package that reads the format you have and writes in a GROMACS-compatible format. Nearly all of those packages have easy to browse documentation.

Giacomo

---

<div class="post-metadata">

**Author:** ![giacomo.fiorin](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/giacomo.fiorin/32/2862_2.png) [@giacomo.fiorin](https://gromacs.bioexcel.eu/u/giacomo.fiorin)\
**Post date:** [June 23, 2022, 6:37pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346/5 "2022-06-23T18:37:47Z")

</div>

Also this:  
[https://docs.lammps.org/dump.html](https://docs.lammps.org/dump.html)

---

<div class="post-metadata">

**Author:** ![khizar](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@khizar](https://gromacs.bioexcel.eu/u/khizar)\
**Post date:** [June 23, 2022, 6:50pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-on-the-md-trajectories-extracted-from-lammps/4346/6 "2022-06-23T18:50:10Z")

</div>

Dear Giacomo,

Got it. Thank you so much.

Khizar
