-
Notifications
You must be signed in to change notification settings - Fork 54
Modification for alphafold3 backend #547
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
Conversation
Remove unnecessary arguments for alphafold3 backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem I see is that when AF2-specific flags are passed to the AF3 backend, they’re silently dropped in run_multier_jobs.py. This can mislead users into thinking the options were applied when they weren’t. For instance, passing --num_cycle (AF2) instead of the correct AF3 flag --num_recycles results in the argument being ignored with no warning. To prevent this confusion, we recently added the _validate_flags_for_backend check in run_structure_prediction.py, so unsupported flags are now detected and raise exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but at the moment run_multimer_jobs.py forward all of its flags, even if they are empty, to run_structure_prediction.py and _validate_flags_for_backend raised error.
ValueError: The following flags are not supported by backend 'alphafold3': ['compress_result_pickles', 'models_to_relax', 'msa_depth_scan', 'multimeric_template', 'num_cycle', 'num_predictions_per_model', 'pair_msa', 'remove_keys_from_pickles', 'remove_result_pickles', 'use_ap_style', 'use_gpu_relax']
Solution is probably to modify run_multimer_jobs.py, so that it does not pass empty flags to run_structure_prediction.py and modify flags (--num_cycle to --num_recycles just for AF3) to keep only one same flag in command line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think use_ap_style flag is not used in the alphafold3_backend.py, as it is used earlier in run_structure_prediction.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, use_ap_style is not used by alphafold3_backend.py, but run_structure_prediction.py still expects this flag in order to correctly construct the output directory. However, _validate_flags_for_backend raises an error if this flag is passed to the Alphafold3 backend.
Since _validate_flags_for_backend runs at the very beginning of the main function in run_structure_prediction.py, the output directory defaults to something like ./result/ instead of the expected ./result/prot1_and_prot2/.
DimaMolod
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Qrouger , these are very helpful fixes!
No description provided.