Opened 8 years ago

Closed 6 years ago

#1009 closed defect (fixed)

molecular surface not included in command-line specifiers of corresponding atoms (protein, nucleic, many others)

Reported by: Elaine Meng Owned by: Conrad Huang
Priority: major Milestone:
Component: Command Line Version:
Keywords: Cc: chimera-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description (last modified by Elaine Meng)

For example, structure 1ncc is antibody H and L chains, and N chain mostly protein but also some glycosylations. The first ~protein in the commands below specifies what I expect, only the glycosylations, but the second one also colors the antibody surfaces.

open 1ncc
select ~protein
surf
surf /n enclose /n include ligand
color ~protein steel blue

I'm thinking this affects all the command-line specifiers of sets of atoms (protein, nucleic, sidechain, ligand ...). Yes, molecular surface models are not atoms, but I think this is wrong behavior. The atomic patches of a molecular surface should be specified along with the corresponding atoms.

I don't know to whom this should be assigned.

Change History (11)

comment:1 by Elaine Meng, 8 years ago

Cc: chimera-programmers added; pett removed
Description: modified (diff)
Owner: Tom Goddard removed
Summary: surface command changes definition of ~protein?molecular surface not included in command-line specifiers of corresponding atoms (protein, nucleic, many others)

comment:2 by Tom Goddard, 8 years ago

Owner: set to Tom Goddard

The problem is that the molecular surface is not part of the "protein" selector, therefore ~protein includes the molecular surface. Not good obviously. Maybe the solution is that "protein" should include the molecular surface model if some of the atoms used to compute the surface are protein.

comment:3 by Tom Goddard, 8 years ago

The same problem occurs with other atom specifiers.

open 1zik
surf
sel ~/a

selects the surface of chain a.

comment:4 by Tom Goddard, 8 years ago

One more bad case

open 1zik
surf
sel ~:1-10

selects all atoms including residues 1-10 because it ends up selecting the surface which in turn selects all the atoms the surface was made from.

Having the selection of one model (molecular surface) depend on and effect the selection of another model is a can of worms. There are good reasons why we want it, but we will need to figure out some conceptual change since the "~" operator is behaving as expected. I don't have an idea yet for what the solution is.

comment:5 by Tom Goddard, 8 years ago

Owner: changed from Tom Goddard to Conrad Huang

This problem with how the invert operator "~" is defined for atom specs is also discussed in ticket #1011.

comment:6 by Elaine Meng, 8 years ago

At least as originally submitted, this ticket was not to solve all things about command-line specification of molecular surfaces (or even broader, all model types). The suggested fix is to make any specification/selection of atoms automatically propagate to their molecular surface patches, just like it already works now for their bonds and pseudobonds.

in reply to:  7 ; comment:7 by goddard@…, 8 years ago

Your description is what the code does now — atom selections are propagated to molecular surfaces.  The problem in this bug report is that the invert operator “~” on specified atoms includes all other models, including whole molecular surfaces, and selecting the molecular surface also propagates to the atoms.  So ~/a selects the molecular surface of /a which in turn selects /a.  This is another case of bug #1011.


comment:8 by pett, 8 years ago

Component: UnassignedCommand Line

comment:9 by Conrad Huang, 7 years ago

This is actually an issue with how the command chooses to interpret the atomspec results, rather than with atomspec evaluation.

If I evaluate "~protein", whether there are surfaces or not, I get 101 atoms, 108 bonds and 5 pseudobonds. If there are no surfaces (displayed or not), there is only 1 model in the atomspec results. If surfaces are created (whether shown or not), there are 5 models (1 structure, 1 pseudobond and 3 molecular surfaces).

The "color" command goes through the selected model list and adds the atoms from molecular surfaces whose atoms do not intersect the selected atoms. By contrast, the "select" command adds atoms from molecular surfaces that have atom patches. In both cases, essentially all the protein atoms get added because:

  • for "color", the surfaces are computed from the protein atoms, which do not intersect with "~protein".
  • for "select", all the protein atoms have atom patches on the molecular surfaces.

Would it make more sense to only add atoms that belong to structures other than the ones containing the selected atoms? If the atomspec already mentions a particular structure, isn't it reasonable to assume that all the atoms of interest in that structure is already selected and therefore no others should be added?

comment:10 by Conrad Huang, 7 years ago

Status: assignedfeedback

Tried to fix this with 015d598d7.

When models are created now, they can set their selection_coupled attribute, which should be an instance of atomic.AtomicStructures. When inverting an atomspec, a non-selected non-structure models are added to the new inverted set, unless one of its selection-coupled models is already selected. Molecular surface instances now set their selection_coupled attribute and therefore no longer appear in the inversion of ~protein.

Not sure what other ramifications there are to this change, so I'm leaving the ticket open in feedback state. Just in case.

comment:11 by Conrad Huang, 6 years ago

Resolution: fixed
Status: feedbackclosed

No complaints for a year.

Note: See TracTickets for help on using tickets.