code: public static double rmsd(Point3d[] x, Point3d[] y) {
  
  		if (x.length != y.length) {
  			throw new IllegalArgumentException(
  					"Point arrays are not of the same length.");
  		}
  
  		double sum = 0.0;
  		for (int i = 0; i < x.length; i++) {
  			sum += x[i].distanceSquared(y[i]);
  		}
  		return Math.sqrt(sum / x.length);
  	}
docs: Calculate the RMSD of two point arrays, already superposed.
  
  @param x
  array of points superposed to y
  @param y
  array of points superposed to x
  @return RMSD