From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Fri Mar 23 2018 - 12:24:42 CDT

Hi Peter,

This wouldn't happen to be a pentameric channel of some kind, would it? This is a recording of what I did, and this transformation matrix definitely does what it is supposed to.

set M [list [list -8.055069e-01 1.664229e-01 5.687372e-01 6.593901e+01 ] [list 2.020147e-01 9.793824e-01 -4.700835e-04 -1.096723e+01 ] [list -5.570895e-01 1.145146e-01 -8.225191e-01 -3.810996e+00 ] [list 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 ]]

set sellist [list [atomselect top "all" frame 0]]
set sel [atomselect top "all"]
for { set f 0 } { $f < 4 } { incr f } {
    animate dup top
    $sel frame [expr {$f+1}]
    $sel move $M
    lappend sellist [atomselect top "all" frame [expr {$f+1}]]
}
#Now fuse all the monomers into one structure...
package require topotools
set newmol [::TopoTools::selections2mol $sellist]

In general, you can't directly decompose a multiplied 4x4 matrix into its constituent elements and apply them separately.

-Josh

On 03/21/2018 11:08 AM, Peter Mawanga wrote:
Hello VMD users

I have a Transformation Matrix:

 -8.055069e-01 1.664229e-01 5.687372e-01 6.593901e+01
  2.020147e-01 9.793824e-01 -4.700835e-04 -1.096723e+01
 -5.570895e-01 1.145146e-01 -8.225191e-01 -3.810996e+00
  0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00

And I would like to decompose it into individual rotations and translations along XYZ axes. I used this online tool: https://www.andre-gaschler.com/rotationconverter/aee7c080%7C0%7C0%7C636572489025921106&sdata=heCg1bIQgX%2BOn7YTiWDRI5TYgysrhXP0qXIvbGhGfZE%3D&reserved=0> and converted the 3 x 3 matrix (excluding the 4th row and column) into the individual axial rotations.

But upon applying the rotations successively along XYZ axes and then doing translation along all the three axes gives me a different final coordinate value.

Please check the Tcl script used below:

===================================================

set sel [atomselect top all]
set com [measure center $sel]

$sel moveby [vecscale -1.0 $com]
$sel move [transaxis x 14.7782375]
$sel move [transaxis y 144.6951609]
$sel move [transaxis z 4.574389]
$sel moveby $com

$sel moveby {65.939008 -10.967225 -3.810996}

animate write pdb test.pdb
$sel delete

===================================================

Is there any modification required in the script? Please let me know.

--
Thanks
Peter