Acellera / moleculekit

MoleculeKit: Your favorite molecule manipulation kit
Other
198 stars 37 forks source link

Failed to parse selection resid<200 #126

Closed tonigi closed 1 year ago

tonigi commented 1 year ago

Numeric residue selections seem not to work any more?

md=Molecule("6h1f")
md.atomselect("name CA and resid<200")

RuntimeError: Failed to parse selection resid<200 with error Syntax error at ''<''

stefdoerr commented 1 year ago

Yes I don't believe I ever implemented > < <= >= etc in atomselect for non-float values. At some point we switched from VMD atomselect to my own implementation in python so it's definitely missing some features. I guess this is a rather useful feature so I can add it in.

stefdoerr commented 1 year ago

Hey @tonigi . I fixed it now on main branch https://github.com/Acellera/moleculekit/commit/2f7fe7641f29906ae3fad1711e4228cea8b23e55

stefdoerr commented 1 year ago

I really need at some point get to simplifying the atomselect lexer/parser because I keep on adding edge cases which can be merged into simpler rules.