On Mon, Apr 12, 2010 at 7:58 AM, Eric Martz <[email protected]>wrote:
> 2. However, I have not discerned the correct syntax for assigning the
> number of ssbonds to a Jmol variable.
>
>
x = getProperty("bondinfo", {_S}).lengthThe example at
http://chemapps.stolaf.edu/jmol/docs/#getproperty
>
> var modelInfo = jmolGetPropertyAsArray("modelInfo")
> alert(modelInfo.modelCount)
> for (int i = 0; i < modelInfo.modelCount; i++)
> alert(modelInfo.models[i].name).
>
> used .modelCount.
>
>
That's JavaScript, not Jmol script.
3. How would I get the .bondCount in Jmol?
x = {*}.bonds.size
(can't use .length here because in this context it would mean "average
length of all the bonds")
> 4. If I successfully get the .bondCount into a Jmol variable (or any
> other value), can I retrieve that value in javascript?
>
> x = 5
> javascript alert(jmolGetPropertyAsString(x))
>
> produces no alert at new.htm.
>
> x= "alert('" + {*}.bonds.size + "')";javascript @x
better from the JavaScript side:
alert(jmolEvaluate("{*}.bonds.size"))
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-3107
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
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users