well, we'll have to fix that. Here's the calc:
public static float getRmsd(P3[][] centerAndPoints, Quaternion q) {
double sum = 0;
double sum2 = 0;
int n = centerAndPoints[0].length - 1;
P3 ptAnew = new P3();
for (int i = n + 1; --i >= 1;) {
ptAnew.setT(centerAndPoints[0][i]);
ptAnew.sub(centerAndPoints[0][0]);
q.transformP2(ptAnew, ptAnew);
ptAnew.add(centerAndPoints[1][0]);
double d = ptAnew.distance(centerAndPoints[1][i]);
sum += d;
sum2 += d * d;
}
return (float) Math.sqrt((sum2 - sum * sum / n) / (n - 1));
}
OK, my bad. That's a sample distribution. Bet it should be the following,
right?
public static float getRmsd(P3[][] centerAndPoints, Quaternion q) {
double sum2 = 0;
int n = centerAndPoints[0].length - 1;
P3 ptAnew = new P3();
for (int i = n + 1; --i >= 1;) {
ptAnew.setT(centerAndPoints[0][i]);
ptAnew.sub(centerAndPoints[0][0]);
q.transformP2(ptAnew, ptAnew);
ptAnew.add(centerAndPoints[1][0]);
sum2 += ptAnew.distanceSquared(centerAndPoints[1][i]);
}
return (float) Math.sqrt(sum2 / n);
}
On Thu, Feb 28, 2013 at 6:35 PM, Dan Kirshner <[email protected]>wrote:
> The compare command appears to align atoms correctly -- that is, it
> appears to give the same results as Chimera.
>
> The RMSD it reports in the Java console, however, does not match my
> calculations (which do match Chimera!). I haven't been able to figure out
> what Jmol _is_ reporting, but I'm hoping someone (OK, Bob) can add this to
> his to-do list.
>
> Thanks!
>
> --Dan
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users