v0.3.9 — robust loader + AD-Init seeding + explicit scope warning
Patch release. No model weights changed. Pretrained checkpoints (ad_transfer_v2_clean_best.pt, ad_init_full_1477_best.pt) are re-used from the v0.3.0 release assets — _RELEASE_TAG stays at v0.3.0 and the cache layout is unchanged.
Bug fixes
- Robust checkpoint loader (
weights.py). Strictload_state_dictplus tolerant handling of trainer checkpoint layouts (model_state/state_dict/modelwithmodel_config/config/args). Constructor kwargs are filtered against the model class signature, so unknown fields no longer silently corrupt config. Mismatched state dicts now raise instead of silently random-initialising part of the model. - AD-Init seeding (
api.py).predict_torsion_ensemblenow defaults to sequence-conditioned initial torsions fromad_init_full_1477(the AD-Init prior) instead of a uniform random[-π, π]seed. Falls back to the legacy uniform seed if the AD-Init checkpoint cannot be loaded, with a stderr note. Passinit_model_name=Noneto opt out. - N=98 mdCATH sequence shift (
data.py). Addedalign_sequence_to_residues(). Previously, when a sequences manifest stored the full domain sequence, the loader sliced it asseq[:n_residues]— for N=98 mdCATH this shifted the sequence by one residue and appendedX. Now indexed viaresidue_indiceswhenever available.
UX
- Banner now shows an explicit scope NOTE:
AlphaDynamics is best validated for short peptides (4-15 aa). Sequences longer than 20 aa are outside the calibrated scope. - Soft
UserWarningemitted frompredict_torsion_ensemblewhen the input sequence is longer than 20 aa. Prediction still runs — this is a calibration disclaimer, not a hard guard. - Interactive CLI's length warning lowered from
>200to>20.
Honest scope
The phase-flow propagator couples oscillators within a residue but does not exchange information across residues. Empirically: excellent on 4–8 aa peptides (2.39× better Ramachandran JSD than Microsoft Timewarp on the 4AA benchmark), strong on 9–15 aa, usable but weaker on 16–25 aa, and aggregate Ramachandran density on chains >30 aa tends toward an "average amino-acid" pattern. For chains over ~20 aa, prefer per-residue Ramachandran panels over the aggregate plot.
Install
pip install --upgrade alphadynamics==0.3.9
Weights download lazily on first use from the v0.3.0 release.
Co-authored with Claude Opus 4.7 (1M context).