That' really great Eric. Also, Recently I have noticed that previous version of the script worked wonderfully for the proteins, which have both the secondary structural elements in the protein structure i.e á-helices and â-strands. However, when the protein has only one prominent type of structural elements, it failed to recognize the structural elements correctly and did mis-labelling of the secondary structural elements for e.g In the attached pic, the protein which I used for labelling purpose has all á-helices but the script has mis-labelled them as all â-strands. Please have a look into this issue. 


Thanks a lot! 

Arun 


Arun Gupta PhD, MRSC

Research Fellow

Challis & Lewandowski Group

Chemistry Department

University of Warwick
Gibbet Hill Road
Coventry CV4 7AL
United Kingdom


From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: Monday, November 8, 2021 10:28 PM
To: Gupta, Arun <Arun.Gupta@warwick.ac.uk>
Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Labelling w.r.t Secondary structure elements
 
Hi Arun,
Glad it's useful to you.  For the benefit of others, I have put a slightly improved version of the script on the ChimeraX Recipes site.  The improvement is that it will prefix the labels with the chain ID if there is more than one chain in the structure.

--Eric

On Nov 4, 2021, at 2:10 AM, Gupta, Arun <Arun.Gupta@warwick.ac.uk> wrote:

Thanks a lot Eric. Script works pretty nicely.  It saves a lot of time.

Best wishes,
Arun

Arun Gupta PhD, MRSC
Research Fellow
Challis & Lewandowski Group
Chemistry Department
University of Warwick
Gibbet Hill Road
Coventry CV4 7AL
United Kingdom

From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: Thursday, November 4, 2021 12:11 AM
To: Gupta, Arun <Arun.Gupta@warwick.ac.uk>
Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Labelling w.r.t Secondary structure elements
 
Hi Arun,
Elaine is correct that there is no easy command equivalent for this.  I wrote a short Python script to label the middle label of each secondary structure element with á/âN for helices/strands respectively.  Run the script simply by opening it with the open command.  You can adjust the initial height of the labels by editing the first line of the script, or afterward with the "label height N" command.  Keep in mind that secondary structure element numbering resets with each chain, so if you have a multi-chain structure then this script may not produce what you want.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Nov 3, 2021, at 1:55 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Arun,
Not completely sure this is what you're asking, but I'm guessing something like how "label" shows residue labels, but instead showing a label like alpha1 or beta1 for each secondary structure element (SSE)?  There is nothing like that, sorry.  

Personally I would use 2D Labels before Powerpoint, but you undoubtedly have more Powerpoint skills than I do.  You can enter the text, colors, arrows, etc. in 2dlabels commands, and then drag them to the desired locations with the "move label" mouse mode.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/2dlabels.html>

The closest "automatic" thing I can think of is the following, but it doesn't look good enough for a figure, partly because every residue has a label.  I can't think of a simple way to only add one label per SSE. Example:

open 2gbp
label (helix | strand) attribute ss_id height 1.2

... that just gives an integer 1 for residues in first strand and first helix, 2 for second strand and second helix, and it doesn't say whether it's a strand or helix (0 for all coil).  You could also label by secondary structure type, but that attribute is also an integer, not the words or greek letters alpha and beta (ss_type 1 for helix, 2 for strand).

label delete
label (helix | strand) text "{0.ss_type}:{0.ss_id}" height 1

see "label" options
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/label.html#options>
and attribute names
<https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html>

Again, I'd use 2dlabels, but to assist with identifying which SSE is which, I might use the first label command example above (and delete those labels when I was done), or just rainbow the chain and go progressively from blue to red.

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Nov 3, 2021, at 1:10 PM, Gupta, Arun via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hello,    
I was wondering is there a quick fix way around by which we can define in an automated fashion the numbering and further labelling of secondary structural elements labels, alongside the structure, based on “dssp” described symbol notation "for example starting from á1/â1-á10/â14 " for any protein instead of manually labelling later in Power point.  
Thanks a lot!   
Arun  

_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users