[gmx-users] eigenvectors with nan values

Joaquim Rui de Castro Rodrigues joaquim.rodrigues at ipleiria.pt
Tue Aug 21 11:47:32 CEST 2012

Hi Mark,

Thanks for replying.

De: gmx-users-bounces at gromacs.org [gmx-users-bounces at gromacs.org] Em Nome De Mark Abraham [Mark.Abraham at anu.edu.au]
Enviado: segunda-feira, 20 de Agosto de 2012 0:23
Para: Discussion list for GROMACS users
Assunto: Re: [gmx-users] eigenvectors with nan values

On 20/08/2012 4:34 AM, Joaquim Rui de Castro Rodrigues wrote:
> Dear Gromacs users,
> I'm having problems with g_covar because sometimes it produces eigenvectors with nan values. This is related with a previous post (http://lists.gromacs.org/pipermail/gmx-users/2012-July/073492.html).
> I checked the integrity of my xtc and tpr/pdb input files, and everything seems fine, as the following works OK:
> echo System System | /usr/local/gromacs455/bin/g_covar455 -s mainchain_init.tpr -f mainchain_apo.xtc -o eigenvalues.xvg -v eigenvectors.trr -xpma covara.xpm -xpm covar.xpm -l covar.log
> but running g_covar with parts of the same trajectory gives eigenvectors with nan values:
> echo System System | /usr/local/gromacs455/bin/g_covar455 -s mainchain_init.tpr -f mainchain_apo.xtc -b 2000 -e 22000 -o eigenvalues_1.xvg -v eigenvectors_1.trr -xpma covara_1.xpm -xpm covar_1.xpm -l covar_1.log -av av_1.pdb -ascii covar_1.dat
> echo System System | /usr/local/gromacs455/bin/g_covar455 -s mainchain_init.tpr -f mainchain_apo.xtc -b 22000 -e 42000 -o eigenvalues_2.xvg -v eigenvectors_2.trr -xpma covara_2.xpm -xpm covar_2.xpm -l covar_2.log -av av_2.pdb -ascii covar_2.dat
> eigenvectors_1.trr has one frame with all coordinates set to nan; eigenvectors_2.trr has 17. I don't see anything obviously wrong with the other files produced (xvg, xpm, pdb).
> What could be the problem?

Not sure. Does the number of frames reported read by g_covar make sense?
What's the frame frequency in your .xtc? What happens if you use trjconv
to make the trajectory subsets before using g_covar without -b and -e?
What's in System? Does double precision behave the same? Are the
corresponding eigenvalues also nan?


The number of frames read by g_covar are the expected ones:
whole: Read 40000 frames from mainchain_apo.xtc (time 2000 to 41999 ps)
part1: Read 20000 frames from mainchain_apo.xtc (time 2000 to 21999 ps)
part2: Read 20000 frames from mainchain_apo.xtc (time 22000 to 41999 ps)

The timestep of the xtc is 1 ps.

I created two trajectory subsets:
trjconv -f mainchain_apo.xtc -b 2000 -e 22000 -o mainchain_apo_part1.xtc
trjconv -f mainchain_apo.xtc -b 22000 -e 42000 -o mainchain_apo_part2.xtc
and run g_covar without -b and -e, and I get identical eigenvectors (as well as identical averaged pdb and xpm matrices).

"System" contains 4600 mainchain protein atoms:
Group     0 (         System) has  4600 elements
Group     1 (        Protein) has  4600 elements
Group     2 (      Protein-H) has  4600 elements
Group     3 (        C-alpha) has  1150 elements
Group     4 (       Backbone) has  3450 elements
Group     5 (      MainChain) has  4600 elements
Group     6 (   MainChain+Cb) has  4600 elements
Group     7 (    MainChain+H) has  4600 elements
Group     8 (      SideChain) has     0 elements
Group     9 (    SideChain-H) has     0 elements
The mainchain atoms in the xtc were extracted with trjconv; the tpr containing only mainchain atoms was obtained with tpbconv.

The corresponding eigenvalues are numbers and are equal to the "timestep" found in the eigenvectors.trr trajectories, as it should be.

I've just finished to run in double precision, and the nan values are all gone. That solved the problem :-)
Still, I wonder what went wrong with single precision.

Many thanks,
Rui Rodrigues

More information about the gromacs.org_gmx-users mailing list