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.

>In 2-molecule comparison MolSlides with Chime, I make the bottom 
>Chime follow the top one, but not vice versa. This enables one to set 
>the desired relationship by rotating the bottom one (the top doesn't 
>follow), after which by rotating the top one, the bottom stays 
>synchronized. Thus, it wpuld be useful to be able to control which 
>Jmol's follow which.
>
>  
>
as shown in compare2.htm, rotating either one controls the other 
automatically.

>As was (regrettably) common with Chime, I don't think there were any 
>script commands to control synchronization, but there should have been.
>
>For anyone who has Chime installed and working, the 5th slide here 
>demonstrates bottom-following-top but not vice versa:
>http://tinyurl.com/2fy7ol
>
>Chime's documentation on sendmouse:
>http://www.mdl.com/support/developer/chime/developer_tools/chimeembed.jsp#sendmouse
>
>  
>
at one point I put an "orientation change event" into Jmol, but that 
didn't prove to be very helpful. Please try this JavaScript method and 
let me know how it works for you, Eric.


Bob


>The corresponding section on target is not complete/correct.
>
>Thanks, -Eric
>
>/* - - - - - - - - - - - - - - - - - - - - - - - - - - -
>Eric Martz, Professor Emeritus, Dept Microbiology
>U Mass, Amherst -- http://www.umass.edu/molvis/martz
>
>Biochem 3D Education Resources http://MolviZ.org
>See 3D Molecules, Install Nothing! - http://firstglance.jmol.org
>Protein Explorer - 3D Visualization: http://proteinexplorer.org
>Workshops: http://workshops.proteinexplorer.org
>World Index of Molecular Visualization Resources: http://molvisindex.org
>ConSurf - Find Conserved Patches in Proteins: http://consurf.tau.ac.il
>Atlas of Macromolecules: http://atlas.proteinexplorer.org
>PDB Lite Macromolecule Finder: http://pdblite.org
>Molecular Visualization EMail List (molvis-list):
>       http://bioinformatics.org/mailman/listinfo/molvis-list
>- - - - - - - - - - - - - - - - - - - - - - - - - - - */
>
>
>-------------------------------------------------------------------------
>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
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get. 

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



-------------------------------------------------------------------------
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