Skip to content

Conversation

@Qrouger
Copy link
Contributor

@Qrouger Qrouger commented Nov 5, 2025

No description provided.

Copy link
Collaborator

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.

Copy link
Contributor Author

@Qrouger Qrouger Nov 7, 2025

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.

Copy link
Collaborator

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

Copy link
Contributor Author

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/.

Copy link
Collaborator

@DimaMolod DimaMolod left a 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!

@DimaMolod DimaMolod merged commit 40fa1cb into KosinskiLab:main Nov 10, 2025
4 of 8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants