
Sorry no, I can't think of a way to do it than to specify each label color in an additional command. Elaine
On Aug 19, 2024, at 9:45 AM, NG, Cheukhei Jackie [Student] via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Dr. Meng,
Thank you for the swift response. I am trying to use 2D labels on selections of multiple chains, is there a good way to apply colored 2D labels on my selection consistent to the chain color the selection came from? e.g. Selected chain A(red) and B(blue), the atom label applied on chain A will automatically appear red and for chain B blue.
Thanks, Jackie
Get Outlook for AndroidFrom: Elaine Meng <meng@cgl.ucsf.edu> Sent: Tuesday, August 20, 2024 12:30:46 AM To: NG, Cheukhei Jackie [Student] <cheukhei-jackie.ng@connect.polyu.hk> Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] 2D labels colored by chain color CAUTION: This email is not originated from PolyU. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Jackie, I guess you are talking about 3D labels (i.e. from the "label" command), not 2D labels.
The difference: 2D labels are not on specific atoms, you put them anywhere in the rectangle of the graphics window, and they do not have offset values. See help on 2D labels: <https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf....>
2D labels are nicer for publication images than 3D labels because you can easily make them all different sizes and put them anywhere in the figure, e.g. to make a title. See image in help page linked above. However, they are more work, and you have to first decide exactly what position of the molecule(s) you want to use in your figure. After you figure that out, then you can place the 2D labels. It is a little bit like using some other application like Gimp or Photoshop to add labels afterward.
However, if you want to use 3D labels in your figure anyway... (1) yes you can specify atoms, residues, etc. by their attribute value. Example:
open 1gcn color :10-14 blue label @@color=blue
See "specification by attribute value" ...in the example above "@@" means atom attribute, and there are lots of other attributes, not just color... <https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf....>
(2) There is no specific recommended offset, it is purely an artistic or clarity decision on your part depending on what is in your image, orientation, zoom, etc. Also we usually do not recommend using 3D labels in figures anyway. If you want to make a really nice figure, it may be worth using 2D labels instead.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 19, 2024, at 7:19 AM, NG, Cheukhei Jackie [Student] via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear sir/madam,
I am trying to generate publication-quality images with chimeraX with appropriate 2D labels. • Is there a variable I could use to represent the coloring of my current chain so i can apply in the command where the selection is multiple chains: label sel color (the variable)? • is the an offset parameter or any relevant parameters in the 2D label command that are recommended for publication use? Thank you very much for your time.
Thanks, Jackie
Disclaimer:
This message (including any attachments) contains confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this message and notify the sender and The Hong Kong Polytechnic University (the University) immediately. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited and may be unlawful. The University specifically denies any responsibility for the accuracy or quality of information obtained through University E-mail Facilities. Any views and opinions expressed are only those of the author(s) and do not necessarily represent those of the University and the University accepts no liability whatsoever for any losses or damages incurred or caused to any party as a result of the use of such information. _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/