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

Alessandra Villa alessandra.villa.biosim at gmail.com
Fri Jan 24 09:33:30 CET 2020


Hi,
see below

On Thu, Jan 23, 2020 at 7:34 PM Travis Meyer <travis.meyer at rutgers.edu>
wrote:

> 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 (
http://manual.gromacs.org/documentation/2019-current/onlinehelp/gmx-dump.html?highlight=dump)
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
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list