protein_binding: switch s4 to Boltz-2, remove hardcoded paths, pin GPUs - #61
Open
drawadiagram wants to merge 1 commit into
Open
protein_binding: switch s4 to Boltz-2, remove hardcoded paths, pin GPUs#61drawadiagram wants to merge 1 commit into
drawadiagram wants to merge 1 commit into
Conversation
Protein-binding workflow changes extracted from the impress_fixes branch. Depends on the ImpressManager/find_gpus changes in the preceding commit. Structure prediction (s4): AlphaFold multimer is replaced by Boltz-2. - s4_boltz.sh resolves its interpreter from BOLTZ_VENV/VIRTUAL_ENV rather than sourcing a hardcoded /anvil venv, and makes --use_msa_server opt-in (BOLTZ_USE_MSA_SERVER=1) because compute nodes have no internet. - Fix a CCD cache extraction race that killed 13/16 pipelines in a production run: boltz's download_boltz2() skips extraction when the mols/ directory merely exists, but tarfile.extractall() creates that directory entry immediately, so a second concurrent task read a half-populated cache and failed with "CCD component not found". The lock is now held across a completeness check of mols/ against mols.tar, with a .mols_complete marker to skip the O(45k) recount once warmed. - s3 embeds pre-computed MSA paths in the FASTA header, falling back to single-sequence mode when the cache is cold. - af2_multimer_reduced.sh and the commented-out s4_alphafold task are removed along with scripts/s4_alphafold.sh; the AF2 path had been dead for some time and its test-mode stub emitted Boltz-shaped output. Portability: MPNN_PATH now comes from the environment and fails loudly when unset; base_path is split into input_base_path/output_base_path (IMPRESS_BASE_DIR / IMPRESS_OUTPUT_DIR / IMPRESS_SCRIPTS_DIR) so inputs, outputs and scripts can live apart; every scripts/*.sh re-activates $VIRTUAL_ENV instead of a hardcoded cluster path; plddt_extract_pipeline writes its CSV under --path rather than cwd. GPU scheduling: a gpu_id kwarg is threaded into s4_boltz.sh as CUDA_VISIBLE_DEVICES and propagated to child pipelines, with the runner round-robining find_gpus() across pipelines. A per-GPU semaphore caps concurrent Boltz launches at 2 for each GPU, shared across every pipeline pinned to it. Failure handling: s1, s4 and s5 each check for their real output before re-raising, because the execution backend intermittently reports a failure for a task that completed; run() now aborts the pass if every s4 failed instead of proceeding to pLDDT extraction on nothing. Adds delta_env_setup.sh and delta_gpu_run.sh for Delta HPC, with IMPRESS_BACKEND=dragon|local and IMPRESS_TEST_MODE switches. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lo8DwSbyvdWZRkkkka6gA2
This was referenced Sep 11, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits the protein-binding workflow changes out of #59. Second of four.
Based on #60 (needs
find_gpusandIMPRESS_SESSION_DIR). GitHub will retarget this tomainwhen #60 merges — review only the commit on this branch.Structure prediction: AlphaFold multimer → Boltz-2
s4_boltz.shresolves its interpreter fromBOLTZ_VENV/VIRTUAL_ENVinstead of sourcing a hardcoded/anvilvenv, and makes--use_msa_serveropt-in viaBOLTZ_USE_MSA_SERVER=1because compute nodes have no internet.download_boltz2()decides to skip extraction based on whether themols/directory exists, buttarfile.extractall()creates that directory entry immediately — so a second concurrent task sawmols/present, skipped extraction, read a half-populated cache, and died withCCD component not found. The lock is now held across a completeness check ofmols/againstmols.tar, with a.mols_completemarker so later runs skip the O(45k) recount once warmed.s3embeds pre-computed MSA paths in the FASTA header, falling back to single-sequence mode when the cache is cold.af2_multimer_reduced.shandscripts/s4_alphafold.share deleted, along with the commented-outs4_alphafoldtask block that was their only remaining call site. That also resolves @AymenFJA's "remove any Dragon reference" comment ons4_alphafold.sh:10— the file is gone.task_description={"gpus_per_rank": 1}is removed from thes1ands4signatures. GPU assignment now happens by pinning: agpu_idkwarg is threaded intos4_boltz.shasCUDA_VISIBLE_DEVICES, propagated to child pipelines, with the runner round-robiningfind_gpus()across pipelines. A module-level per-GPUasyncio.Semaphore(2)caps concurrent Boltz launches on each GPU across every pipeline pinned to it.@AymenFJA — this is what your
protein_binding.py:203/:212comments were pointing at. To be precise about one thing: no task decorator changed.s4_post_execwas alreadylocal_task=Trueonmain(I diffed them), ands4already hadcapture_stdio=True. The real change is the resource-request removal above, and it deserves your eye.Portability
MPNN_PATHcomes from the environment and fails loudly when unset;base_pathsplits intoinput_base_path/output_base_path(IMPRESS_BASE_DIR/IMPRESS_OUTPUT_DIR/IMPRESS_SCRIPTS_DIR); everyscripts/*.shre-activates$VIRTUAL_ENVinstead of a hardcoded cluster path;plddt_extract_pipeline.pywrites its CSV under--pathrather than cwd.Adds
delta_env_setup.shanddelta_gpu_run.sh(withIMPRESS_BACKEND=dragon|localandIMPRESS_TEST_MODEswitches). The leaked--mail-useraddress @AymenFJA flagged is now a<your e-mail>placeholder.Robustness
s1,s4ands5each check for their real output before re-raising, because the execution backend intermittently reports failure for a task that completed.run()now aborts the pass if everys4failed instead of proceeding to pLDDT extraction on nothing.Beyond a straight extraction
Deleting
s4_alphafold.shleft dangling references inCLAUDE.mdandREADME.md; both now describe Boltz-2 as the only s4 path.Still open from #59
@AymenFJA's comment on
delta_env_setup.sh:105(the Dragon/Delta comment being misleading) is carried over unchanged — I'd rather you tell me what it should say than guess. On installing Dragon twice (:107): it's installed exactly once, viarhapsody-py[dragon,telemetry], which is what your comment asks for.Replaces part of #59.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lo8DwSbyvdWZRkkkka6gA2