Opened 5 years ago

Closed 4 days ago

#4168 closed defect (fixed)

Show alternate locations simultaneously

Reported by: udakshi@… Owned by: Eric Pettersen
Priority: normal Milestone:
Component: Graphics Version:
Keywords: Cc: Tom Goddard, Tristan Croll, Elaine Meng
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description (last modified by Eric Pettersen)

The following bug report has been submitted:
Platform:        Windows-10-10.0.17763
ChimeraX Version: 0.91 (2019-11-28)
Description
Hi team, 

I am trying to display alternate confirmation for amino acid residue and for some reason I cannot display this in chimeraX, while in previous versions I can do this. 

Please help fix the issue.

Thanks
Uma

OpenGL version: 3.3.0 NVIDIA 388.16
OpenGL renderer: Quadro P4000/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (21)

comment:1 by Eric Pettersen, 5 years ago

Component: UnassignedCore
Owner: set to Eric Pettersen
Platform: all
Project: ChimeraX
Status: newaccepted
Summary: ChimeraX bug report submissionShow alternate locations

comment:2 by Eric Pettersen, 5 years ago

Hi Uma,

You cannot show all alt locs simultaneously, like you can in Chimera. You can change between alt locs using commands. We want to offer a tool to make this easier but have not had time to get to it yet. A couple of example commands....

Select all atoms that have more than one alt loc:

sel @@num_alt_locs>1

Change all selected atoms to their 'B' alt loc:

setattr sel a alt_loc B

Let me know if you need more help.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab

in reply to:  3 ; comment:3 by uma-lakshmi.dakshinamoorthy@…, 5 years ago

Hi Eric Pettersen, 

Thanks for your reply.

Can we expect in future that we can show all alternate confirmation simultaneously ?

This is very important in structural biology. Two of my colleagues as well had the same issue. 
Can we request this feature to be included ?

Best 
Uma

-----Original Message-----
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> 
Sent: Montag, 25. Januar 2021 19:54
Cc: pett@cgl.ucsf.edu; Dakshinamoorthy, Uma Lakshmi <uma-lakshmi.dakshinamoorthy@mpibpc.mpg.de>
Subject: Re: [ChimeraX] #4168: Show alternate locations

#4168: Show alternate locations
--------------------------------+----------------------------
          Reporter:  udakshi@…  |      Owner:  Eric Pettersen
              Type:  defect     |     Status:  accepted
          Priority:  normal     |  Milestone:
         Component:  Core       |    Version:
        Resolution:             |   Keywords:
        Blocked By:             |   Blocking:h
Notify when closed:             |   Platform:  all
           Project:  ChimeraX   |
--------------------------------+----------------------------

Comment (by Eric Pettersen):

 Hi Uma,
         You cannot show all alt locs simultaneously, like you can in  Chimera.  You can change between alt locs using commands.  We want to  offer a tool to make this easier but have not had time to get to it yet.
 A couple of example commands....

 Select all atoms that have more than one alt loc:

         sel @@num_alt_locs>1

 Change all selected atoms to their 'B' alt loc:

         setattr sel a alt_loc B

 Let me know if you need more help.

 --Eric

         Eric Pettersen
         UCSF Computer Graphics Lab

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/4168#comment:2>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:4 by Eric Pettersen, 5 years ago

Cc: Eric Pettersen Tristan Croll Elaine Meng added
Component: CoreGraphics
Owner: changed from Eric Pettersen to Tom Goddard
Status: acceptedassigned
Summary: Show alternate locationsShow alternate locations simultaneously

Hi Uma,

I'm not certain whether we will be able to show all alt locs simultaneously or not. If we do, you probably wouldn't be able to do much except look at the alt locs that weren't the "current" alt loc. I don't know if that would be good enough for your purposes.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab

comment:5 by Tristan Croll, 5 years ago

As it happens, this issue has been on my mind quite a bit lately as well! Altlocs are starting to show up more and more often in the highest resolution cryo-EM maps, meaning that it's about time I started adding support for working with them in ISOLDE. I agree that it's important to be able to see them (in the context of ISOLDE, without seeing them it's currently impossible to visually distinguish between sites where you have and haven't modelled one). I think a scenario where altlocs are visible (probably in a slightly different representation - i.e. thinner and/or greyed-out bonds) but not manipulable until activated would be fine - probably the preferable approach, in fact, since it should help ensure that groups of altloc atoms are self-consistent. I was thinking about adding the necessary representation code to the Clipper plugin, but I think it would be even better if the functionality was available in core ChimeraX.

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

It might be good to have a similar display (and maybe associated dialog where you can choose any subset for display) similar to the "bouquet" of sidechain rotamers shown by the Rotamers tool.

in reply to:  7 ; comment:7 by uma-lakshmi.dakshinamoorthy@…, 5 years ago

Thanks for all the help, 

I hope we can have this feature soon in chimera. 
This would be really useful in more than one way. 

Alt loc maybe used by protein during activation and forms Hbond only in one specific loc. 

Best 
Uma

-----Original Message-----
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> 
Sent: Montag, 25. Januar 2021 21:36
Cc: goddard@cgl.ucsf.edu; meng@cgl.ucsf.edu; pett@cgl.ucsf.edu; tic20@cam.ac.uk; Dakshinamoorthy, Uma Lakshmi <uma-lakshmi.dakshinamoorthy@mpibpc.mpg.de>
Subject: Re: [ChimeraX] #4168: Show alternate locations simultaneously

#4168: Show alternate locations simultaneously
--------------------------------+-------------------------
          Reporter:  udakshi@…  |      Owner:  Tom Goddard
              Type:  defect     |     Status:  assigned
          Priority:  normal     |  Milestone:
         Component:  Graphics   |    Version:
        Resolution:             |   Keywords:
        Blocked By:             |   Blocking:
Notify when closed:             |   Platform:  all
           Project:  ChimeraX   |
--------------------------------+-------------------------

Comment (by Tristan Croll):

 As it happens, this issue has been on my mind quite a bit lately as well!
 Altlocs are starting to show up more and more often in the highest  resolution cryo-EM maps, meaning that it's about time I started adding  support for working with them in ISOLDE. I agree that it's important to be  able to see them (in the context of ISOLDE, without seeing them it's  currently impossible to visually distinguish between sites where you have  and haven't modelled one). I think a scenario where altlocs are visible  (probably in a slightly different representation - i.e. thinner and/or  greyed-out bonds) but not manipulable until activated would be fine -  probably the preferable approach, in fact, since it should help ensure  that groups of altloc atoms are self-consistent. I was thinking about  adding the necessary representation code to the Clipper plugin, but I  think it would be even better if the functionality was available in core  ChimeraX.

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/4168#comment:5>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:8 by Eric Pettersen, 5 years ago

It would probably be good have both display-only of non-current alt locs (for scripts and usage scenarios like Tristan's) and a Rotamers-like tool for interactive exploration of alt loc properties.

in reply to:  9 ; comment:9 by Tristan Croll, 5 years ago

Also to be able to delete altlocs (as far as I can tell that's not possible right now)?
________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: 25 January 2021 21:10
Cc: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; meng@cgl.ucsf.edu <meng@cgl.ucsf.edu>; pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>; Tristan Croll <tic20@cam.ac.uk>; udakshi@mpibpc.mpg.de <udakshi@mpibpc.mpg.de>
Subject: Re: [ChimeraX] #4168: Show alternate locations simultaneously

#4168: Show alternate locations simultaneously
--------------------------------+-------------------------
          Reporter:  udakshi@…  |      Owner:  Tom Goddard
              Type:  defect     |     Status:  assigned
          Priority:  normal     |  Milestone:
         Component:  Graphics   |    Version:
        Resolution:             |   Keywords:
        Blocked By:             |   Blocking:
Notify when closed:             |   Platform:  all
           Project:  ChimeraX   |
--------------------------------+-------------------------

Comment (by Eric Pettersen):

 It would probably be good have both display-only of non-current alt locs
 (for scripts and usage scenarios like Tristan's) and a Rotamers-like tool
 for interactive exploration of alt loc properties.

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/4168#comment:8>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:10 by Tom Goddard, 5 years ago

Cc: Tom Goddard added; Eric Pettersen removed
Owner: changed from Tom Goddard to Eric Pettersen

Alt-locs are difficult to handle well. In Chimera classic each altloc is a separate atom with its own color, style (stick/ball/sphere), display hide/show state, bond, bond color, bond style, bond radius, halfbond color mode... in other words all the many settings that control atom display. You could specify altlocs in a command like "select @.B". None of that is possible in ChimeraX currently. Altlocs are not treated as separate atoms in ChimeraX, they are just alternate positions of a single atom. The Chimera way made it simple to manipulate display of altlocs but made it a nightmare for analysis code, like trying to find hbonds or add hydrogens. In Chimera you might see a carbon with 7 different bonded atoms, but several are altloc atoms. It was the duty of any analysis code to figure out how to ignore or choose among the altlocs. I think because Eric found that a big problem in Chimera he decided in ChimeraX to not have these "extra" atoms, hence ChimeraX has only one atom which can have a list of alternate positions. That is much simpler for analysis but means none of the commands that work on atoms cannot act on specific altlocs -- there is not a way to specify an altloc in a command, and even if there was a syntax for it (like in Chimera @atomname.altloc) the "altloc" is not something that ChimeraX selections support.

The net result of the difference between Chimera and ChimeraX is that the user interface for altlocs may have to be all custom since they are not treated as separate atoms. The altlocs are second-class citizens in ChimeraX.

I think the first question to ask is what level of control is needed for altlocs? For instance, you want to be able to delete them. I don't know if that is possible. Ideally I guess you would expect "delete :23@…" but as mentioned that form of specifier for an altloc does not exist in ChimeraX. What will the commands look like to display altlocs? Are you able to display them for just one atom, or are you forced to display them for all atoms of a structure? Can you set their color or radius different from the atom (like gray suggested by Tristan)? Can you control stick vs ball vs sphere vs wire display style? for all altlocs in a structure or individually? Will you be able to select with the mouse one altloc and then act on it (e.g. delete it or hide it)?

So we need a specification of the kinds of actions that will be possible on altlocs and what the commands will look like to do those things. I am reassigning this to Eric to figure that out. As far as the graphics go, display of altlocs will make atom/bond display twice as complex which is a sizable hit. I'd envision making all altloc display be handled in a submodel of the structure to help keep the complexity of the code in check.

comment:11 by Tristan Croll, 5 years ago

A few thoughts on my part:

  • I think the approach where only currently active altloc atoms are treated as "real" will generally be the best one. Not only should this save on complexity and performance in the drawing code as Tom suggests, but in general I think it's what people will expect.
  • My personal preference is the "all or nothing" approach to displaying and switching between altlocs, at least as the default behaviour. In the context of ISOLDE, this will be crucial to ensuring that all atoms sharing an altloc are internally consistent. Unfortunately though, historically that sort of consistency has been a rarity - many existing structures have sites where altloc 'A' on one residue needs to go with altloc 'B' on another. So there will probably need to be the option for fine-grained selection (or a tool to allow the user to rearrange the altloc labelling for consistency).

in reply to:  12 ; comment:12 by goddard@…, 5 years ago

One of the drawbacks of an individual altloc atom not being selectable is that if you hover the mouse over and altloc atom it won't show you a popup label telling what altloc it is.  Maybe some special hack could allow this but currently it simply describes what would be selected under the mouse.

in reply to:  13 ; comment:13 by Tristan Croll, 5 years ago

It's possible - I can't remember the details of exactly how I did it, but Clipper's symmetry-atom representation gives tooltips on hover but isn't selectable. That was a long time back, but I don't recall it being incredibly challenging.
________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: 26 January 2021 17:57
To: pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>; udakshi@mpibpc.mpg.de <udakshi@mpibpc.mpg.de>
Cc: meng@cgl.ucsf.edu <meng@cgl.ucsf.edu>; goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; Tristan Croll <tic20@cam.ac.uk>
Subject: Re: [ChimeraX] #4168: Show alternate locations simultaneously

#4168: Show alternate locations simultaneously
--------------------------------+----------------------------
          Reporter:  udakshi@…  |      Owner:  Eric Pettersen
              Type:  defect     |     Status:  assigned
          Priority:  normal     |  Milestone:
         Component:  Graphics   |    Version:
        Resolution:             |   Keywords:
        Blocked By:             |   Blocking:
Notify when closed:             |   Platform:  all
           Project:  ChimeraX   |
--------------------------------+----------------------------

Comment (by goddard@…):

 {{{
 One of the drawbacks of an individual altloc atom not being selectable is
 that if you hover the mouse over and altloc atom it won't show you a popup
 label telling what altloc it is.  Maybe some special hack could allow this
 but currently it simply describes what would be selected under the mouse.
 }}}

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/4168#comment:12>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:14 by Eric Pettersen, 5 years ago

After mulling it over, I guess I prefer an 'altloc' command that allows you to hide/show/delete alt locs, implemented via submodels. Eventually there would be an "Altloc Explorer" tool built on top of those commands.

One question is whether all alt locs should be shown when a structure is opened. There could be a preference to control that. My leaning would be for the structure to log information about how to show alt locs if it detects that there are alt locs present in the structure, rather than have a preference.

The current alt loc support is basically the minimum needed for the structure file readers and things like AddH. So there is no alt loc deletion call, even in the C++ layer. Since Tristan will need such a C++/Python call sooner rather than later I will open a separate ticket for that, since the rest of what we're discussing here will take *quite* a bit longer.

comment:15 by Eric Pettersen, 4 years ago

Some progress has been made here. There is now an 'altlocs' command for switching between alt locs, listing them, and removing them. There is an Altloc Explorer tool for interactively focusing in on specific residues with alt locs and switching between the alt locs. As of tomorrow's build, alt loc information will be included in the atom spec balloon.

We intend to enhance the Altloc Explorer to make it more Rotamers-like: show all altlocs simultaneously, and what hydrogen bonds they form, and what clashes they have. That may still be awhile.

comment:16 by Eric Pettersen, 3 years ago

An enhancement available tomorrow: the Altloc Explorer can optionally display hydrogen bonds relevant to the current altloc and will update them if the altloc is changed.

in reply to:  17 ; comment:17 by uma-lakshmi.dakshinamoorthy@…, 3 years ago

Thanks so much for the fix.

This would really be helpful.

Best
Uma

On Sep 8, 2022 3:54 AM, ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> wrote:
#4168: Show alternate locations simultaneously
--------------------------------+----------------------
          Reporter:  udakshi@…  |      Owner:  pett
              Type:  defect     |     Status:  assigned
          Priority:  normal     |  Milestone:
         Component:  Graphics   |    Version:
        Resolution:             |   Keywords:
        Blocked By:             |   Blocking:
Notify when closed:             |   Platform:  all
           Project:  ChimeraX   |
--------------------------------+----------------------

Old description:


New description:

 {{{
 The following bug report has been submitted:
 Platform:        Windows-10-10.0.17763
 ChimeraX Version: 0.91 (2019-11-28)
 Description
 Hi team,

 I am trying to display alternate confirmation for amino acid residue and
 for some reason I cannot display this in chimeraX, while in previous
 versions I can do this.

 Please help fix the issue.

 Thanks
 Uma

 OpenGL version: 3.3.0 NVIDIA 388.16
 OpenGL renderer: Quadro P4000/PCIe/SSE2
 OpenGL vendor: NVIDIA Corporation

 }}}

--

Comment (by pett):

 An enhancement available tomorrow:  the Altloc Explorer can optionally
 display hydrogen bonds relevant to the current altloc and will update them
 if the altloc is changed.

--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/4168#comment:16>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:18 by Eric Pettersen, 22 months ago

Description: modified (diff)

Further progress: as of tomorrow there will be "altloc hide/show" commands that take an optional list of alt locs and an optional atom spec and hide or show the specific altlocs (as separate submodels). Omitting the alt loc list means all alt locs and omitting the atom spec means all residues.

comment:19 by Eric Pettersen, 22 months ago

Well, the command is actually "altlocs hide/show" rather than "altloc hide/show", though obviously the shortened form would also work.

comment:20 by uma-lakshmi.dakshinamoorthy@…, 22 months ago

Thanks so much for the solution.

---------------------------------------------------------------------------------------- 
Uma Lakshmi Dakshinamoorthy 
Postdoc 
Research Group Structural Biochemistry and Mechanisms 
Max Planck Institute for Multidisciplinary Sciences 
Department of Structural Dynamics (11800) 
Am Fassberg 11 
37077 Göttingen 

Office: +49-551-201-1315 
Email: udakshi@mpibpc.mpg.de <mailto:udakshi@mpibpc.mpg.de> 





\ufeffOn 11.01.24, 02:07, "ChimeraX" <ChimeraX-bugs-admin@cgl.ucsf.edu <mailto:ChimeraX-bugs-admin@cgl.ucsf.edu>> wrote:


#4168: Show alternate locations simultaneously
--------------------------------+----------------------
Reporter: udakshi@\u2026 | Owner: pett
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: Graphics | Version:
Resolution: | Keywords:
Blocked By: | Blocking:
Notify when closed: | Platform: all
Project: ChimeraX |
--------------------------------+----------------------
Comment (by pett):


Well, the command is actually "altlocs hide/show" rather than "altloc
hide/show", though obviously the shortened form would also work.

comment:21 by Eric Pettersen, 4 days ago

Resolution: fixed
Status: assignedclosed

In addition to the previously available "altlocs show" command, the tool now also has a check button for showing all possible alt locs. Also, hovering over an alt loc in the tool shows that alt loc's occupancy in a tool tip, and hovering over an alt loc atom in the graphics window will also report its occupancy.

Note: See TracTickets for help on using tickets.