RFdiffusion icon indicating copy to clipboard operation
RFdiffusion copied to clipboard

RuntimeError: cannot sample n_sample > prob_dist.size(-1) samples without replacement

Open spectral-flux opened this issue 2 years ago • 3 comments

Hello, I am trying to generate scaffold around a small molecule pdb. I think this is implemented using the potentials.py.

Here is my command: ./scripts/run_inference.py inference.input_pdb=rif_64_fosaprepitant.rif.gz_target.pdb 'contigmap.contigs=[100-120]' inference.output_prefix=fos1/binder_test inference.num_designs=10 potentials.substrate=FOS potentials.guiding_potentials=["type:substrate_contacts"]

However, I keep running into an error in potentials.py File "...../potentials.py", line 606, in _grab_motif_residues rand_idx = torch.multinomial(idx, 1).long()

RuntimeError: cannot sample n_sample > prob_dist.size(-1) samples without replacement

Do you have any ideas or advice on how to get this to work? Thank you very much, Ryan

rif_64_fosaprepitant.rif.gz_target_pdb.txt

spectral-flux avatar Aug 24 '23 22:08 spectral-flux

Substrate potentials are not currently implemented for the case where no protein motif is provided.

w-ahern avatar Aug 25 '23 01:08 w-ahern

Thank you. In that case, is there an ideal method for how to import a protein motif from rifgen output?

spectral-flux avatar Aug 25 '23 01:08 spectral-flux

I think if you can make a pdb file of the rigen output (you would need backbones on the amino acid residues) you can then use normal contig logic

joewatchwell avatar Nov 03 '23 07:11 joewatchwell