[gmx-developers] g_cluster issues

Sergei mce2000 at mail.ru
Wed Nov 14 22:13:18 CET 2012


Hi!

Digging into g_cluster code showed something that seem a bit strange for
me: when asking for the first index group, it claims this group will be
used "for least squares fit and RMSD calculation", however it's actually
used only for fitting and RMSD calculation is performed over the whole
superposition of both selected index groups (see gmx_cluster.c line
1299). This line is supposed to be fixed to sth like:

rmsd = rmsdev_ind(ifsize,fitidx,mass,xx[i2],x1);

however similar fix is required for RMS distance deviation matrix
calculation code.
And there is performance issue: if -nofit option is not specified, there
is no need to copy each structure into a new array (lines 1295-1296).
Combining this with previous issue, the following code is suggested:

	  if (bFit) {
	    for(i=0; i<isize; i++)
	      copy_rvec(xx[i1][i],x1[i]);
	    do_fit(isize,mass,xx[i2],x1);
	    rmsd = rmsdev_ind(ifsize,fitidx,mass,xx[i2],x1);
	  } else {
	    rmsd = rmsdev_ind(ifsize,fitidx,mass,xx[i2],xx[i1]);
	  }

And finally 'diagonalization' method issue: using this method without
externally calculated RMSD matrix causes RMSD matrix to consist of NaN-s
due to the fact that atom masses are not read by read_tps_conf (at line
1191 as bAnalyze is 0) but are used in RMSD calculation.

Thanks!

-- 
Sincerely,
  Sergei



More information about the gromacs.org_gmx-developers mailing list