# Trjconv error

**URL:** <https://gromacs.bioexcel.eu/t/trjconv-error/4337>\
**Category:** User discussions\
**Tags:** gmx-trjconv\
**Created:** [June 22, 2022, 11:19am UTC](https://gromacs.bioexcel.eu/t/trjconv-error/4337 "2022-06-22T11:19:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.pallav](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/s.pallav/32/1099_2.png) [@s.pallav](https://gromacs.bioexcel.eu/u/s.pallav)\
**Post date:** [June 22, 2022, 11:19am UTC](https://gromacs.bioexcel.eu/t/trjconv-error/4337/1 "2022-06-22T11:19:45Z")

</div>

GROMACS version:2019  
GROMACS modification: No  
Here post your question  
Dear developers and users,  
I have been trying to dump a few frames in a pdb file using the trjconv utility by supplying with an index file containing the atoms I want to use further post processing calculations however I have been encountering errors with the same.

```auto
Command line:
  gmx trjconv -f traj.xtc -o _pid.pdb -n index.ndx

Will write pdb: Protein data bank file
Reading file topol.tpr, VERSION 2019 (single precision)
Reading file topol.tpr, VERSION 2019 (single precision)
Note that major changes are planned in future for trjconv, to improve usability and utility.Select group for output
Group 0 ( System) has 131341 elements
Group 1 ( Protein) has 15056 elements
Group 2 ( Protein-H) has 7568 elements
Group 3 ( C-alpha) has 968 elements
Group 4 ( Backbone) has 2904 elements
Group 5 ( MainChain) has 3868 elements
Group 6 ( MainChain+Cb) has 4800 elements
Group 7 ( MainChain+H) has 4792 elements
Group 8 ( SideChain) has 10264 elements
Group 9 ( SideChain-H) has 3700 elements
Group 10 ( Prot-Masses) has 15056 elements
Group 11 ( non-Protein) has 116285 elements
Group 12 ( Other) has 456 elements
Group 13 ( FAD) has 336 elements
Group 14 ( UMP) has 120 elements
Group 15 ( SOD) has 20 elements
Group 16 ( Water) has 115809 elements
Group 17 ( SOL) has 115809 elements
Group 18 ( non-Water) has 15532 elements
Group 19 ( Ion) has 20 elements
Group 20 ( FAD) has 336 elements
Group 21 ( SOD) has 20 elements
Group 22 ( Water_and_ions) has 115829 elements
Group 23 ( Protein_UMP) has 15176 elements
Select a group: 23
Selected 23: 'Protein_UMP'
Reading frame 0 time 30000.000   
Precision of traj.xtc is 0.001 (nm)

-------------------------------------------------------
Program: gmx trjconv, version 2019
Source file: src/gromacs/gmxana/gmx_trjconv.cpp (line 1355)

Fatal error:
Index[14924] 15177 is larger than the number of atoms in the
trajectory file (15176). There is a mismatch in the contents
of your -f, -s and/or -n files.

```

Moreover, when supplied with a tpr file containing the same group of atoms which I generated using convert-tpr I encounter segemntation fault and the same thing works when supplied with the original tpr.

Moreover, I would want to ask is there any better way to dump frames in a pdb file without such hassle.

Anticipating your suggestions and answers.  
Regards,  
Pallav Sengupta

---

<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:** [June 22, 2022, 1:05pm UTC](https://gromacs.bioexcel.eu/t/trjconv-error/4337/2 "2022-06-22T13:05:33Z")

</div>

Hi Pallav,  
If you provide to gmx trjconv (with the option -s) the tpr you use to run the simulation and create the index file you will not encounter the problem (as you also wrote) .

Concerning convert-tpr, I think the functionality you use (I guess number 2) is not \*\* fully functional\*\*.

Please let me know if I did not understand completly your issue  
Alessandra
