[gmx-users] gmx distance error - invalid index with -f vs -s input file

Travis Meyer travis.meyer at rutgers.edu
Fri Jan 24 22:59:25 CET 2020


Thanks so much for your response. I have visualized the cg_traj.gro using VMD and did not observe any issues. Additionally, I was able to use cg_traj.gro to calculate bond angles using the gmx angle command along with the relevant index file without any issues. It appears to be more of a specific issue with gmx distance rather than the .gro/.xtc file itself.

One thing I am particularly intrigued by is why sending the .gro file using the -s flag works, while the -f does not?

    Thanks,
    Travis

    > Hello all,
    >
    > I am using gmx distance to extract bond distances from a set of 200
    > coarse-grained polymer molecules (10 "atoms" each). I created an index file
    > pointing to all of the bonds, and ran the command as
    >
    > gmx distance -f cg_traj.gro -n bonds.ndx -oh bondhist.xvg
    >
    > However, I was getting an error message upon choosing which index group to
    > use.
    >
    > "Inconsistency in user input: Invalid index group references encountered
    > Group 'bonds'cannot be used in selections, because it contains negative
    > atom indices and/or references atoms not present (largest allowed atom
    > index is 0)."
    >


    it looks that there is something wrong in reading your cg_traj.gro file
    (probably similar to what you had before with xtc file). Did you try to
    visualize  cg_traj.gro using VMD (for example).



    > Both the .gro and .ndx file contain the correct atom indices (1-2000).
    > Interestingly enough, when I sent the same .gro file to gmx distance using
    > the -s tag, I was able to correctly get the bond distance histogram (albeit
    > I do not believe it includes all time points from the trajectory).
    >
    > gro/xtc file contains mainly  information on the coordinates of the
    particles in the system. All other information related the particles
    (types/connectivity/interaction parameters and so on) are in  .tpr file.
    But this file contains also the starting structure of your simulation. Thus
    I suggest to check again structural file (gro and xtc) - As far as I
    understood  gmx distance -f cg_traj.xtc -s *.tpr -n bonds.ndx -oh
    bondhist.xvg is not working.

    gmx dump could also help    it prints the information in tpr (and also xtc file) to a standard output
    in a readable format.

    Best regards
    Alessandra



    > Does anyone have any insight onto why switching from an input trajectory
    > (-f) to an input structure (-s) using the same .gro file would alleviate
    > the error above, or what could be causing that error when sending a
    > trajectory? I am new to GROMACS/Molecular Dynamics, so any help would be
    > greatly appreciated.
    >
    > Thanks,
    > Travis Meyer, Ph.D.
    > INSPIRE Postdoctoral Fellow
    > Gormley Lab, Rutgers University

Travis Meyer, Ph.D.
INSPIRE Postdoctoral Fellow
Gormley Lab, Rutgers University


More information about the gromacs.org_gmx-users mailing list