# Concatenating two trajectories from different simulations

**URL:** <https://gromacs.bioexcel.eu/t/concatenating-two-trajectories-from-different-simulations/231>\
**Category:** User discussions\
**Created:** [June 2, 2020, 8:44am UTC](https://gromacs.bioexcel.eu/t/concatenating-two-trajectories-from-different-simulations/231 "2020-06-02T08:44:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pragati](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@Pragati](https://gromacs.bioexcel.eu/u/Pragati)\
**Post date:** [June 2, 2020, 8:44am UTC](https://gromacs.bioexcel.eu/t/concatenating-two-trajectories-from-different-simulations/231/1 "2020-06-02T08:44:15Z")

</div>

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

Is it possible to append two trajectories with same starting point (say zero) ??

2nd trajectory is a fresh simulation by taking last pdb of first run (100ns) . So 2nd trajectory also starts from zero ( and goes till 100ns). Is it possible to join the two making a 200ns traj file.

Thanks,

Pragati

---

<div class="post-metadata">

**Author:** ![Pragati](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@Pragati](https://gromacs.bioexcel.eu/u/Pragati)\
**Post date:** [June 2, 2020, 8:45am UTC](https://gromacs.bioexcel.eu/t/concatenating-two-trajectories-from-different-simulations/231/2 "2020-06-02T08:45:15Z")

</div>

I am using trjcat for this, but it is overwriting the first trajectory and saving only second.

---

<div class="post-metadata">

**Author:** ![Dr\_DBW](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dr_dbw/32/42_2.png) [@Dr\_DBW](https://gromacs.bioexcel.eu/u/Dr_DBW)\
**Post date:** [June 2, 2020, 11:43am UTC](https://gromacs.bioexcel.eu/t/concatenating-two-trajectories-from-different-simulations/231/3 "2020-06-02T11:43:51Z")

</div>

[gmx trjcat](http://manual.gromacs.org/documentation/current/onlinehelp/gmx-trjcat.html)

> In case of double time frames the one in the later file is used.

So it is doing exactly what it is meant to when it saves only the second trajectory.

> By specifying `-settime` you will be asked for the start time of each file.

Using this option will allow you to specify the second trajectory to start after the end of the first.

Another way to reach the same end is use [gmx trjconv](http://manual.gromacs.org/documentation/current/onlinehelp/gmx-trjconv.html) to change the start time of the second trajectory file, then use gmx trjcat in the same manner you are currently.
