Hi Alex, Tony's suggestion is excellent if you are trying to selected the entire connected fragment, but from the command you're currently using it seems like you are only trying to select the atoms directly bonded to the currently selected atom. If so, then this Python code will do that:
from chimerax.atomic import selected_atoms
selected_atoms(session).neighbors.selecteds = True
If you put the above into a file whose name ends in .py (e.g. "sel-bonded.py"), then you can use ChimeraX's open command to open that file, which then runs the code.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
On Sep 10, 2024, at 12:41 PM, Alexander Lee via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote: