x = Jmol.evaluateVar(jmolApplet0, "altlocpivotkeys")

On Tue, Sep 1, 2015 at 5:58 PM, Eric Martz <ema...@microbio.umass.edu>
wrote:

> I have not been able to figure out how to get an array from Jmol applet
> into a Javascript array. For example, in the Jmol applet, I create a Jmol
> array:
>
> (Jmol applet contains 1bsz)
> (Jmol applet output in red)
>
> altlocpivot = {altloc!=""}.altloc.all.pivot;
> altlocpivotkeys = altlocpivot.keys;
> print altlocpivotkeys.type
>   array
> print altlocpivotkeys
>   A
>   B
>   C
>
> Now I want to get altlocpivotkeys into Javascript as an array.
> Perhaps something like
>
> x = getPropertyAsArray(jmolApplet0, "variableInfo altlocpivotkeys")
>
> (But Jmol says "getProperty ERROR". I think that I haven't been able to
> guess the syntax to specify the variable name. There is no example in the
> documentation.)
>
> With success, I am expecting the result in Javascript to be the equivalent
> of
> x = ["A", "B", "C"];
> so that
> x.length is 3
> x[1] is "B"
>
> Any help welcome.
> Thanks, Eric
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to