Opened 5 years ago

Last modified 5 years ago

#3813 assigned enhancement

Allow setting zone mouse mode label defaults

Reported by: sarahjpiper89@… 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

From: Sarah Piper
Subject: [chimerax-users] right mouse zone selection labels
Date: October 8, 2020 at 9:00:48 PM PDT
To: chimerax-users@…

HI ChimeraX team,
I really like the feature in ChimeraX that creates a map clipping zone in the right mouse tools - zone with automatic labelling. However, the default labels are black background and yellow text, and only the residue 3 letter code and number. Is it possible to change these labels to a white bg and customise the labels to include e.g. the one letter code and chain ID? I tried to do this with the selection - labels tool but it did not seem to change it for the zone labels.

Many thanks and keep up the great work :)

Sarah

Change History (3)

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

Currently there is no setting to adjust the zone mouse mode label colors and text.  You could edit the ChimeraX Python code to change the label colors, that is in 

	ChimeraX.app/Contents/lib/python3.7/site-packages/chimerax/zone/zone.py

You would change lines

        self._label_color = BuiltinColors['yellow']
        self._label_background = BuiltinColors['black']

to the colors you want ('black' and 'white').  There is also no setting for the label text to show chain ID, one letter residue code, and residue number, it only shows 3-letter residue code and residue number.  Even the ChimeraX label command has no setting to adjust this yet.  Our older program Chimera has a labelopt command that allowed setting the text in the label

	https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/labelopt.html <https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/labelopt.html>

and we should add something similar in ChimeraX.   I've made an enhancement request to allow setting the default colors and text.

	https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/3813 <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/3813>

You are right that the preference setting Labels / Balloon-help Specifier Style will not effect what the Zone mouse mode labels show.

comment:2 by Tom Goddard, 5 years ago

Cc: Elaine Meng added

I added a "zone setting" command to set the label color and label background color for the zone mouse mode.

zone setting labelColor black labelBackgroundColor white
zone setting labelCol default labelBack none
zone setting labelC orange labelB blue save False

The "save" option says whether to save these preferences for future ChimeraX sessions, default True.

in reply to:  3 ; comment:3 by sarahjpiper89@…, 5 years ago

Thank you everyone!
I also found a workaround with using the select zone tool and labels, and
using the command line:
label (#!2 & sel) text "{0.label_one_letter_code} {0.number}.{0.chain_id}"
bgColor white
which gives me exactly what I wanted.

Thanks for all your help with this and the quick update!

Sarah


On Sat, Oct 10, 2020 at 5:51 AM ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
wrote:

Note: See TracTickets for help on using tickets.