RosettaCommons / RFdiffusion

Code for running RFdiffusion
Other
1.75k stars 339 forks source link

_cdist_backward requires X2 to be contiguous #204

Open ajrferrari opened 8 months ago

ajrferrari commented 8 months ago

Hi - I am trying to build some structural elements around a scaffold (1wj2.pdb, A430-466). Currently, I've been playing around with some options, but I am getting a random error during execution. When I request 30 backbones, as described below, I am able to generate 10-20 of them but eventually I will get this error:

'''

torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs) File "/projects/b1107/allan/software/anaconda3/envs/SE3nv/lib/python3.9/site-packages/torch/autograd/init.py", line 147, in backward Variable._execution_engine.run_backward( RuntimeError: _cdist_backward requires X2 to be contiguous

'''

I am not sure if this is pointing out that some RF trajectory didn't find a solution, or something else. Currently, I don't know if there is an option to retry, or skip in case a trajectory fails for some reason. This prevents me to expand my efforts to generate more diverse backbones set.

Any suggestion?

python3 /projects/b1107/allan/software/RFdiffusion/scripts/run_inference.py inference.output_prefix=run1_rfd/run1a_design inference.input_pdb=../1wj2.pdb 'contigmap.contigs=[10-20/A430-466/15-25]' inference.num_designs=30 denoiser.noise_scale_ca=0 denoiser.noise_scale_frame=0 potentials.guide_scale=1 'potentials.guiding_potentials=["type:substrate_contacts,s:1,r_0:8,rep_r_0:5.0,rep_s:2,rep_r_min:1"]' potentials.substrate=ZN inference.ckpt_override_path='/projects/b1107/allan/software/RFdiffusion/models/ActiveSite_ckpt.pt'

Best, Állan

lzygitk7 commented 6 months ago

Facing the same issue. But I tried your script as follows:

../scripts/run_inference.py inference.output_prefix=example_outputs/run1a_design inference.input_pdb=input_pdbs/1wj2.pdb 'contigmap.contigs=[10-20/A430-466/15-25]' inference.num_designs=1 denoiser.noise_scale_ca=0 denoiser.noise_scale_frame=0 potentials.guide_scale=1 'potentials.guiding_potentials=["type:substrate_contacts,s:1,r_0:8,rep_r_0:5.0,rep_s:2,rep_r_min:1"]' potentials.substrate=ZN inference.ckpt_override_path=../models/ActiveSite_ckpt.pt image

It looks good to generate backbone. I don't know why ... If you solve this issue, please kindly inform me. Thank you very much.