too_long = 10.0
from chimerax.atomic import all_atomic_structures
for s in all_atomic_structures(session):
bonds = s.bonds
bonds.displays = bonds.lengths < too_long
The above code would hide bonds longer than 10 angstroms. It you put that code in a file (say, hide_long.py in your home folder), then you could run it every frame with the
perframe command,
e.g. “perframe “open ~/hide_long..py”. I have attached a file containing the above code for convenience.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab