ChimeraX Help: Selective residue labeling for peptide/Protein interface !
Dear ChimeraX Team, I am currently working on visualizing peptide/Protein complexes and I’m having some trouble maintaining specific residue labels while clearing others. My Goal: I want to label: 1. Protein (Chain A) residues that are within 5.0Å of the Peptide (Chain C) residue 1. 2. The Peptide (Chain C) P1 residue itself. 3. I want to ensure residues P2–P9 remain unlabeled. Below is the script I am currently using: set bg white graphics silhouettes t lighting depthCue f size #1 ballScale 0.20 stickRadius 0.2 select /A & (/C:1 :<5.0) show sel style sel ball color byhet view sel label sel text "{0.label_one_letter_code}{0.number}" label @@display residues bgColor white label height 1.0 sel #1/C: 2-9 label delete The issue I am encountering is that when I execute: sel #1/C: 2-9 label delete it deletes not only the labels for peptide residues P2–P9, but also the labels for the protein interface residues that were previously defined and labeled. Question: * Should I be using a more specific selector in the label command itself to avoid using select and label delete sequentially? Any advice on the cleanest syntax to achieve this would be greatly appreciated! Best regards, Arun Arun Gupta PhD, MRSC Sr. Post Doctoral Research Assistant Gillespie/McMichael Group Nuffield Dept. of Clinical Medicine, University of Oxford, Centre for Immuno-Oncology Old Road Campus Research Building, Roosevelt Drive, Oxford OX3 7DQ Tel: + 44 (0)1865 2612913
Hi Arun, The command "label delete" deletes all labels because you didn't specify any particular ones in the command. If you only want to delete the ones for selected residues, you would have to use: label delete sel 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 Mar 9, 2026, at 8:43 AM, Arun Gupta via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX Team, I am currently working on visualizing peptide/Protein complexes and I’m having some trouble maintaining specific residue labels while clearing others. My Goal: I want to label: • Protein (Chain A) residues that are within 5.0Å of the Peptide (Chain C) residue 1. • The Peptide (Chain C) P1 residue itself. • I want to ensure residues P2–P9 remain unlabeled. Below is the script I am currently using: set bg white graphics silhouettes t lighting depthCue f size #1 ballScale 0.20 stickRadius 0.2 select /A & (/C:1 :<5.0) show sel style sel ball color byhet view sel label sel text "{0.label_one_letter_code}{0.number}" label @@display residues bgColor white label height 1.0 sel #1/C: 2-9 label delete The issue I am encountering is that when I execute: sel #1/C: 2-9
label delete
it deletes not only the labels for peptide residues P2–P9, but also the labels for the protein interface residues that were previously defined and labeled. Question: • Should I be using a more specific selector in the label command itself to avoid using select and label delete sequentially? Any advice on the cleanest syntax to achieve this would be greatly appreciated! Best regards, Arun
Of course there are simpler approaches. I'm not sure what you would consider cleanest syntax, but you could skip the separate selection step, i.e. instead of: sel #1/C: 2-9 label delete sel ...simply use: label delete #1/C:2-9 Elaine
On Mar 9, 2026, at 12:42 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Arun, The command "label delete" deletes all labels because you didn't specify any particular ones in the command. If you only want to delete the ones for selected residues, you would have to use:
label delete sel
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 Mar 9, 2026, at 8:43 AM, Arun Gupta via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX Team, I am currently working on visualizing peptide/Protein complexes and I’m having some trouble maintaining specific residue labels while clearing others. My Goal: I want to label: • Protein (Chain A) residues that are within 5.0Å of the Peptide (Chain C) residue 1. • The Peptide (Chain C) P1 residue itself. • I want to ensure residues P2–P9 remain unlabeled. Below is the script I am currently using: set bg white graphics silhouettes t lighting depthCue f size #1 ballScale 0.20 stickRadius 0.2 select /A & (/C:1 :<5.0) show sel style sel ball color byhet view sel label sel text "{0.label_one_letter_code}{0.number}" label @@display residues bgColor white label height 1.0 sel #1/C: 2-9 label delete The issue I am encountering is that when I execute: sel #1/C: 2-9
label delete
it deletes not only the labels for peptide residues P2–P9, but also the labels for the protein interface residues that were previously defined and labeled. Question: • Should I be using a more specific selector in the label command itself to avoid using select and label delete sequentially? Any advice on the cleanest syntax to achieve this would be greatly appreciated! Best regards, Arun
_______________________________________________ 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/
participants (2)
-
Arun Gupta -
Elaine Meng