generatebio / chroma

A generative model for programmable protein design
Apache License 2.0
659 stars 84 forks source link

Selection syntax #22

Closed bobbyhollingsworthiv closed 10 months ago

bobbyhollingsworthiv commented 10 months ago

Hi!

Thanks all for making this open-sourced for the research community and for all of the documentation. I'm attempting to replace 2 chains of a protein complex with a de novo design using the substructure example, but I'm struggling with selection syntax. I've seen options such as "chain_id =", "resid (2)", etc. in the documentation, but I'm unsure how these map to PBD files. If I aim to infill chains B and G in a structure, would I specify something like "chain B or chain G" as the selection_string, or is the syntax different? Is there a guide to Chroma's selection syntax?

Kind regards, Bobby

wujiewang commented 10 months ago

Thanks for the question!

"chain B or chain G" will get both chain B and chain G (a little unintuitive TBH), you can follow the selection grammar for Pymol.

You can alternatively provide a binary indices to specify infilled regions.

wujiewang commented 10 months ago

@bobbyhollingsworthiv Closing this issue for now, feel free to reopen or post new issues.