VMD-L Mailing List
From: Peter Mawanga (peter.mawanga.lagos_at_gmail.com)
Date: Wed Mar 21 2018 - 11:12:20 CDT
- Next message: Ashar Malik: "Re: Propagating PDB coordinates using Quaternion matrix"
- Previous message: John Stone: "Re: polyhedra representation + periodic images"
- Next in thread: Ashar Malik: "Re: Decompose Transformation Matrix to Rotations and Translations along XYZ axes"
- Reply: Ashar Malik: "Re: Decompose Transformation Matrix to Rotations and Translations along XYZ axes"
- Reply: Vermaas, Joshua: "Re: Decompose Transformation Matrix to Rotations and Translations along XYZ axes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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/ 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
- Next message: Ashar Malik: "Re: Propagating PDB coordinates using Quaternion matrix"
- Previous message: John Stone: "Re: polyhedra representation + periodic images"
- Next in thread: Ashar Malik: "Re: Decompose Transformation Matrix to Rotations and Translations along XYZ axes"
- Reply: Ashar Malik: "Re: Decompose Transformation Matrix to Rotations and Translations along XYZ axes"
- Reply: Vermaas, Joshua: "Re: Decompose Transformation Matrix to Rotations and Translations along XYZ axes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]