# Trajectory lists previous frame than what is mentioned in \*.ndx

**URL:** <https://gromacs.bioexcel.eu/t/trajectory-lists-previous-frame-than-what-is-mentioned-in-ndx/3935>\
**Category:** User discussions\
**Tags:** gmx-trjconv\
**Created:** [March 31, 2022, 7:29am UTC](https://gromacs.bioexcel.eu/t/trajectory-lists-previous-frame-than-what-is-mentioned-in-ndx/3935 "2022-03-31T07:29:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gojja](https://avatars.discourse-cdn.com/v4/letter/g/90ced4/32.png) [@Gojja](https://gromacs.bioexcel.eu/u/Gojja)\
**Post date:** [March 31, 2022, 7:29am UTC](https://gromacs.bioexcel.eu/t/trajectory-lists-previous-frame-than-what-is-mentioned-in-ndx/3935/1 "2022-03-31T07:29:31Z")

</div>

GROMACS version: 2019.1  
GROMACS modification: Yes/No

I used the gmx-clutser to make clutser.sh. And, then I wanted to choose 50 random frames from cluster1. Frames in my trajectory are 20ps apart. Since, the cluster.log mentions time stamp. I divided it by 20 to get the exact frame number and put up my list in frames.ndx, which is further given as an input in trjconv to get \*.xtc and \*.pdb.

During analysis, I got a \*.xvg and I noticed that frames are shifted exactly one place behind. For instance, my \*.ndx ask for frame 498 (time = 9660), then, my \*.xvg mentions time 9640 (corresponding to frame 497). I do not fully understand why this could be happening.

I am also not sure whether to list it as a problem associated with gmx-trjconv or gmx-cluster.

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [April 4, 2022, 9:19am UTC](https://gromacs.bioexcel.eu/t/trajectory-lists-previous-frame-than-what-is-mentioned-in-ndx/3935/2 "2022-04-04T09:19:03Z")

</div>

Hi,  
To check if it is a problem of the tools and of the intermediate steps, you have in the analysis.  
You can extract using gmx trjconv -dump the snapshot you want (and save it as pdb) and compare with the one saved by gmx cluster in cluster.pdb using option -cl (withtout -av) that writes central structure of each cluster. Both gmx trjconv and gmx cluster has to run on the same (better fitted) trajectory.  
Alessandra

---

<div class="post-metadata">

**Author:** ![gvigers](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gvigers](https://gromacs.bioexcel.eu/u/gvigers)\
**Post date:** [April 7, 2022, 12:40pm UTC](https://gromacs.bioexcel.eu/t/trajectory-lists-previous-frame-than-what-is-mentioned-in-ndx/3935/3 "2022-04-07T12:40:26Z")

</div>

Frame 1 is at time 0. The last frame is at the end of the trajectory.  
So for a 100ps run with dt=1ps you will have 101 frames.  
I dont think this is a bug :)
