# Cluster Analysis without a trajectory file

**URL:** <https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149>\
**Category:** User discussions\
**Created:** [May 16, 2020, 3:07am UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149 "2020-05-16T03:07:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neena](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@Neena](https://gromacs.bioexcel.eu/u/Neena)\
**Post date:** [May 16, 2020, 3:07am UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149/1 "2020-05-16T03:07:39Z")

</div>

GROMACS version: 2018.4  
GROMACS modification: No  
Here post your question  
I conducted simulated annealing 30 times in a loop and it generated 30 structures. Is there a way to do cluster analysis on these final 30 structures instead of using a trajectory file as input for gmx cluster?

---

<div class="post-metadata">

**Author:** ![Teslim](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Teslim](https://gromacs.bioexcel.eu/u/Teslim)\
**Post date:** [May 16, 2020, 5:10pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149/2 "2020-05-16T17:10:10Z")

</div>

gmx accepts one of the follow as options to specify for input files:

`-f` [\<.xtc/.trr/…\>] (traj.xtc) (Optional)

Trajectory: [xtc](http://manual.gromacs.org/documentation/2018/user-guide/file-formats.html#xtc) [trr](http://manual.gromacs.org/documentation/2018/user-guide/file-formats.html#trr) [cpt](http://manual.gromacs.org/documentation/2018/user-guide/file-formats.html#cpt) [gro](http://manual.gromacs.org/documentation/2018/user-guide/file-formats.html#gro) [g96](http://manual.gromacs.org/documentation/2018/user-guide/file-formats.html#g96) [pdb](http://manual.gromacs.org/documentation/2018/user-guide/file-formats.html#pdb) [tng](http://manual.gromacs.org/documentation/2018/user-guide/file-formats.html#tng)

---

<div class="post-metadata">

**Author:** ![dkozuch](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@dkozuch](https://gromacs.bioexcel.eu/u/dkozuch)\
**Post date:** [May 16, 2020, 8:16pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149/3 "2020-05-16T20:16:05Z")

</div>

Just to add on to the previous answer, you can always make a trajectory file by feeding your .gro configurations to gmx trjcat: [http://manual.gromacs.org/documentation/current/onlinehelp/gmx-trjcat.html](http://manual.gromacs.org/documentation/current/onlinehelp/gmx-trjcat.html)

---

<div class="post-metadata">

**Author:** ![Neena](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@Neena](https://gromacs.bioexcel.eu/u/Neena)\
**Post date:** [May 16, 2020, 11:45pm UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149/4 "2020-05-16T23:45:17Z")

</div>

1. Error on using gmx trjcat with a gro file as input:  
It can only handle binary trajectory formats (trr, xtc, tng)

2. Question: Is there a way to use multiple gro files as input and convert them all into a single trr file? And then use that as input for gmx cluster?

---

<div class="post-metadata">

**Author:** ![dkozuch](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@dkozuch](https://gromacs.bioexcel.eu/u/dkozuch)\
**Post date:** [May 17, 2020, 6:03am UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149/5 "2020-05-17T06:03:22Z")

</div>

Apologies, it looks like there was some misleading documentation for trjcat (see: [https://www.mail-archive.com/gromacs.org\_gmx-users@maillist.sys.kth.se/msg39054.html](https://www.mail-archive.com/gromacs.org_gmx-users@maillist.sys.kth.se/msg39054.html)). You will have to convert each .gro to .xtc using trjconv and then concatentate.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [May 17, 2020, 11:06am UTC](https://gromacs.bioexcel.eu/t/cluster-analysis-without-a-trajectory-file/149/6 "2020-05-17T11:06:33Z")

</div>

While possible, this is unnecessary; since `.gro` and `.pdb` files are just text, use the standard Linux `cat` command to make the multi-frame “trajectory” file.

`cat *.gro > traj.gro`
