Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification Re: Motif Scaffolding and Binder Design #6

Open
amelie-iska opened this issue Mar 12, 2024 · 0 comments
Open

Clarification Re: Motif Scaffolding and Binder Design #6

amelie-iska opened this issue Mar 12, 2024 · 0 comments

Comments

@amelie-iska
Copy link

amelie-iska commented Mar 12, 2024

I am attempting to perform motif scaffolding and binder design with RFD-AA similar to the way it was done in the original RFD. I ran into issues with the following function in idealize_backbone.py. The current implementation requires a ligand to be in the input. I commented the original lines in the code block and added some modifications to handle the case when there is no ligand (see below). Do my modifications seem reasonable, and is this use case supported?

def rewrite(path, outpath):
    with open(path, 'r') as fh:
        stream = [l for l in fh if "HETATM" in l or "CONECT" in l]

    ligands = get_ligands(stream)
    # indep = aa_model.make_indep(path, ','.join(ligands), center=False)
    if len(ligands) > 0: 
        indep = aa_model.make_indep(path, ','.join(ligands), center=False)
    elif len(ligands) == 0:
        indep = aa_model.make_indep(path, ligand=None, center=False)
    xyz = indep.xyz[~indep.is_sm]
    idx = indep.idx[~indep.is_sm]
    L = xyz.shape[0]
    ala_seq = torch.zeros((L,))
    xyz = rf2aa.util.idealize_reference_frame(ala_seq[None], xyz[None])[0]
    xyz_ideal = get_o(xyz, idx)
    indep.xyz[~indep.is_sm, :4] = xyz_ideal
    ligands = list(ligands)
    # assert len(ligands) == 1, f'Found >1 ligand: {ligands}'
    assert len(ligands) <= 1, f'Found >1 ligand: {ligands}'
    # indep.write_pdb(outpath, lig_name=ligands[0])
    if len(ligands) == 1:
        indep.write_pdb(outpath, lig_name=ligands[0])
    else:
        indep.write_pdb(outpath)

Another issue that I ran into was during binder design (PPI) with RFD-AA, the generated design seems to just be the same target protein given as input. The command I ran is:

python run_inference.py \
    diffuser.T=50 \
    inference.output_prefix=output/design_ppi/binder \
    inference.input_pdb=input/insulin_target.pdb \
    contigmap.contigs=[\'A1-150\',\'70-100\'] \
    ppi.hotspot_res=[A59,A83,A91] \
    inference.num_designs=1 \
    denoiser.noise_scale_ca=0 \
    denoiser.noise_scale_frame=0

Is this use case supported as well? If so, what might be the cause of the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant