Skip to content

feat: support backbone-only CIF output and parallel-seed dump_dir#8

Open
Xinping-Liu wants to merge 1 commit intoOTeam-AI4S:mainfrom
Xinping-Liu:feat/backbone-only-parallel-seeds
Open

feat: support backbone-only CIF output and parallel-seed dump_dir#8
Xinping-Liu wants to merge 1 commit intoOTeam-AI4S:mainfrom
Xinping-Liu:feat/backbone-only-parallel-seeds

Conversation

@Xinping-Liu
Copy link
Copy Markdown

Summary

Two small fixes to support backbone-only inference pipelines and parallel seed execution:

  • scripts/inference.py: decouple data output directory from Hydra working directory by introducing an optional exp.dump_dir config override. When running multiple seeds in parallel, each worker needs its own hydra.run.dir to avoid config file conflicts, while all workers should write outputs to a shared directory. Without this change, outputs from different workers overwrite each other. Original behavior (no dump_dir set) is unchanged.

  • src/utils/inference/dumper.py: save backbone CIF files even when use_invfold=false. Previously, save_structure_cif() was inside the if variant is not None block, so no CIF was written when inverse folding was skipped. Moving it outside the block ensures backbone structures are always saved, enabling downstream pipelines (e.g. motif scaffolding evaluation) that only need backbone coordinates.

Compatibility

Both changes are fully backward-compatible. Existing usage without the new parameters is unaffected.

Test

Validated on MotifBench motif scaffolding tasks with use_invfold=false and parallel seed execution across multiple GPUs.

Two improvements to enable backbone-only inference and parallel seed runs:

1. scripts/inference.py: decouple data output dir from Hydra working dir
   - Read hydra_output_dir before converting configs to ConfigDict
   - Add exp.dump_dir override: if set, use it as dump_dir; otherwise
     fall back to hydra_output_dir (original behavior unchanged)
   - This allows parallel seed workers to each use a distinct
     hydra.run.dir while writing outputs to a shared directory

2. src/utils/inference/dumper.py: save backbone CIF when use_invfold=false
   - Move save_structure_cif() call outside the if variant is not None
     block so backbone CIFs are written regardless of whether inverse
     folding produced sequence variants
   - When use_invfold=false, variant=None and the CIF contains only
     backbone coordinates (no sequence annotation), which is the
     expected and useful output for downstream backbone-only pipelines
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.

1 participant