Skip to content

Turn into package and improve chain handling. - #31

Open
colbyford wants to merge 9 commits into
DunbrackLab:mainfrom
colbyford:main
Open

Turn into package and improve chain handling.#31
colbyford wants to merge 9 commits into
DunbrackLab:mainfrom
colbyford:main

Conversation

@colbyford

Copy link
Copy Markdown

ipSAE Improvements

Installable library

  • src/ipsae/ package (utils, parsers, confidence, scoring, outputs, api, cli) with pyproject.toml. This installs via pip install ., giving the ipsae console command and python -m ipsae. Root ipsae.py remains a fully backwards-compatible wrapper.
  • Programmatic API: score_interactions() returning structured results with get_score(), chain_pairs, residues, write_outputs(), to_csv().

New capabilities:

  • --csv export from CLI command
  • Transparent gzipped-JSON support
  • ~10x speedup on large complexes (AF2 example: 14.3s → 1.3s)

Bug fixes:

  • Wrong "max" scores for non-alphabetical chain order: the original interleaved max computation with asym computation, so when chains appeared out of alphabetical order in the file, maxima were taken against not-yet-computed (zero) values. Now all asymmetric values are computed first, then maxima. This was verified with a synthetic test.
  • Boltz crash on missing pair_chains_iptm: the fallback was dead code immediately followed by a direct dict access (KeyError). This now falls back cleanly to ipTM = 0.
  • Companion-file path derivation (Boltz pLDDT/confidence, AF3 summary) used str.replace on the full path, breaking for directories containing "pae"/"confidences". Now basename-only.
  • Clear errors instead of NameError/silent misbehavior for missing pae keys and PAE-matrix/structure size mismatches; .pkl PAE files now reachable.

Tests

  • All three output files (.txt, _byres.txt, .pml) are byte-identical to the original script on both bundled examples, enforced by a 15-test pytest suite with fixtures generated from the original script.
  • Code review feedback addressed (documented the intentionally preserved calc_d0_array L=27 quirk).
  • Clean CodeQL scan.

Copilot AI and others added 9 commits August 29, 2026 19:34
…utputs

Co-authored-by: colbyford <3814088+colbyford@users.noreply.github.com>
Co-authored-by: colbyford <3814088+colbyford@users.noreply.github.com>
Co-authored-by: colbyford <3814088+colbyford@users.noreply.github.com>
…ties

Turn into package and improve chain handling.
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