[gmx-developers] measuring frame-shift between hbonded polymers
jewett.ai at gmail.com
Sat Sep 8 01:23:39 CEST 2007
Again, I mentioned I would send some examples of code which
can interpret hbond contact matrices. Feel free to contact me about bugs.
I'm attaching a script (xpm2frameshift) which attempts to determine
the average "shift" between two polymers are bonded together.
For every frame in the trajectory correspoinding to a .xpm file, this
program calculates a number which represents the the average shift
(i-j) between the residues bonded together,
Here "i" and "j" denote the location in the sequence of two residues
from either molecule which are hydrogen-bonded together.
This shift is averaged over all of the hydrogen bonds connecting
the two molecules. (One needs to be careful interpreting this value
of <i-j> when the two polymers are of different lengths.)
This code has been tested using the CVS version of g_hbond (version
3.3.1). You will need to have python installed (preferably in /usr/bin)
to run the script. Windows users can change the name of the file to
add a .py extension and run it in through python interpreter.
xpm2frameshift hbond.ndx residues1.ndx residues2.ndx [DA,AD] < hbmap.xpm
As an input this program requires a pair of files ("residues1.ndx" and
"residues2.ndx" in this example), containing a list of which
atoms belonging to each of the residues from either polymer.
(There should be one group per residue, and one file for either polymer.
Alternately, you might wish to only consider backbone atoms.)
hbmap.xpm An .xpm file created by "g_hbond -hbm" that you want to analyze
(See documentation for g_hbond.)
hbond.ndx The ndx file created by "g_hbond -hbn ..."
residues1.ndx a list of the atoms in each residue for polymer 1 (1
residues2.ndx a list of the atoms in each residue for polymer 2 (1
DA or AD The 4th argument DA / AD is optional.
By using the "DA" and "AD" arguments, the user can limit
the atoms that the program considers from groups1.ndx
and groups2.ndx. The DA command line argument causes
xpm2matrix to ignore all atoms from the first list of
groups which are not potential donor atoms, and all atoms
from the second list which are not potential acceptors.
(The reverse is true for the AD command.)
A side note: There is some controversy over the order of h-bonds in
the "hbond.ndx" file generated by g_hbond -hbn. If the gromacs developers
eventually decide to reverse the order of the bonds in the "hbond.ndx" file,
then to make this program work all you have to do is uncomment lines 137 and
138 of this xpm2frameshift code (the code included in this attachment.)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11934 bytes
Desc: not available
More information about the gromacs.org_gmx-developers