From: Neelanjana Sengupta (senguptan_at_gmail.com)
Date: Thu Oct 05 2006 - 11:55:17 CDT

Hi,
The pbc.tcl script in the script library involves orhtonormalizing a system,
and finding the cell bases in terms of the orthonormal system:

a) # Orthonormalize system:
         # Find an orthonormal basis (in cartesian coords)
         set obase [orthonormal_basis $a1 $a2 $a3]
         set b_cartcoor [basis_change $obase [list {1 0 0} {0 1 0} {0 0 1}]
]
         set b2carti [trans_from_rotate $b_cartcoor]
         set b2cart [measure inverse $b2carti]

 b) # Get coordinates of $a in terms of $obase
         set m [basis_change [list $a1 $a2 $a3] $obase]
         set rmat [measure inverse [trans_from_rotate $m]]
         # actually: [transmult $b2cart $b2carti $rmat $b2cart]
         set mat4 [transmult $rmat $b2cart]

Can somebody tell me
a) what the "trans_from_rotate" command does? And, why is it necessary to
find the inverse of the b2carti matrix?
b) In b), what is the purpose of the 'rmat' matrix. and why is rmat
multiplied with b2cart?

Thanks in advance,
Neelanjana Sengupta