MemoryKernelFitting.jl fits underdamped Prony-series memory kernels to configuration-resolved spectral data. The resulting extended-variable stochastic differential equation reproduces memory-dependent, configuration-dependent electronic friction while preserving the fluctuation–dissipation structure required to sample the correct Gibbs measure.
The input is a real-valued spectral density
| Component | Description |
|---|---|
| Spectral model | Zero-frequency white part, overdamped Lorentzians, and mirrored underdamped Lorentzian pairs through spectral_density
|
| Time-domain kernel | Matching exponential and damped-oscillatory Prony series through memory_kernel
|
| Basis functions |
lorentzian and mirrored_lorentzian, implemented as an explicit one-sided cosine-transform pair |
| Resonant modes | Real |
| FDT-safe parameterisation | Non-negative amplitudes represented structurally as squares, with stable positive decay rates |
| Pole ladders | Log-spaced and uniform fixed ladders with the identifiability box of the frequency window, through log_ladder and uniform_ladder
|
| Configuration dependence |
GridAmplitudes for the convex stage, plus polynomial and warped-Chebyshev bases for the smooth stage, behind one AmplitudeModel interface |
| QGLE readout | Extended-variable blocks and the closed-form block exponential through qgle_blocks and exp_gamma22
|
| Spectral data | Atomic-unit loading of the configuration-resolved spectra, graded-grid quadrature weights, and logarithmic frequency subsampling |
| Validation | Tests for symmetry, resonance onset, Markovian limits, dimension checks, numerical kernel–spectrum consistency, and fluctuation–dissipation structure |
| Fitting pipeline | Weighted objective and fixed-ladder per-configuration NNLS implemented; the coupled roughness solve and optional diagnostic VARPRO remain planned |
Prerequisites: Julia ≥ 1.10 (download). The package is in early development and is not yet registered in the Julia General registry.
Setup:
julia> using Pkg
julia> Pkg.develop(url="https://github.com/Louhokseson/MemoryKernelFitting.jl")
julia> Pkg.test("MemoryKernelFitting")For local development from a clone:
julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.test()'using MemoryKernelFitting
a₀ = 0.0 # white / instantaneous part
a, λ = [0.75], [10.0] # overdamped modes
A, α, β = [1.5, 0.4], [0.5, 1.2], [3.0, 7.0] # underdamped pairs
Λω = spectral_density(3.0, a₀, a, λ, A, α, β)
Kτ = memory_kernel(0.2, a, λ, A, α, β)
# Markovian anchor: the zero-frequency friction used by standard MDEF
Λ₀ = spectral_density(0.0, a₀, a, λ, A, α, β)The white contribution memory_kernel; it enters the dynamics as instantaneous friction rather
than through the regular memory convolution.
The model, data, objective, and fixed-ladder stage-1 fit are implemented and tested: spectral and time-domain evaluation, the two basis functions, pole ladders, the three configuration-dependent amplitude representations, QGLE readout, atomic-unit spectral data loading, the weighted objective, and independent per-configuration NNLS.
The remaining fitting work is the
Design decisions with lasting consequences are recorded in
docs/design/, and progress is logged in
docs/DEVLOG.md.
| Path | Contents |
|---|---|
src/ |
Package implementation and public model-evaluation API |
test/ |
Unit and numerical cosine-transform consistency tests |
docs/PronySeries/ |
QGLE derivation, optimisation problem, and theory handover notes |
assets/ |
Static and animated package logos plus the animation generator |
data/ |
Local spectral and simulation data; large outputs are not tracked |
plots/ |
Generated visualisations and fitting diagnostics |
notebooks/ |
Exploratory analysis notebooks |
The mirrored underdamped basis is
The underdamped pairs are mandatory, not a refinement.
The target spectra are not monotone in
The mirror in
Set
Two structural consequences make the fit well posed:
-
Amplitudes are squares. The fluctuation–dissipation theorem reduces the coupling
to one fitted function
$\boldsymbol g(x)$ and enforces non-negative$a_k$ and$A_j$ . A negative fitted amplitude is therefore a hard signal that no Gibbs-consistent QGLE within this ansatz reproduces the data. -
$\boldsymbol Q=\boldsymbol I$ survives. Each real rotation block gives$\boldsymbol g^T e^{-\tau R}\boldsymbol g =|\boldsymbol g|^2e^{-\alpha\tau}\cos(\beta\tau)$ and$R+R^T=2\alpha\boldsymbol I$ , so $\widetilde{\boldsymbol\Sigma}2=\sqrt{2\alpha},\boldsymbol I_2$. The stability requirement is $\boldsymbol\Gamma{2,2}\boldsymbol Q +\boldsymbol Q\boldsymbol\Gamma_{2,2}^T\succ0$, not symmetry of the drift matrix.
The model is linear in the amplitudes and nonlinear only in the poles, so variable
projection separates the optimisation into an inner convex non-negative least-squares
problem and an outer low-dimensional pole search. Relative residual weights are needed
because
Rates are shared across configurations while amplitudes vary with
The detailed theory and optimisation specification live in
docs/PronySeries/:
| File | Contents |
|---|---|
Prony series (corrected).md |
Canonical QGLE derivation, two-time kernel, and FDT pairing |
Prony_fit_optimisation_problem.md |
Full fitting objective, calibration, and underdamped-series construction |
HANDOVER.md |
Index and development handover |
This package builds on the quasi-Markovian GLE and underdamped memory-kernel constructions described in:
- Sachs, PhD thesis (University of Edinburgh, 2017), Eq. (3.7) and §4.7.2.
- Leimkuhler and Sachs (2019), Ergodic Properties of Quasi-Markovian GLEs with Configuration Dependent Noise.
- Stella, Lorenz, and Kantorovich, Physical Review B 89, 134303 (2014).
- Lei, Baker, and Li, PNAS 113, 14183 (2016).
If you use MemoryKernelFitting.jl in published work, cite the relevant
theory above and this repository:
@software{MemoryKernelFitting_jl,
author = {Lu, Xuexun},
title = {{MemoryKernelFitting.jl}: FDT-safe Prony-series fits for memory-dependent electronic friction},
year = {2026},
url = {https://github.com/Louhokseson/MemoryKernelFitting.jl}
}This project is licensed under the MIT License. See the full text for details.
Xuexun Lu (Hokseon)
PhD Candidate, The Maurer Computational Surface Science Group
The University of Warwick, UK