add RMSD calculation routine