Skip to content

Fix analysis crash when SASA atom selection is empty - Small molecule example#167

Open
juliocesar-io wants to merge 1 commit into
HannesStark:mainfrom
juliocesar-io:fix-sasa-error-empty-atom
Open

Fix analysis crash when SASA atom selection is empty - Small molecule example#167
juliocesar-io wants to merge 1 commit into
HannesStark:mainfrom
juliocesar-io:fix-sasa-error-empty-atom

Conversation

@juliocesar-io
Copy link
Copy Markdown

Fix analysis crash: ValueError: Coordinates are empty in get_delta_sasa()

Problem

Running boltzgen run example/small_molecule_from_file_and_smiles/4g37.yaml --protocol protein-anything on v0.2.0 can fail in step 5/6: analysis:

  • ValueError: Coordinates are empty (Biotite sasa())

Root cause

boltzgen/task/analyze/analyze_utils.py:get_delta_sasa() calls Biotite sasa() on an atom selection that can be empty for some inputs, which Biotite rejects.

Fix

File: boltzgen/task/analyze/analyze_utils.py

  • Catch ValueError from the sasa(target_atoms, ...) call and return (nan, nan, nan) for the SASA metrics instead of aborting the pipeline.

Behavior change

  • Pipeline no longer crashes in analysis.
  • SASA-related metrics become NaN when the SASA selection is empty.

Test

boltzgen run example/small_molecule_from_file_and_smiles/4g37.yaml \
  --output workbench \
  --protocol protein-anything \
  --num_designs 2

@juliocesar-io juliocesar-io changed the title Fix analysis crash when SASA atom selection is empty Fix analysis crash when SASA atom selection is empty - Small molecule example Jan 30, 2026
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