-
Notifications
You must be signed in to change notification settings - Fork 0
fix: resolve breaking issues in docking pipeline #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,7 +80,7 @@ run-boltz: _prepare-passwd | |
| $(DOCKER_COMMON) \ | ||
| --gpus all \ | ||
| --shm-size=8g \ | ||
| -e LD_LIBRARY_PATH=/opt/localcolabfold/.pixi/envs/default/lib:/usr/local/lib \ | ||
| -e LD_LIBRARY_PATH=/opt/localcolabfold/.pixi/envs/default/lib:/usr/local/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cu13/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cuda_nvrtc/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cudnn/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cublas/lib \ | ||
| guild:latest \ | ||
| python $(MASTER_SCRIPT) \ | ||
| --project $(PROJECT) \ | ||
|
|
@@ -124,7 +124,7 @@ run-guild: _prepare-passwd | |
| $(DOCKER_COMMON) \ | ||
| --gpus all \ | ||
| --shm-size=8g \ | ||
| -e LD_LIBRARY_PATH=/opt/localcolabfold/.pixi/envs/default/lib:/usr/local/lib \ | ||
| -e LD_LIBRARY_PATH=/opt/localcolabfold/.pixi/envs/default/lib:/usr/local/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cu13/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cuda_nvrtc/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cudnn/lib:/app/.venv/lib/python3.10/site-packages/nvidia/cublas/lib \ | ||
| guild:latest \ | ||
|
Comment on lines
+127
to
128
|
||
| python $(MASTER_SCRIPT) \ | ||
| --project $(PROJECT) \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,6 +59,7 @@ | |||||||||||||||||||||||
| PROTEIN_CONF_ID, | ||||||||||||||||||||||||
| PROTEIN_ID, | ||||||||||||||||||||||||
| PROTEIN_PATH, | ||||||||||||||||||||||||
| PROTEINS_FOLDER, | ||||||||||||||||||||||||
| # Scores lists | ||||||||||||||||||||||||
| RP_SCORES_COLUMNS, | ||||||||||||||||||||||||
| # Dictionaries | ||||||||||||||||||||||||
|
|
@@ -554,23 +555,77 @@ def run_docking(self): | |||||||||||||||||||||||
| continue | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| os.makedirs(f"{current_batch_folder}/{BOLTZ_FOLDER}", exist_ok=True) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Use single-chain PDB as template to avoid Boltz multi-chain parsing errors | ||||||||||||||||||||||||
| boltz_template_file = ( | ||||||||||||||||||||||||
| f"{current_batch_folder}/{PROTEINS_FOLDER}/" | ||||||||||||||||||||||||
| f"{unique_protein_configuration_id}_single_chain_clean.pdb" | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
| if not os.path.exists(boltz_template_file): | ||||||||||||||||||||||||
| # Fallback to original protein path if single-chain not available | ||||||||||||||||||||||||
| boltz_template_file = current_protein_path | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| yaml_file = f"{current_batch_folder}/{BOLTZ_FOLDER}/{run_id}_boltz.yaml" | ||||||||||||||||||||||||
| boltz_out_dir = f"{current_batch_folder}/{BOLTZ_FOLDER}" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| generate_boltz_yaml( | ||||||||||||||||||||||||
| protein_sequence=current_protein_sequence, | ||||||||||||||||||||||||
| protein_chain=current_protein_chain, | ||||||||||||||||||||||||
| ligand_sequences=[ligand_smiles], | ||||||||||||||||||||||||
| ligand_ids=["L"], | ||||||||||||||||||||||||
| output_file=f"{current_batch_folder}/{BOLTZ_FOLDER}/{run_id}_boltz.yaml", | ||||||||||||||||||||||||
| template_file=current_protein_path, | ||||||||||||||||||||||||
| output_file=yaml_file, | ||||||||||||||||||||||||
| template_file=boltz_template_file, | ||||||||||||||||||||||||
| pocket_contacts=pocket_contacts if pocket_contacts else None, | ||||||||||||||||||||||||
| msa_file=msa_file, | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| deploy_boltz( | ||||||||||||||||||||||||
| f"{current_batch_folder}/{BOLTZ_FOLDER}/{run_id}_boltz.yaml", | ||||||||||||||||||||||||
| out_dir=f"{current_batch_folder}/{BOLTZ_FOLDER}", | ||||||||||||||||||||||||
| yaml_file, | ||||||||||||||||||||||||
| out_dir=boltz_out_dir, | ||||||||||||||||||||||||
| use_gpu=self.use_gpu, | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Check if Boltz produced valid output (manifest with records). | ||||||||||||||||||||||||
| # Template PDB parsing can fail silently in Boltz2, resulting | ||||||||||||||||||||||||
| # in an empty manifest. If that happens, retry without the template. | ||||||||||||||||||||||||
| manifest_path = ( | ||||||||||||||||||||||||
| f"{boltz_out_dir}/boltz_results_{run_id}_boltz/processed/manifest.json" | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
| if os.path.exists(manifest_path): | ||||||||||||||||||||||||
| import json as _json | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| with open(manifest_path) as _mf: | ||||||||||||||||||||||||
| _manifest = _json.load(_mf) | ||||||||||||||||||||||||
|
Comment on lines
+597
to
+598
|
||||||||||||||||||||||||
| with open(manifest_path) as _mf: | |
| _manifest = _json.load(_mf) | |
| try: | |
| with open(manifest_path) as _mf: | |
| _manifest = _json.load(_mf) | |
| except (_json.JSONDecodeError, OSError) as exc: | |
| logger.warning( | |
| f"Boltz2 produced unreadable manifest for {run_id}: {exc}. " | |
| "Retrying without template..." | |
| ) | |
| _manifest = {} |
Copilot
AI
Apr 30, 2026
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 new Boltz empty-manifest retry path is complex and impacts run stability, but there are no unit tests exercising it. Since this repo already has BulkRun tests, consider adding a test that mocks deploy_boltz/generate_boltz_yaml and verifies a retry occurs when manifest.json has no records.
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.
LD_LIBRARY_PATHis fully hardcoded here and duplicated across multiple targets, which can drift from the value baked into the image and is easy to forget to update in one place. Consider factoring this into a Makefile variable and/or appending to the container’s existingLD_LIBRARY_PATHinstead of replacing it entirely.