code: public static double getRMSD(List<Atom[]> transformed) {
  
  		double sumSqDist = 0;
  		int comparisons = 0;
  
  		for (int r1 = 0; r1 < transformed.size(); r1++) {
  			for (int c = 0; c < transformed.get(r1).length; c++) {
  				Atom refAtom = transformed.get(r1)[c];
  				if (refAtom == null)
  					continue;
  
  				double nonNullSqDist = 0;
  				int nonNullLength = 0;
  				for (int r2 = r1 + 1; r2 < transformed.size(); r2++) {
  					Atom atom = transformed.get(r2)[c];
  					if (atom != null) {
  						nonNullSqDist += Calc.getDistanceFast(refAtom, atom);
  						nonNullLength++;
  					}
  				}
  
  				if (nonNullLength > 0) {
  					comparisons++;
  					sumSqDist += nonNullSqDist / nonNullLength;
  				}
  			}
  		}
  		return Math.sqrt(sumSqDist / comparisons);
  	}
docs: Calculates the RMSD of all-to-all structure comparisons (distances),
  given a set of superimposed atoms.
  
  @param transformed
  @return double RMSD
  @see #getRMSD(MultipleAlignment)