Great to see this in use. It's the .all modifier that you want.
var myData = jmolEvaluate("{atomno<=10}.property_isTarget.all")
returns 10 lines, with a number on each line. Just parse this using
JavaScript. For the full set, just use:
var myData = jmolEvaluate("{*}.property_isTarget.all")
Steven R. Spilatro wrote:
>Good morning;
>Having created a custom property 'isTarget':
> "select protein and sidechain;
>selected}.property_isTarget=1;{not selected}.property_isTarget=0"
>I would like to later pass it to a javascript variable. Is this
>possible? Is passing to javascript possible, in general, for Jmol
>variables and properties that are not accessible through a
>getpropertyasarray-type or callback functions?
>
>As an aside: The documentation for "if end if", etc, does not
>include the need for semicolons after each statement (if ( ); blah;
>blah; end if); which for at least one person lead to some difficulty
>in getting this to work.
>
>
OK, yes, that can be confusing for people used to other languages. But
you don't need the semis if you use multiple lines:
if (whatever)
print "whatever"
else if (this)
print "this"
endif
endif
I'll make a note of that in the documentation.
>Thanks.
>Steve
>
>
>Dr. Steven R. Spilatro
>Chair, Department of Biology
>Marietta College
>
>
>
>-------------------------------------------------------------------------
>SF.Net email is sponsored by: The Future of Linux Business White Paper
>from Novell. From the desktop to the data center, Linux is going
>mainstream. Let it simplify your IT future.
>http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
>_______________________________________________
>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
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users