From: Jon Binkley <binkley@ge...> - 2008-09-30 18:27:22
I have a "hide" button encoded thusly:
jmolButton("select *:A; hbonds off; spacefill off; backbone off;
wireframe off; trace off; slab off; ribbons off; cartoons off; label
off; isoSurface surfA off; dots off; geoSurface surfA off; select
This hides chain 'A' as expected, but does not seem to execute the
final "select none" (the atoms of chain 'A' remain selected). Does
"select none" not work in the context of a button? Is there something
else I can do to accomplish the same thing with the button?
[Jmol version 11.4.6, viewed with Firefox 3.0.3 on Mac OSX 10.5.5]
"select none" should work; being in a button is meaningless. Unless there
has been an error and the script has being terminated. Check the console
or the Java console for errors.
Yes! geosurface does not accept the surface id. Check the doc.
Anyway, you have an easier solution that involves no select:
jmolButton("hide hidden or *:A;", "Hide")
to revert that, you must use
display displayed or *:A
Using "hidden or *:A" instead of plain "*:A" ensures compatibility with
previously hidden atoms (if any)
From: Jon Binkley <binkley@ge...> - 2008-09-30 19:04:06
On Sep 30, 2008, at 11:56 AM, Angel Herráez wrote:
> Yes! geosurface does not accept the surface id. Check the doc.
That did it!
> jmolButton("hide hidden or *:A;", "Hide")
And that does it even better-- many thanks, Angel.
Glad the solution suited you, Jon
The general way of finding problems with scripted buttons and such is to
copy the script and paste it one command at a time in the console.
There you easily see if the command works and any errors that show up.