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

Problem about design_ppi_scaffolded.sh in the example #272

Open
kn301BE opened this issue Aug 28, 2024 · 8 comments
Open

Problem about design_ppi_scaffolded.sh in the example #272

kn301BE opened this issue Aug 28, 2024 · 8 comments

Comments

@kn301BE
Copy link

kn301BE commented Aug 28, 2024

Hi! I met a problem when I tried to run the design_ppi_scaffolded.sh in the example directory:
/RFdiffusion/rfdiffusion/util.py:253: UserWarning: Using torch.cross without specifying the dim arg is deprecated.
Please either pass the dim explicitly or simply use torch.linalg.cross.
The default value of dim will change to agree with that of linalg.cross in a future release. (Triggered internally at ../aten/src/ATen/native/Cross.cpp:62.)
Z = torch.cross(Xn, Yn)
[2024-08-28 18:18:40,402][main][INFO] - Found GPU with device_name NVIDIA RTX A6000. Will run RFdiffusion on NVIDIA RTX A6000
Reading models from /home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/../../models
[2024-08-28 18:18:40,403][rfdiffusion.inference.model_runners][INFO] - Reading checkpoint from /home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/../../models/Complex_Fold_base_ckpt.pt
This is inf_conf.ckpt_path
/home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/../../models/Complex_Fold_base_ckpt.pt
Assembling -model, -diffuser and -preprocess configs from checkpoint
USING MODEL CONFIG: self._conf[model][n_extra_block] = 4
USING MODEL CONFIG: self._conf[model][n_main_block] = 32
USING MODEL CONFIG: self._conf[model][n_ref_block] = 4
USING MODEL CONFIG: self._conf[model][d_msa] = 256
USING MODEL CONFIG: self._conf[model][d_msa_full] = 64
USING MODEL CONFIG: self._conf[model][d_pair] = 128
USING MODEL CONFIG: self._conf[model][d_templ] = 64
USING MODEL CONFIG: self._conf[model][n_head_msa] = 8
USING MODEL CONFIG: self._conf[model][n_head_pair] = 4
USING MODEL CONFIG: self._conf[model][n_head_templ] = 4
USING MODEL CONFIG: self._conf[model][d_hidden] = 32
USING MODEL CONFIG: self._conf[model][d_hidden_templ] = 32
USING MODEL CONFIG: self._conf[model][p_drop] = 0.15
USING MODEL CONFIG: self._conf[model][SE3_param_full] = {'num_layers': 1, 'num_channels': 32, 'num_degrees': 2, 'n_heads': 4, 'div': 4, 'l0_in_features': 8, 'l0_out_features': 8, 'l1_in_features': 3, 'l1_out_features': 2, 'num_edge_features': 32}
USING MODEL CONFIG: self._conf[model][SE3_param_topk] = {'num_layers': 1, 'num_channels': 32, 'num_degrees': 2, 'n_heads': 4, 'div': 4, 'l0_in_features': 64, 'l0_out_features': 64, 'l1_in_features': 3, 'l1_out_features': 2, 'num_edge_features': 64}
USING MODEL CONFIG: self._conf[model][freeze_track_motif] = False
USING MODEL CONFIG: self._conf[model][use_motif_timestep] = True
USING MODEL CONFIG: self._conf[diffuser][T] = 50
USING MODEL CONFIG: self._conf[diffuser][b_0] = 0.01
USING MODEL CONFIG: self._conf[diffuser][b_T] = 0.07
USING MODEL CONFIG: self._conf[diffuser][schedule_type] = linear
USING MODEL CONFIG: self._conf[diffuser][so3_type] = igso3
USING MODEL CONFIG: self._conf[diffuser][crd_scale] = 0.25
USING MODEL CONFIG: self._conf[diffuser][so3_schedule_type] = linear
USING MODEL CONFIG: self._conf[diffuser][min_b] = 1.5
USING MODEL CONFIG: self._conf[diffuser][max_b] = 2.5
USING MODEL CONFIG: self._conf[diffuser][min_sigma] = 0.02
USING MODEL CONFIG: self._conf[diffuser][max_sigma] = 1.5
USING MODEL CONFIG: self._conf[preprocess][sidechain_input] = False
USING MODEL CONFIG: self._conf[preprocess][motif_sidechain_input] = True
USING MODEL CONFIG: self._conf[preprocess][d_t1d] = 28
USING MODEL CONFIG: self._conf[preprocess][d_t2d] = 47
USING MODEL CONFIG: self._conf[preprocess][prob_self_cond] = 0.5
USING MODEL CONFIG: self._conf[preprocess][str_self_cond] = True
USING MODEL CONFIG: self._conf[preprocess][predict_previous] = False
[2024-08-28 18:19:15,161][rfdiffusion.inference.model_runners][INFO] - Loading checkpoint.
[2024-08-28 18:19:15,337][rfdiffusion.diffusion][INFO] - Using cached IGSO3.
Successful diffuser init
Error executing job with overrides: ['scaffoldguided.target_path=input_pdbs/insulin_target.pdb', 'inference.output_prefix=example_outputs/design_ppi_scaffolded', 'scaffoldguided.scaffoldguided=True', 'ppi.hotspot_res=[A59,A83,A91]', 'scaffoldguided.target_pdb=True', 'scaffoldguided.target_ss=target_folds/insulin_target_ss.pt', 'scaffoldguided.target_adj=target_folds/insulin_target_adj.pt', 'scaffoldguided.scaffold_dir=./ppi_scaffolds/', 'inference.num_designs=10', 'denoiser.noise_scale_ca=0', 'denoiser.noise_scale_frame=0']
Traceback (most recent call last):
File "/home/gaon/biosoftware/RFdiffusion/examples/../scripts/run_inference.py", line 54, in main
sampler = iu.sampler_selector(conf)
File "/home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/utils.py", line 506, in sampler_selector
sampler = model_runners.ScaffoldedSampler(conf)
File "/home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/model_runners.py", line 751, in init
self.blockadjacency = iu.BlockAdjacency(conf.scaffoldguided, conf.inference.num_designs)
File "/home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/utils.py", line 694, in init
if self.conf.scaffoldguided.scaffold_list is not None:
AttributeError: 'bool' object has no attribute 'scaffold_list'
Could anyone please help me about this problem? Thank you!

@zhang-bo-lilly
Copy link

See #273.

@Charlesjc-lab
Copy link

”print(self.conf)“ result in

['inference.output_prefix=./output/RF2/RF2', 'scaffoldguided.target_path=./1.pdb', 'scaffoldguided.scaffoldguided=True', 'scaffoldguided.target_pdb=True', 'scaffoldguided.scaffold_list=[]', 'scaffoldguided.target_ss=/home/cs/software/RFdiffusion/helper_scripts/1_ss.pt', 'scaffoldguided.target_adj=/home/cs/software/RFdiffusion/helper_scripts/1_adj.pt', 'scaffoldguided.scaffold_dir=/home/cs/software/RFdiffusion/examples/Sheet_scaffolds/', 'ppi.hotspot_res=[A70,A72,A140]', 'inference.num_designs=500', 'denoiser.noise_scale_ca=0', 'denoiser.noise_scale_frame=0']

@nfloquet
Copy link

Sorry, i didn't understand how to manage and overcome this error, do one need to modify the .sh script directly ? could you precise ? I got the same message by testing fold conditioning using the example mentioned in the doc. : e.g. ./scripts/run_inference.py scaffoldguided.target_path=input_pdbs/insulin_target.pdb inference.output_prefix=example_outputs/design_ppi_scaffolded scaffoldguided.scaffoldguided=True 'ppi.hotspot_res=[A59,A83,A91]' scaffoldguided.target_pdb=True scaffoldguided.target_ss=target_folds/insulin_target_ss.pt scaffoldguided.target_adj=target_folds/insulin_target_adj.pt scaffoldguided.scaffold_dir=./ppi_scaffolds/ inference.num_designs=10 denoiser.noise_scale_ca=0 denoiser.noise_scale_frame=0

@LasseMiddendorf
Copy link

LasseMiddendorf commented Sep 27, 2024

I'm running into the same issue. I tired the proposed fix in #273 and it produces a different error, but still doesn't work

Update
I figured that the issue mentioned in #273 is indeed the error. You can either change the line of code manually as proposed in #273 or just reset the repository to the previous commit that worked by executing git checkout 820bfdfaded8c260b962dc40a3171eae316b6ce0 in your Rfdiffusion repository.

@kn301BE
Copy link
Author

kn301BE commented Sep 27, 2024

Actually I tried both of those solutions mentioned but I found it still caused errors:
Successful diffuser init
Error executing job with overrides: ['inference.output_prefix=example_outputs/design_barrel', 'inference.input_pdb=gfp_design/SYG.pdb', 'scaffoldguided.scaffoldguided=True', 'scaffoldguided.target_pdb=True', 'scaffoldguided.target_ss=2nd_struct/n11S14_barrel0_ss.pt', 'scaffoldguided.target_adj=2nd_struct/n11S14_barrel0_adj.pt', 'inference.num_designs=10', 'denoiser.noise_scale_ca=0', 'denoiser.noise_scale_frame=0']
Traceback (most recent call last):
File "/home/gaon/biosoftware/RFdiffusion/scripts/run_inference.py", line 54, in main
sampler = iu.sampler_selector(conf)
File "/home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/utils.py", line 506, in sampler_selector
sampler = model_runners.ScaffoldedSampler(conf)
File "/home/gaon/biosoftware/RFdiffusion/rfdiffusion/inference/model_runners.py", line 745, in init
assert any(x is not None for x in (conf.contigmap.inpaint_str_helix, conf.contigmap.inpaint_str_strand, conf.contigmap.inpaint_str_loop))
AssertionError

@nfloquet
Copy link

I'm running into the same issue. I tired the proposed fix in #273 and it produces a different error, but still doesn't work

Update I figured that the issue mentioned in #273 is indeed the error. You can either change the line of code manually as proposed in #273 or just reset the repository to the previous commit that worked by executing git checkout 820bfdfaded8c260b962dc40a3171eae316b6ce0 in your Rfdiffusion repository.

could you describe how you succeded in applying these modifications ? need your help.

@nfloquet
Copy link

i moved forward and now the script is executing without the boolean problem but then got this (didnt found anything on the diffusion list) 👍
Successful diffuser init
Error executing job with overrides: ['scaffoldguided.target_path=input_pdbs/insulin_target.pdb', 'inference.output_prefix=example_outputs2/design_ppi_scaffolded', 'scaffoldguided.scaffoldguided=True', 'ppi.hotspot_res=[A59,A83,A91]', 'scaffoldguided.target_pdb=True', 'scaffoldguided.target_ss=target_folds/insulin_target_ss.pt', 'scaffoldguided.target_adj=target_folds/insulin_target_adj.pt', 'scaffoldguided.scaffold_dir=./ppi_scaffolds/', 'inference.num_designs=10', 'denoiser.noise_scale_ca=0', 'denoiser.noise_scale_frame=0']
Traceback (most recent call last):
File "/home/nicolas/PROGRAMMES/RFDIFFUSION/RFdiffusion/examples/../scripts/run_inference.py", line 54, in main
sampler = iu.sampler_selector(conf)
File "/home/nicolas/PROGRAMMES/RFDIFFUSION/RFdiffusion/rfdiffusion/inference/utils.py", line 506, in sampler_selector
sampler = model_runners.ScaffoldedSampler(conf)
File "/home/nicolas/PROGRAMMES/RFDIFFUSION/RFdiffusion/rfdiffusion/inference/model_runners.py", line 750, in init
assert all(x is None for x in (conf.contigmap.inpaint_str_helix, conf.contigmap.inpaint_str_strand, conf.contigmap.inpaint_str_loop)), "can't provide scaffold_dir if you're also specifying per-residue ss"
omegaconf.errors.ConfigAttributeError: Key 'inpaint_str_helix' is not in struct
full_key: contigmap.inpaint_str_helix
object_type=dict

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

@LasseMiddendorf
Copy link

If you reset your repository to the previous commit without the bug, the option to use contigmap.inpaint_str_helix is not available, because the feature has only been implemented in the version which creates the error that this issue has started with. I recommend to change to the most up-to-date version of the repository again and fix the error as proposed in #273

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

6 participants
@zhang-bo-lilly @LasseMiddendorf @nfloquet @Charlesjc-lab @kn301BE and others