Bob Hanson wrote:
> Eric Martz wrote:
> 
>> I surmise that it is still not possible to make the mouse actions 
>> (rotate, zoom at least) in one jmol applet propagate to other 
>> specified jmol applets on the same web page, thereby synchronizing 
>> their mouse-controlled movements. Again, I'd like to advocate for this.
>>  
>>
> I think it is possible.
> 
>> Chime has mouse synchronization and it is fantastic for comparing two 
>> molecules. If you orient the two molecules in alignment at the 
>> outset, mouse-controlled-rotations and zooms occur on both molecules. 
>> This makes comparisons ever so much easier and better. I'd like to do 
>> some 2-molecule comparisons in upcoming Jmol tutorials, but without 
>> synchronization, it is much less useful.
>>
>> In Chime, synchronization could be controlled only at embed time 
>> (equivalent to <applet> parameters for Jmol). First, one needed 
>> "sendmouse=true" and then one needed "target=[chime_name]" for each 
>> Chime whose movements are to be controlled by the one containing 
>> these embed tags. I have seen pages with six Chimes, where all 
>> followed the mouse actions in any one. Amazing to behold!
>>
>>  
>>
> This, of course, is rather inflexible. With Jmol, synchronization is 
> carried out using a JavaScript timer:
> 
> syncEnabled=true
> 
> function startSync() {
>  syncEnabled = true
>  setTimeout("sync()",100)
> }
> 
> function stopSync() {
>  syncEnabled = false
> }
> 
> 
> sLast = ''
> inSync=false
> function sync() {
>  if (inSync)return
>  inSync=true
> if (syncEnabled) {
>    var s = jmolGetPropertyAsArray("orientationInfo","","A").moveTo
>    if (s != sLast)jmolScriptWait(s.replace(/1\.0/,"0.1"),"B")
>    sLast = s
>    inSync=false
>    startSync()
> }
>  inSync=false
> }
> 
> In this way, one has far more control over the outcome than what Chime 
> could do (I think). True, it's a bit more involved, but it registers ANY 
> orientation change (spinning, for example), not just those generated 
> with the mouse. I think an argument could be made that this is exactly 
> what JavaScript is for.
> 
> See http://chemapps.stolaf.edu/jmol/docs/examples-11/compare2.htm
> 
> I'm interested if this works on all browsers. I only tested it on a PC 
> running Windows with Firefox.
> 

It worked with konqueror 3.5.5 on OpenSuSE 10.2.

It didn't work with Firefox 2.0.0.5 on OpenSuSE 10.2.
The PDB file was loaded only in the left applet after clicking on "load
PDB file". After manually loading the file in the right applet there was
no synchronization and the border around the applet always stayed white.
(Javascript error: applet.loadInline is not a function)

Regards,
Rolf

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to