finished rmsd script