Opened 6 years ago

Closed 6 years ago

#2272 closed enhancement (not a bug)

Command "hide #1" does not hide ribbons or surfaces

Reported by: rjr27@… Owned by: Tom Goddard
Priority: moderate Milestone:
Component: Depiction Version:
Keywords: Cc: Elaine Meng
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Intuitively, I would expect "hide #1" to hide everything associated with representing object #1, but this only hides the atomic representation.

Change History (3)

comment:1 by pett, 6 years ago

Reported by Randy Read

in reply to:  2 ; comment:2 by Elaine Meng, 6 years ago

Hi Randy, 
I guess you want “hide #1 models”  … which only acts on pre-existing surfaces, e.g. “show #1 models” will not generate a molecular surface if it wasn’t already made with the surface command.  The “models” option is default for show/hide nonatomic models.  However, it is not the default for atomic models because the common case of specifying certain atoms or residues  (“show /A:5” or “show :ALA”) wouldn’t even show those atoms if they weren’t already shown, which would be EXTREMELY confusing.  I don’t know if our specifier parsing allows for setting the default hide/show keyword differently if you only give model numbers #N, but even if it did, then the people who want to show all atoms in the model would then have to use the “atoms” keyword.  
Elaine 

comment:3 by Tom Goddard, 6 years ago

Resolution: not a bug
Status: assignedclosed
Summary: No-arg "hide" unintuitiveCommand "hide #1" does not hide ribbons or surfaces

I agree, I'd expect "hide #1" to hide #1 and it doesn't, it only hides the atoms. As Elaine mentioned, what you most likely want is "hide #1 model". That remembers which atoms, ribbons and surface patches are shown, so that when you later say "show #1 model" you see the atoms and ribbons you were originally showing.

The trouble with making "hide #1" do "hide #1 model" by default is that the hide command is used to do other things and we don't think that hiding the whole model is the main use, instead hiding some specific atoms, like "hide solvent", or hiding a chain "hide /B" and commands hide specific atoms, not the whole model. It is possible we could have "hide #1" hide the model, while "hide /B" hides the atoms, but then the rules get tricky for the user to understand. The Python code that runs ChimeraX commands gets list of atoms, so the rule it would have to use is something like if all the atoms of a model were specified then instead of hiding the atoms, hide the model. Then the question would be what to do about "show #1"? Should it show the model or the atoms? I think it would have to show the model and not change which atoms are shown. If it were to show the atoms you would get the bad behavior where "hide #1" followed by "show #1" ended up showing all the atoms where initially in most cases they aren't all shown. But if "show #1" shows only the model and not the atoms, then the user has to use "show #1 atoms" to show the atoms. That is a pretty common use, showing all atoms.

You get the idea. The hide and show commands can hide and show lot of things and unfortunately it is not possible for the command to always do the expected thing, because the expected thing depends on what the user is trying to do. So we try to favor the most common uses. The reason "hide #1" is not as common a use as you might think is that most users click the shown button in Model Panel to hide and show models. More knowledgable command-line users might use "hide #1 model".

Unfortunately ChimeraX has to make a fair number of these kinds of compromises because it has tricky non-obvious capabilities like hiding a model while still remembering which atoms are shown, which ribbons, which patches of surface, each of which can be hidden using different hide command options.

I appreciate your asking about this usability issue -- most people won't spend the time to report user interface issues -- they just report errors. In this case I don't have an idea how to improve the hide command.

Note: See TracTickets for help on using tickets.