Yes, from Python:
cmd.transform_selection( selection,
[m0, m1, m2, ax,
m3, m4, m5, ay,
m6, m7, m8, az,
bx, by, bz, 1])
where b(xyz) is a pre-translation (applied before the rotation) and a(xyz) is a
post-translation (applied after the rotation). This is that we call a TTT
matrix inside PyMOL (translate -> transform -> translate).
Note that the a/b convention of PyMOL's TTT matrices was swapped at some point
in versions pre-1.0 in order to better match the homogenous transformation
matrix convention of:
cmd.transform_selection( selection,
[m0, m1, m2, ax,
m3, m4, m5, ay,
m6, m7, m8, az,
0, 0, 0, 1], homogenous=1)
which, in effect only includes a post-translation.
Cheers,
Warren
# example
dele all
reset
fragment phe, mol1
fragment phe, mol2
cmd.transform_selection("mol1",[0,1,0,-2, -1,0,0,0, 0,0,1,0, 0,-3,0,1])
________________________________________
From: cedric bauvois [mailto:[email protected]]
Sent: Friday, March 27, 2009 5:03 AM
To: [email protected]
Subject: [PyMOL] moving molecules using rotation matrix
Dear All,
Is there any command to move a molecule using this type of matrix ?
-------- rotation matrix to rotate Chain-1 to Chain-2 ------
i t(i) u(i,1) u(i,2) u(i,3)
1 -59.0140477207 0.5936510259 -0.4271312489 0.6820097915
2 26.6732874752 -0.7924917102 -0.4575097139 0.4032886695
3 86.5815155425 0.1397689115 -0.7798998384 -0.6100990849
Thanks
--
..................................................................
Dr. Cedric Bauvois
Cristallographie des protéines
Institut de Recherches Microbiologiques J.-M. Wiame -IRMW
Campus CERIA - Av. E. Gryson, 1
B-1070 Bruxelles, BELGIUM
e-mail: [email protected]
tél: +32 (0)2 5273634
fax: +32 (0)2 5267273
..................................................................