Repository navigation
This release modernizes how deeptime is built and tested, raises the minimum Python version, and collects a few bug fixes. Existing code should keep working unchanged apart from the two breaking changes below.
Breaking changes
- Python 3.8 and 3.9 are no longer supported. The minimum is now Python 3.10. Wheels are provided for Python 3.10 through 3.15 on Linux, macOS (x86_64 and arm64) and Windows.
- Sparse matrices are now
scipy.sparsearrays. Sparse count matrices and transition matrices, fromTransitionCountModel,MarkovStateModeland thedeeptime.markov.tools.estimationfunctions, are returned ascsr_arrayinstead ofcsr_matrix. For these objects*is elementwise multiplication (use@for matrix products) and the.A/.A1shortcuts are gone (use.toarray()).
New features
- Weighted VAMP.
VAMPaccepts observation weights on thecompute_ctt=Truecode path, andVAMP.partial_fit()gained aweightsargument for incremental weighted fitting (#259).
Bug fixes
plot_densityno longer swaps the x and y axes (#302).SamplerRevaccepts sparse count matrices and initial distributions (#310).- TRAM:
restrict_to_submodeliterated over thermodynamic states instead of trajectories, which skipped trajectories or raised anIndexErrorwith replica-exchange input (#299). reactive_flux: thetransition_matrix_tolerancecheck was inverted and rejected valid transition matrices.AugmentedMSMEstimator.uncertaintiesraised anAttributeError.- The non-reversible transition-matrix sampler ignored its seed.
- The parallel (
n_jobs > 1) effective count matrix used the wrongmactvalue, giving results that differed from the serial path. - The
*_sensitivityfunctions returnedNonefor sparse transition matrices, andforward_committor_sensitivitynow sums over the whole target set instead of pairing states elementwise. expectation()raised when a stationary distribution was passed explicitly.- Flux: the bottleneck decomposition crashed when the strongest edge directly connects A and B, and producer/consumer detection no longer divides by zero for states without flux.
time_relaxations_directraised aNameErrorwhen the largest requested time did not exceed the number of states.is_rate_matrixzeroes the diagonal before the non-negativity check instead of broadcasting it across rows, and works for sparse input.MaximumLikelihoodMSMnow raises a clearValueErrorwhen the stationary-distribution constraint is zero on some but not all visited states.- Arguments renamed through
deprecated_argumentwere not actually forwarded under the new name. - The total-variation derivative stopped early because its convergence check only looked at the first component of the update.
atleast_ndworks with numpy >= 2.VAMPNetignored the requested device and dtype at construction time.- SINDy stored a feature row in
n_output_features_instead of the column count. - Multiprocessing uses a fork-safe context, which avoids the
fork()DeprecationWarningon Python 3.13+. - various plotting fixes
vamp_scorecould return scores orders of magnitude above the theoretical bound for float32 features with a rank-deficient covariance, such as softmax lobe outputs, because floating-point round-off cancelled the eigenvalue regularization. The regularized eigenvalues are now bounded below byepsilon, and for float32 input the covariances are accumulated in float64 (except on MPS, which has no float64).
Build system and packaging
- Migrated from scikit-build and versioneer to scikit-build-core and setuptools-scm, with a
src/layout. Building from source requires pybind11 >= 3.1; scipy is no longer a build-time dependency. - CI moved from Azure Pipelines to GitHub Actions; the C++ test suite runs again (Catch2 3.7.1) and wheels are published through PyPI trusted publishing.
- Tests that compared numerical noise, in the Kahan dot product and in the OOM fingerprint timescales, were made robust to compiler and platform differences.
- Several tests that did not exercise what they described now do (#327, #328, thanks @dylanpulver).
Documentation
- The custom estimator examples in the developer guide follow the actual
fetch_model()interface, and the transition matrix prose correctly describesP_ijas the probability of moving from state i to state j (#326, thanks @dajiaohuang). - PCCA+ metastable distributions and
indices_by_distributionnow document how to sample structures when the active set is a strict subset of the full state space. - The example gallery builds again with matplotlib >= 3.9 (
matplotlib.cm.get_cmapwas removed), the API reference links into the numpy, scipy, scikit-learn, PyTorch and matplotlib documentation through intersphinx, and a few broken cross-references and docstring formatting errors were fixed.
New Contributors
- @dajiaohuang made their first contribution in #326
- @dylanpulver made their first contribution in #327
Full Changelog: v0.4.5...v0.5.0