set j 1
while {$j <=$num_mol} {
# select ref and compare molecule
set mol_comare [atomselect 1 "backbone"]
set mol_ref [atomselect 0 "backbone"]
# compute the transformation
set trans_mat [measure fit $mol_compare $mol_ref]
# do the alignment
$mol_com move $trans_mat
set mol_rmsd_all [measure rmsd $mol_ref $mol_com]
puts $myfile "$j $mol_rmsd_all "
incr j 1
}
close $myfile