[gmx-users] a minor bug in g_clustsize

Ran Friedman r.friedman at bioc.uzh.ch
Mon Jan 28 11:22:59 CET 2008


Dear GMX users,

I submitted the following minor bug to bugzilla, and thought it might be useful for few of the users to know about it. It will only affect you if you want to use g_clustsize and don't have a .tpr file for any reason.

According to the documentation of g_clustsize, the -s flag is optional, and the
user needs to use it only for analysing molecules. However, when trying the run
without the -s flag, the following error message is printed:

Can not open file:
topol.tpr

This happens both in GMX 3.3.1 and in the CVS version (I didn't check earlier version)

The fix seems to be simple (I tried it only on the CVS version):

diff gmx_clustsize.c gmx_clustsize.c.org
106a107,112
>   read_tpxheader(tpr,&tpxh,TRUE,&version,&generation);
>   if (tpxh.natoms != natoms)
>     gmx_fatal(FARGS,"tpr (%d atoms) and xtc (%d atoms) do not match!",
>             tpxh.natoms,natoms);
>   read_tpx(tpr,&sss,&ttt,&lll,NULL,NULL,&natoms,NULL,NULL,NULL,&top);
>
113,117d118
<       read_tpxheader(tpr,&tpxh,TRUE,&version,&generation);
<       if (tpxh.natoms != natoms)
<       gmx_fatal(FARGS,"tpr (%d atoms) and xtc (%d atoms) do not match!",
<             tpxh.natoms,natoms);
<       read_tpx(tpr,&sss,&ttt,&lll,NULL,NULL,&natoms,NULL,NULL,NULL,&top);

In other words, in the function clust_size, line 107-111 should be moved to the
loop after line 118, which checks if the function deals with molecules.

Best regards,
Ran.

-- 
------------------------------------------------------
Ran Friedman
Postdoctoral Fellow
Computational Structural Biology Group (A. Caflisch)
Department of Biochemistry
University of Zurich
Winterthurerstrasse 190
CH-8057 Zurich, Switzerland
Tel. +41-44-6355593
Email: r.friedman at bioc.unizh.ch
Skype: ran.friedman
------------------------------------------------------




More information about the gromacs.org_gmx-users mailing list