From: Zhenyu Lu (zhenyu.lu_at_duke.edu)
Date: Thu Apr 28 2005 - 17:42:23 CDT

Hi,
I have a molecule in two different conformations, saved in xyz file
format,
but the atom indices are NOT in the same order.
Basically I just wana align these two structures by using the indices of
several atoms,
the script for using 4 atoms information is like this:
proc align4 {molid1 i1 i2 i3 i4 molid2 j1 j2 j3 j4} {
  set ref [atomselect $molid1 "index $i1 $i2 $i3 $i4"]
  set sel [atomselect $molid2 "index $j1 $j2 $j3 $j4"]
  set all [atomselect $molid2 all]
  $all move [measure fit $sel $ref]
  set rms [measure rmsd $sel $ref]
  puts "rms: $rms "
}

The script seems to work, but the output rms value is definitely wrong,
also the funny thing is that I tried to align with 3 or other number
of atoms,
it will not work. Does anybody know what's going on? Do I have to reorder
the atoms in my xyz files?

Thanks!
Zhenyu