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

Hi,
A folloup query:
I figured that the "trans_from_rotate" converts the 3 X 3 matrix (describing
cell basis to a 4 X 4 one... Is there a command that does the opprosite, ie.
obtain the 3X3 rotation matrix only from the trans_rotate matrix?
Thank you,
Neelanjana

On 10/5/06, Neelanjana Sengupta <senguptan_at_gmail.com> wrote:
>
> 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
>
>
>