Hello

I have a model loaded into a Jmol applet sitting in an HTML page.
I wish to populate a JavaScript variable with the current value of the
ellipsoid probability (as set, e.g. by "ellipsoids 50") when I open
a fresh tab on that page, via an onClick method. How can I most easily
retrieve that value?

So far I have

    'onClick': function(argsObj) {
       var stateInfo=jmolGetPropertyAsString("stateInfo")
       alert(stateInfo)
       return true;
    }

which pops up an alert showing the entire current state (in which
"Ellipsoids 50" appears). Where the alert is called I guess I could parse
the stateInfo string and assign the desired value to my variable. Is there a
more direct way, e.g. by analogy with the modelInfo.modelCount method
of the methodInfo array as shown on the Jmol scripts documentation page?

  var modelInfo = jmolGetPropertyAsArray("modelInfo")
  alert(modelInfo.modelCount)

Thanks
Brian
_________________________________________________________________________
Brian McMahon                                       tel: +44 1244 342878
Research and Development Officer                    fax: +44 1244 314888
International Union of Crystallography            e-mail:  [email protected]
5 Abbey Square, Chester CH1 2HU, England

------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to