Reichsman Frieda wrote:

> I now have more control of my three files, but I am still not sure  
> how to accomplish the objective of independent display using, say,  
> checkboxes.
>
> These are three aligned proteins. I want to give the user the option  
> to turn them on and off independently.
>
> If I say,
> file 0
> display file=1 or file=2 or file=3
> .
> .
> .(some commands, rotations, etc)
> .
> .
> hide file=2
>
> ............... so far so good, file 2 disappears.
>
> hide file=3
>
> ................ file 3 disappears
>
> hide file=1
>
> ................. file 1 disappears, but file 2 and 3 reappear. Is  
> this supposed to happen? I do not get that sense from reading the  
> documentation... Can I display, hide the files completely  
> independently of each other, using display and hide commands?
>
Yes, that is by design. Although I see what you mean that it doesn't 
sound intuitive and thus could be considered a bug. The introductory 
comment I made on these is:

,'# Jmol 10.9.76 adds two new commands, <b>hide</b> and <b>display</b>, 
and two new selectable terms, <b>hidden</b> and <b>displayed</b>. They 
are exact opposites of each other, provided for convenience only. 
<b>display</b> is similar to <b>restrict</b> except it is fully 
reversible. Like <b>restrict</b>, <b>display</b> hides unselected atoms, 
but unlike <b>restrict</b>, you can <b>display all</b> later and see 
everything come back as it was before.'

I realize that "hide" can be more difficult to conceptualize than 
display, but there is a reason for keeping them opposites. What you want 
can be effected using

display displayed and not ...x....

This removes a specific set of atoms x from the display set.

The logic is supposed to be:

"display x"  hides all atoms except x.
"hide x" displays all atoms except x.

To this we add:

display xxx      # display ONLY x
hide not xxx    # same thing!

display not xxx  # display everything but x
hide xxx           # same thing!

display hidden     # toggle shown for unshown
hide displayed     # same thing!

display displayed and not xxx  # remove xxx from the display --- what 
you want here
hide hidden or xxx # same thing!

display displayed or xxx  # add x to the display --- also what you want
hide hidden and not xxx   # add x to the display

So just don't use "hide" if it confuses you. It is never necessary. 
Thinking in terms of what is displayed gets you anything you want. The 
key for this situation is to use "displayed" as part of that checkbox item.

[x] file 1:     [x]"display displayed or file=1"  [ ] "display displayed 
and not file=1"
[x] file 2 :    [x]"display displayed or file=2"  [ ] "display displayed 
and not file=2"
[x] file 3 :    [x]"display displayed or file=3"  [ ] "display displayed 
and not file=3"

In fact, this was precisely the situation that sparked that development 
-- checkboxes of this sort. Perhaps Angel can add this example to the wiki.

And then make it evern friendlier by using checkbox master/group controls:

jmolCheckbox("all/none") #0
jmolCheckbox("file1....") #1
jmolCheckbox("file2....") #2
jmolCheckbox("file3....") #3

jmolSetCheckboxGroup(0, 1 , 2, 3)

This last command sets up checkbox 0 to be the controller for checkboxes 
1-3:

a) When checkbox 0 is checked, all boxes get checked
b) When checkbox 0 is unchecked, all boxes get unchecked
c) When all checkboxes 1-3 are unchecked, checkbox 0 unchecks
d) When all checkboxes 1-3 are checked, then checkbox 0 checks itself

see 
http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/check.htm 
for an example and how to line the boxes up using HTML to look nice. 
This page uses "select selected..." instead of "display displayed...", 
but it's the same idea exactly.


Bob

ps - I'm starting to think that if there were a market, we have enough 
material for a BOOK on Jmol!


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to