Hi Tim,

  You need to use the command "name frozen" instead of just "name".  The command "name inter2A sel" just makes inter2A a synonym for the text "sel".  So later if you deselect everything and say "select inter2A" it won't select anything because that just translates into "select sel".  But if you instead used "name frozen inter2A sel" then the inter2A is associated with the specific atoms that were selected at the time the command is run and later no matter what is selected "select inter2A" will select those previously defined atoms.

  This is confusing.  The case when you would use name instead of name frozen is something like "name s4helix /A:124-137".

Tom


On Jan 16, 2026, at 2:46 PM, Timothy Springer via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi, I am trying to select multiple interactions and include them in a single named selection. 
Is there a better way than this?

select zone #2/A 3.6 #2 residues true; name inter2A sel
select zone #2/B 3.6 #2 residues true; name inter2B sel
name inter2all inter2A | inter2B
This does not seem to work for me and when I try to show the selection 
select inter2all
it says
Nothing selected

I got something similar to work for hbonds

hbonds #2/A restrict #2/B-G color black name hbond_inter2
hbonds #2/B restrict #2/C-G color black name hbond_inter2
hbonds #2/C restrict #2/D-G color black name hbond_inter2
hbonds #2/D restrict #2/E-G color black name hbond_inter2
hbonds #2/E restrict #2/F-G color black name hbond_inter2
hbonds #2/F restrict #2/G   color black name hbond_inter2

- Tim
Timothy A. Springer, Ph.D.
Latham Family Professor, Harvard Medical School and Boston Children's Hospital
Founder, Institute for Protein Innovation
_______________________________________________
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/