[gmx-users] analysing ndx file of g_hbond

Yang Ye leafyoung81-group at yahoo.com
Wed Jun 28 16:37:13 CEST 2006

Erik Marklund wrote:
> On Wed, 2006-06-28 at 04:29 -0700, raja wrote:
>> Dear all,
>> The index file produced by g_hbond listing many rows of hbonds making
>> atoms combination. Is there a way to get the corresponding residue and
>> atom name for those numbers by any of the gromacs program or if anyone
>> having the script to do that, kindly pass it on to me. My primary
>> objective is to know how many hbond listed in index file are belong to
>> main chain atoms.
> How about using make_ndx? Try the following:
>  X & Y
X | Y

I was making the same mistake and still ask why I couldn't get it.
>  q
> X being the index group containing the h-bonds and Y being the main
> chain index group. You will probably have to merge the g_hbond index
> file with an index file of your system first.
> Atom names and residues is slightly more problematic. I recommend using
> awk within a cshell (any shell would do) script to extract such
> information from a .gro-file of your system. Just loop through the
> g_hbond index file and have awk print atom names, residues, or whatever.
> Note that the ndx-file from h_bond is NOT merged (if I remember this
> correctly), so a-d-pairs are likely to show up several times in your
> index file. Depending on how you choose to use the index file, this
> could cause problems. This bug, along with a few other oddities, was
> fixed in the latest cvs version of g_hbond.
> /Erik Marklund
>> With thanks!
>> B.Nataraj
>> -- 
>>   raja
>>   raja_28 at fastmail.us

More information about the gromacs.org_gmx-users mailing list