Robert Hanson skrev:

Thanks a lot for your quick reply.

> Daniel,
> 
> first, it's important to have the two brackets without whitespace:
> 
> [[
> 
> not
> 
> [ [
> 
> I know, why should that be, right? ....
> 
Well, I don't have a clue ;-) And whitespace seems to work fine...

(On a similar note, I must confess that I don't really understand why 
one should sometimes use straight brackets and othertimes curly, though 
I'm guessing that the former is for matrices, while the other's for 
vectors.)

> second, for rotateSelected you need to indicate that you want a MOLECULAR
> rotation, not one that is defined by the window.
> 
> The code is:
> 
> 
>   r = [[ 0.49441794888, 0.6513774372, -0.5755504549 ], [0.68161107155,
> -0.70143415565, -0.20831819995 ], [
> 
> -0.53940452257,-0.28930530516, -0.79078770946 ]]
>   rq = quaternion(r)

Nice that one doesn't need the r.col(1), r.col(2) construct I found in a 
quite recent list discussion. It made me nervous that I was throwing 
away something.

>   t = { 24.48061828, 16.111736935, 99.953849304 }
>   rotateSelected MOLECULAR @rq
>   translateSelected @t
>
Thanks a lot, that works perfectly.

/Daniel
> 
> 
> On Mon, Dec 21, 2009 at 10:25 AM, Daniel Lundin
> <[email protected]>wrote:
> 
>> Hi,
>>
>> I'm new to the list, but have searched the net for a couple of days for
>> hints as to solve the below described problem, but to no avail. In
>> brief, I have plenty of rotation matrices and translation vectors mainly
>> from EBI's SSM service, but also from the Dali protein structure
>> aligner. What I'd like to do is take any pair of structures, look up the
>> rotation matrix and translation vector for the target structure and view
>> the query and target superposed in Jmol. After reading what I could find
>> about quaternions, I have tried the approach below (which is SSM data,
>> but Dali matrices/vectors fail also), but the second structure ends up
>> far away from the first. Whether it's rotated correctly or not, I don't
>> know for sure, but it seems to be close at least. The loaded structure
>> files are straight from PDB.
>>
>>   $ show _version
>>   _version = 1109011
>>   $ load 1mxr.pdb
>>   $ select *
>>   $ cpk off
>>   $ wireframe off
>>   $ select :A
>>   $ cartoon
>>   $ colour blue
>>   $ appendNew=true
>>   $ load append 1afr.pdb
>>   $ frame *
>>   $ select */2
>>   $ cpk off
>>   $ wireframe off
>>   $ select :C/2
>>   $ cartoon
>>   $ colour red
>>   $ r = [ [ 0.49441794888, 0.6513774372, -0.5755504549 ], [
>> 0.68161107155, -0.70143415565, -0.20831819995 ], [ -0.53940452257,
>> -0.28930530516, -0.79078770946 ] ]
>>   $ rq = quaternion(r.col(1), r.col(2))
>>   $ t = { 24.48061828, 16.111736935, 99.953849304 }
>>   $ rotateSelected @rq
>>   $ translateSelected @t
>>
>> I have also tried applying the matrix/vector to the first (query)
>> structure. Does anyone know what the problem is?
>>
>> /D
>>
>> --
>> Daniel Lundin
>>
>> Department of Molecular Biology & Functional Genomics
>> Arrhenius Laboratories for Natural Sciences
>> Stockholm University, SE-106 91 Stockholm, Sweden
>>
>> tel. +46 (0)8 16 41 95, mobile: +46 (0)708 123 922, fax. +46 (0)8 16 64 88
>>
>> Email: [email protected]
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users


-- 
Daniel Lundin

Department of Molecular Biology & Functional Genomics
Arrhenius Laboratories for Natural Sciences
Stockholm University, SE-106 91 Stockholm, Sweden

tel. +46 (0)8 16 41 95, mobile: +46 (0)708 123 922, fax. +46 (0)8 16 64 88

Email: [email protected]

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to