Releases: elkins-lab/synth-nmr
Releases · elkins-lab/synth-nmr
Release list
v0.11.6
Release v0.11.5
Full Changelog: v0.11.4...v0.11.5
Release v0.11.4
Full Changelog: v0.11.0...v0.11.4
synth-nmr 0.11.3
Immutable
release. Only release title and notes can be modified.
Security
- Removed compromised
polyfill.ioCDN script from MkDocs configuration to resolve supply-chain vulnerability.
synth-nmr 0.11.0
Immutable
release. Only release title and notes can be modified.
Added
- Argparse CLI: Replaced manual argument parsing with a robust
argparseimplementation. Added support for subcommands and improved error handling while maintaining interactive mode. - Carbon Ring Currents: Expanded empirical chemical shift predictions (SPARTA+ fallback) to include ring current effects for Carbon-alpha (CA) and Carbon-beta (CB) atoms.
Changed
- Vectorized Trajectory Analysis: Refactored
TrajectoryEnsembleto usebiotite.structure.AtomArrayStack. This drastically reduces memory usage and enables high-speed vectorized ensemble averaging using NumPy. - S² Performance: Fully vectorized the
compute_s2_from_trajectoryfunction, resulting in a ~100x speedup for large MD trajectories.
Fixed
- CLI Robustness: Improved handling of invalid input values in the CLI with clear error messages.
- Test Coverage: Added targeted tests for CLI validation, export commands, and trajectory edge cases, reaching 95% total coverage.
v0.10.0
Fixed
-
Relaxation Calculations: Corrected scaling factors in
$, $ , and NOE calculations. Fixed a frequency term sign error for Heteronuclear NOEs inrelaxation.py.
Added
- Scientific Benchmark Suite: New automated validation for Chemical Shift Index (CSI), J-couplings, RDC distributions, and relaxation parameters in
tests/test_scientific_benchmarks.py. - Dependency Management: Added
requeststorequirements-dev.txtfor automated benchmark data retrieval.
Changed
- Code Quality: Resolved all Ruff and mypy errors to improve codebase maintainability and type safety.
synth-nmr 0.9.0
Added
- Security Policy: Added
SECURITY.mdfor security policy and vulnerability reporting. - Issue Templates: Updated issue templates for better bug tracking and feature requests.
Changed
- Modernized NMR Infrastructure: Vectorized core modules (J-coupling and relaxation rate calculations) using NumPy, replacing iterative approaches with highly performant arrays.
- CLI Refactoring: Refactored CLI interactive handlers to improve modularity and testability.
- Test Suite Expansion: Expanded test suite to 320 tests, achieving project-wide coverage.
- Ensemble Processing Optimization: Optimized trajectory and ensemble processing for handling large MD datasets efficiently.
- Code Quality:
- Integrated Ruff for high-performance linting and formatting, replacing Black/Flake8.
- Resolved
mypystatic analysis errors and enforced comprehensivePEP 484type hint compliance.
Fixed
- NOE Processing: Fixed synthetic NOE processing bug in ensemble averaging logic.
- Backbone Angles: Resolved test error caused by a mismatch in backbone angles count (76) versus residue count (134).
synth-nmr 0.7.2
Fixed
synth_nmr/relaxation.py—calculate_relaxation_rates(): Heteronuclear NOE
values were identical for every residue (a flat horizontal line), regardless of
backbone flexibility. Root cause: when the fast internal motion timescaletau_f
defaults to 0, the order parameter S² cancels exactly in the ratio of the
cross-relaxation rate to R₁, making NOE a function of τ_m and field strength only.
Fix: a per-residuetau_fis now derived from S² using the heuristic
tau_f = (1 − S²) × 500 ps + 50 ps(range 50–550 ps), consistent with
MD-derived backbone timescales. Flexible residues (low S²) now correctly produce
lower HetNOE values (approaching 0 and negative) while rigid secondary-structure
elements (high S²) give HetNOE ≈ 0.5–0.8, matching experimental profiles.
Reference: Lipari & Szabo (1982) J Am Chem Soc 104:4546.
synth-nmr 0.7.1
Added
-
MD Trajectory / Ensemble NMR (
synth_nmr/trajectory.py): New module for
multi-frame NMR analysis. Features:-
load_trajectory()— load NMR ensembles or MD trajectories from a list of
AtomArrayframes (or MDTrajTrajectoryobjects). -
compute_s2_from_trajectory()— backbone S² order parameters via
Lipari-Szabo vector autocorrelation ($S^2 = |\langle\hat{\mu}\rangle|^2$ ). -
ensemble_average_shifts()— arithmetic mean across conformers (fast exchange). -
ensemble_average_noes()—$r^{-6}$ -weighted effective distances
($r_\text{eff} = \langle r^{-6}\rangle^{-1/6}$ ). -
ensemble_average_rdcs()— arithmetic mean RDC over ensemble. - Full test suite in
tests/test_trajectory.py(45 tests, all passing).
-
-
SHIFTX2 integration (
synth_nmr/chemical_shifts.py):predict_chemical_shifts()
now uses SHIFTX2 (Han et al. 2011) when available in PATH, achieving ~0.44 ppm Cα
RMSD vs ~0.9–1.1 ppm for the built-in SPARTA+ model. Automatic fallback to SPARTA+
with a logged warning if SHIFTX2 is absent or crashes. NewShiftX2Predictorclass
available for direct use. -
New tutorial:
docs/tutorials/ensemble_nmr_analysis.ipynb— 8-cell Google Colab
notebook demonstrating S², ensemble-averaged shifts, NOE r⁻⁶ vs arithmetic mean, and
RDC ensemble averaging using the 1D3Z 10-conformer Ubiquitin NMR ensemble. -
New science doc:
docs/science/shiftx2.md— comprehensive guide to SHIFTX2
integration (accuracy comparison table, installation instructions, API reference,
fallback logic diagram, and automated test coverage table).
Changed
synth_nmr_cli.py: CLIensemblecommands now correctly merge the nested
{method: {res_id: {atom: shift}}}dict frompredict_chemical_shifts()before
passing toensemble_average_shifts(). AddedDictandTupleto typing imports.
Added# type: ignore[attr-defined]fornoe_dict.items()where mypy cannot
resolve the type.docs/tutorials/advanced_observables.ipynb: Upgraded with improved
visualisations (J-coupling coloured by secondary structure, NOE dual-panel figure
showing pair count vs. r⁻⁶ signal power, RDC bar chart with sign colouring) and a
new Section 5 — ensemble NOE effects with r_eff vs r_arith scatter and per-residue
error bar chart.docs/tutorials/relaxation_analysis.ipynb: Upgraded to a 4-panel relaxation
figure (R₁, R₂, hetNOE, S²) and a new Section 5 comparing heuristic S² against
trajectory-derived S² from the 10-conformer ensemble, with Pearson correlation plot.mkdocs.yml: Added Ensemble NMR Analysis tutorial and SHIFTX2 Integration
doc page to site navigation.README.md: Added PyPI version, Python versions, Ruff, Mypy, and License
badges; added fourth Colab badge for Ensemble NMR Analysis tutorial; added
pip install synth-nmr[trajectory]install variant; added MD Trajectory /
Ensemble NMR to Features list.
Fixed
synth_nmr/synth_nmr_cli.py(ruff E713):not args[j].lower() in (...)→
args[j].lower() not in (...).tests/test_trajectory.py(ruff F841): Removed unusedframeslist
comprehension intest_returns_dict_of_residue_ids.synth_nmr/trajectory.py(mypy no-redef): Renamed local variableframesto
mdtraj_framesin MDTraj object loading branch.- Tutorial notebooks: Fixed
AttributeErrorin ensemble NOE cells —
calculate_synthetic_noes()returns alistof dicts, not a nested dict; replaced
incorrectraw.items()iteration with afor entry in raw:loop.