[Chimera-users] Sidechain selection in Python

Eric Pettersen pett at cgl.ucsf.edu
Wed Mar 10 09:00:42 PST 2021


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 at 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 at cgl.ucsf.edu
> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users




More information about the Chimera-users mailing list