# Gmx trjcat not splitting trajectories

**URL:** <https://gromacs.bioexcel.eu/t/gmx-trjcat-not-splitting-trajectories/7337>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [October 5, 2023, 8:26am UTC](https://gromacs.bioexcel.eu/t/gmx-trjcat-not-splitting-trajectories/7337 "2023-10-05T08:26:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyoshap](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@lyoshap](https://gromacs.bioexcel.eu/u/lyoshap)\
**Post date:** [October 5, 2023, 8:26am UTC](https://gromacs.bioexcel.eu/t/gmx-trjcat-not-splitting-trajectories/7337/1 "2023-10-05T08:26:13Z")

</div>

GROMACS version: 2021.5  
GROMACS modification: No

Hello everyone,  
I’m posting this so maybe somebody can help me with my issue.  
I’m using a trajectory that is about 120 us long, representing various folded and unfolded states of a protein.  
I used MDAnalysis and RMSD to discriminate between the folded and the unfolded states and generated two trajectories representing the two states.  
My analysis implies that I divide the original 120 us long trajectory into four equal and smaller trajectories of 30 us each and I wanted to keep this identical division also for the folded/unfolded trajs.  
With MDA I retrieved the intervals at which I should have cut the folded/unfolded trajectory using gmx trjcat. The issue is that the command functions only with the folded trajectory, it doesn’t run with the unfolded.  
The command I used is

> gmx trjcat -f unfolded-fulltraj\_aligned\_eq.xtc -o prova.xtc -b 0 -e 20000

that generates an empty file.  
The total number of frames in the unfolded trajectory is 58119 and GROMACS output is

> Reading frame 1 time 612700.000
> 
> Summary of files and start times used:
> 
> ```
> File Start time Time step
> 
> ```
> 
> * * *
> 
> unfolded-fulltraj\_aligned\_eq.xtc 612600.000 ps 100.000 ps
> 
> Reading frame 0 time 612600.000 Note that major changes are planned in future for trjcat, to improve usability and utility.  
> lasttime 0
> 
> Last frame written was -1, time -1.000000 ps

Do you have an idea of why I can’t split this trajectory? I tried loading it on VMD and it gave me no issues.

Thanks a lot!

---

<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:** [October 5, 2023, 11:23am UTC](https://gromacs.bioexcel.eu/t/gmx-trjcat-not-splitting-trajectories/7337/2 "2023-10-05T11:23:08Z")

</div>

Firstly, `trjcat` is used for concatenating several trajectories into one - not for splitting trajectories.

Secondly, according to your info the trajectory starts at t=612600 ps. With `gmx trjcat -f unfolded-fulltraj_aligned_eq.xtc -o prova.xtc -b 0 -e 20000` you state that you should end the reading at 20 ns, which is before your trajectory has started.

I would suggest using `trjconv` instead. I’m not sure about the exact command, but something along the line of `gmx trjconv -f fulltraj_aligned_eq.xtc -o prova.xtc -split 30000000` would hopefully work. However, I guess the splitting might not work perfectly with your starting time. Experiment and see.
