Re: [Jmol-users] passing a variable from JavaScript to JmolScript

2011-03-25 Thread Yingjie Lin
Hi Angel > How about > jmolScript("var myJmolVar = " + myJSvar) > > that would pass the value to the 'myJmolVar' variable in JmolScript. > Or do you need something more complicated that just getting the variable? This is great! It's exactly what I want and much simpler than I thought. Thanks an

Re: [Jmol-users] jmolSetTarget() for 2 out of 3 applets

2011-03-25 Thread Paul Pillot
I'm pretty sure it does : You can sync scripts so that you when send a script to one applet, this applet sends it to the other target applets. -Paul Le 25 mars 2011 à 22:28, Angel Herráez a écrit : > Thanks to both > > @Paul: > > have you ventured the sync command ? > > Haven't tried that. I a

Re: [Jmol-users] one label per residue

2011-03-25 Thread Robert Hanson
On Fri, Mar 25, 2011 at 4:18 PM, Yingjie Lin wrote: > Hi Bob, > > Your answer is very thorough. My problem is solved. More importantly, I > learned a lot from your solutions. Thank you! > > you are welcome. > Two side questions: > 1. when replying to a thread, does the title of my email matter?

Re: [Jmol-users] one label per residue

2011-03-25 Thread Oliver Stueker
Hi Yingjie, Yes, on this list one can really learn a lot about JmolScripting and combining this with other web techniques. On Fri, Mar 25, 2011 at 15:18, Yingjie Lin wrote: > Hi Bob, > > Your answer is very thorough. My problem is solved. More importantly, I > learned a lot from your solutions.

Re: [Jmol-users] passing a variable from JavaScript to JmolScript

2011-03-25 Thread Angel Herráez
Yingjie, I think it's easier > I have a variable X in JavaScript, and I am looking for a way to pass it back > to Jmol. How about jmolScript("var myJmolVar = " + myJSvar) that would pass the value to the 'myJmolVar' variable in JmolScript. Or do you need something more complicated that just

Re: [Jmol-users] one label per residue

2011-03-25 Thread Yingjie Lin
Hi Bob, Your answer is very thorough. My problem is solved. More importantly, I learned a lot from your solutions. Thank you! Two side questions: 1. when replying to a thread, does the title of my email matter? For example, should I use "Re: Jmol-users Digest, Vol 58, Issue 33" or "Re: jmolEva

Re: [Jmol-users] jmolSetTarget() for 2 out of 3 applets

2011-03-25 Thread Angel Herráez
Thanks to both @Paul: > have you ventured the sync command ? Haven't tried that. I am not confident with sync. And this is for a checkbox that defines some atom sets and applies some styles. I'm not sure sync does anything on that. @Bob: > I think you could tweak the JavaScript to ignore one

[Jmol-users] passing a variable from JavaScript to JmolScript

2011-03-25 Thread Yingjie Lin
Dear Jmolers, I have a variable X in JavaScript, and I am looking for a way to pass it back to Jmol. I did my homework and found that save javascript:functionCall() might be what I need. However, I couldn't figure out how this should be used in Jmol. For example, where to place this express

Re: [Jmol-users] jmolSetTarget() for 2 out of 3 applets

2011-03-25 Thread Robert Hanson
I think you could tweak the JavaScript to ignore one. This is on a particular page, right? One you know the IDs for? _jmol.appletsExcludeFromAll = ";1;4;" function jmolScript(script, targetSuffix) { if (script) { _jmolCheckBrowser(); if (targetSuffix == "all") { with (_jmol) {

Re: [Jmol-users] jmolSetTarget() for 2 out of 3 applets

2011-03-25 Thread Paul Pillot
have you ventured the sync command ? http://chemapps.stolaf.edu/jmol/docs/#sync -Paul Le 25 mars 2011 à 21:44, Angel Herráez a écrit : > Hi all > > I'd like to use jmolSetTarget() to target two applets but not a third one. > > I started using "all" as the parameter when I only had 2 applets in

[Jmol-users] jmolSetTarget() for 2 out of 3 applets

2011-03-25 Thread Angel Herráez
Hi all I'd like to use jmolSetTarget() to target two applets but not a third one. I started using "all" as the parameter when I only had 2 applets in the page, but after adding the 3rd one I'm stuck. Any solutions? Thanks -

Re: [Jmol-users] turning frank off...

2011-03-25 Thread Robert Hanson
'fraid not. On Fri, Mar 25, 2011 at 2:45 PM, Andreas Prlic wrote: > I see. Any chance to be able to influence the color for the frank in > this case? The red clashes with my other color choices... > > Thanks, > Andreas > > On Fri, Mar 25, 2011 at 12:34 PM, Robert Hanson > wrote: > > yes, that's

Re: [Jmol-users] turning frank off...

2011-03-25 Thread Andreas Prlic
I see. Any chance to be able to influence the color for the frank in this case? The red clashes with my other color choices... Thanks, Andreas On Fri, Mar 25, 2011 at 12:34 PM, Robert Hanson wrote: > yes, that's right. A bit of a security feature -- I want to know if the > applet I'm looking at

Re: [Jmol-users] Anaheim presentation; Jmol 12.1.41/12.0.38 release

2011-03-25 Thread Robert Hanson
Oh, also, I think I'm finally up to date at http://chemapps.stolaf.edu/jmol/docs/examples-12/new.htm On Fri, Mar 25, 2011 at 2:42 PM, Robert Hanson wrote: > Here's a preview of the presentation I'm making in Anaheim at the ACS > meeting on Monday: > > http://stolaf.edu/depts/chemistry/bh/acs201

[Jmol-users] Anaheim presentation; Jmol 12.1.41/12.0.38 release

2011-03-25 Thread Robert Hanson
Here's a preview of the presentation I'm making in Anaheim at the ACS meeting on Monday: http://stolaf.edu/depts/chemistry/bh/acs2011/acs-03-2011-jmolModelKit.ppt It's all about modelKit mode and Otis Rothenberger's/Tom Newton's amazing web site http://chemagic.com/web_molecules Thank you, Nico

Re: [Jmol-users] turning frank off...

2011-03-25 Thread Robert Hanson
yes, that's right. A bit of a security feature -- I want to know if the applet I'm looking at is signed or not. On Fri, Mar 25, 2011 at 12:34 PM, Andreas Prlic wrote: > Hi, > > I was just playing around with turning the "frank" of Jmol off. It > seems it currently can be turned off in the unsign

[Jmol-users] turning frank off...

2011-03-25 Thread Andreas Prlic
Hi, I was just playing around with turning the "frank" of Jmol off. It seems it currently can be turned off in the unsigned version of the applet, but not in the signed version (both 12.0.37). Is this the expected behavior? Thanks, Andreas

Re: [Jmol-users] problem with "set measureAllModels ON"

2011-03-25 Thread Robert Hanson
Here you go: var atomList = {46:A.ca} var n = atomList.length for (var i = 2; i <= n; i++) { measure @{atomList[1]} @{atomList[i]} } Bob -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-310

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-25 Thread Robert Hanson
Michael, my reading of that discussion is that you have access to all the normal objects and functions on the page, just like normal HTML in a browser. So there should be no need to futz with other objects. You just have to experiment a bit and see what you can find. This page uses Jmol.js, right?

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-25 Thread Michael Marden
Ok, I'll look into the i/o via JavaScript functions. That immediately leads to the question of how to obtain a list of available functions and their parameters/formats, etc. VB - WebBrowser - Page elements - JS functions - Jmol commands ? I'm a bit fuzzy on the line of events (and exact format

Re: [Jmol-users] problem with "set measureAllModels ON"

2011-03-25 Thread Daniel Carbajo
So what I am trying to do is the following: I have a native structure plus a variable number of homology models. I want to measure all the distances between a certain residue in the native structure, to its corresponding residue in each model. Instead of: measure (1.1 and 46:A.ca) (not 1.1 and 46:

Re: [Jmol-users] one label per residue

2011-03-25 Thread Robert Hanson
Yingji, >> How can I make sure that it's labeled? Ah, right. OK, if I have this right, you have a box and only the atoms in the box are visible. Some groups are totally in the box, some are only partially in the box, such that the alpha carbon is in the box, and thus visible, and some are only p