[gmx-developers] trjconv doesn't check if the .tpr, .xtc, and .ndx files provided match

sryckbos sryckbos at stanford.edu
Fri Jan 31 04:17:13 CET 2014


trjconv doesn't seem to check whether the .ndx file you specify corresponds
at all with the .tpr and .xtc files you input.  I wrote a script that was
using trjconv to remove the waters from many of my trajectories on several
different systems.  I made an .ndx file for each of them, system1.ndx and
system2.ndx, and planned to do something like this: 

echo Protein_ligand1|trjconv -s system1.tpr -f system1.xtc -o
system1_dehyd.xtc -n system1.ndx 

and, separately, do 

echo Protein_ligand2|trjconv -s system2.tpr -f system2.xtc -o
system2_dehyd.xtc -n system2.ndx 

Inadvertently, I forgot to change stuff in my second script, giving me a
command like this 

echo Protein_ligand1|trjconv -s system2.tpr -f system2.xtc -o
system2_dehyd.xtc -n system1.ndx 

Rather than flipping out and telling me that there isn't anything that
corresponds to Protein_ligand1 in system2.tpr or system2.xtc, however, it
gave me system2_dehyd.xtc as if nothing went wrong.  When I pulled
coordinates from that xtc file, it just used the numbers that corresponded
to Protein_ligand1 in the system2 files without looking at what it was
actually pulling. 

Next I tried to break it.  system1 has slightly more atoms than system2, and
so I figured if trjconv just ran out of atoms, it'd throw an error.  Not
really.  If I did this: 

echo System|trjconv -s system2.tpr -f system2.xtc -o system2_dehyd.xtc -n
system1.ndx 

All I got was: 

Select a group: Selected 0: 'System' 
Segmentation fault 

Finally, I figured if there was no ndx file, I wouldn't get this problem. 
Not so.  If I did 

echo System|trjconv -s system2.tpr -f system1.xtc -o test.xtc 

This time, I did get the following error: 

------------------------------------------------------- 
Program trjconv, VERSION 4.6 
Source code file:
/home/sryckbos/Downloads/gromacs-4.6/src/tools/gmx_trjconv.c, line: 1312 

Fatal error: 
Index[33820] 33821 is larger than the number of atoms in the 
trajectory file (33820). There is a mismatch in the contents 
of your -f, -s and/or -n files. 
For more information and tips for troubleshooting, please check the GROMACS 
website at http://www.gromacs.org/Documentation/Errors
------------------------------------------------------- 

BUT, if I reversed it, 

echo System|trjconv -s system1.tpr -f system2.xtc -o test2.xtc 

There was no error, and I got test2.xtc out without any problems. 

This seems like a pretty major bug to me, and presumably this isn't
occurring because I'm not up to date (didn't see anything about it in any of
the release notes for the 4.6.x series, or on any of the mailing lists). 
Has anyone else experienced or noticed this issue?


--
View this message in context: http://gromacs.5086.x6.nabble.com/trjconv-doesn-t-check-if-the-tpr-xtc-and-ndx-files-provided-match-tp5014178.html
Sent from the GROMACS Developers Forum mailing list archive at Nabble.com.


More information about the gromacs.org_gmx-developers mailing list