Sidechain selection in Python

Hello, I want to select a sidechain without CA in Python. The working command line select #0:30 & without CA/C1' is recreated in Python like this: chimera.selection.OSLSelection("#0:30 & without CA/C1'") But the lexer complains about an "illegal symbol in identifier" which is the apostrophe after C1. How do I solve this issue? Thanks Stefan

Hi Stefan, OSLSelection can only handle the "#0:30" part of the spec -- it doesn't handle intersections, named selectors, etc. What you need to use is chimera.specifier.evalSpec("#0:30 & without CA/C1'"), which returns an ItemizedSelection. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Mar 10, 2021, at 4:57 AM, achatz <achatz@wzw.tum.de> wrote:
Hello, I want to select a sidechain without CA in Python. The working command line
select #0:30 & without CA/C1'
is recreated in Python like this:
chimera.selection.OSLSelection("#0:30 & without CA/C1'")
But the lexer complains about an "illegal symbol in identifier" which is the apostrophe after C1. How do I solve this issue? Thanks Stefan
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (2)
-
achatz
-
Eric Pettersen