Hi all,
I was looking at the output of various g_rmsf runs, and came upon the fact that
the RMSF values obtained using -res and then choosing Mainchain (5)
for RMS calculation, were exactly the same as the RMSF values of
Mainchain Oxygen atoms obtained not using -res. I gave a look at the
code to see why this was the case, and discovered that the averaging
operation:
[src/tools/gmx_rmsf.c lines 355-356]
...
if (bRes) {
average_residues(rmsf,isize,index,w_rls,&top.atoms);
...
is done before the rmsf array is filled with the values from the U
tensors. Thus the values output by g_rmsf are the RMSF values of the
last atom of each residue (and not the average of the residue), and in
the case of the Mainchain, Oxygen.
The attachment is a simple patch for src/tools/gmx_rmsf.c (v 1.3,
GROMACS 3.3) that solves the problem.
Cheers,
marco
-==>_///_/-=>-_/-=>-_////-==>----_//-//--/////-
Marco Pasi, PhD Student
Department of Biotechnology and Biosciences
University of Milan-Bicocca
Piazza della Scienza, 2
20126 Milan - Italy
Phone: +39.02.64483475
E-mail: [EMAIL PROTECTED]
-=>_///-=>--_//=>////---=>_/---///-==>----///--
*** gmx_rmsf.c 2004-02-02 13:33:28.000000000 +0100
--- gmx_rmsf-new.c 2007-04-19 22:08:36.000000000 +0200
*************** int gmx_rmsf(int argc,char *argv[])
*** 352,365 ****
}
sfree(U);
}
if (bRes) {
average_residues(rmsf,isize,index,w_rls,&top.atoms);
label = "Residue";
} else
label = "Atom";
-
- for(i=0; i<isize; i++)
- rmsf[i] = U[i][XX*DIM + XX] + U[i][YY*DIM + YY] + U[i][ZZ*DIM + ZZ];
if (dirfn) {
fprintf(stdout,"\n");
--- 352,365 ----
}
sfree(U);
}
+ for(i=0; i<isize; i++)
+ rmsf[i] = U[i][XX*DIM + XX] + U[i][YY*DIM + YY] + U[i][ZZ*DIM + ZZ];
+
if (bRes) {
average_residues(rmsf,isize,index,w_rls,&top.atoms);
label = "Residue";
} else
label = "Atom";
if (dirfn) {
fprintf(stdout,"\n");
_______________________________________________
gmx-users mailing list [email protected]
http://www.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to [EMAIL PROTECTED]
Can't post? Read http://www.gromacs.org/mailing_lists/users.php