generatebio / chroma

A generative model for programmable protein design
Apache License 2.0
696 stars 90 forks source link

Refinement of structure? #55

Open gezmi opened 4 months ago

gezmi commented 4 months ago

Hi,

I was wondering if structure refinement could be performed with Chroma (technically similar to partial diffusion in RFDiffusion, but full-atom). With this notebook, I tried to do at the Conditional generation part, using this code: chroma = Chroma() protein = Protein("1xyz", device="cuda") substructure_conditioner = conditioners.SubstructureConditioner( protein=protein, backbone_model=chroma.backbone_network, selection='chain A or chain B' ).to("cuda")

new_protein = chroma.sample( protein_init=protein, conditioner=substructure_conditioner, langevin_factor=4.0, langevin_isothermal=True, inverse_temperature=8.0, sde_func="langevin", steps=50 )

This gave me almost identical structures, with some side-chains changed. However, I understand that the SubstructureConditioner will keep everything totally fixed which is not my aim, but I did not find a conditioner to allow for some movement, not totally fixing the input. I tried to look in the underlying code but could not yet find where to start modifying it for more flexibility (also for flexible design). Is this even possible?

I would be grateful for any help that you can provide on this matter.