outsorced rmsd calculation