Skip to content

Repository files navigation

MemoryElectronicFriction.jl logo — an adsorbate coupled to a metal surface by strings of different frequencies

MemoryElectronicFriction.jl

CI Julia ≥ 1.11 Research code License: MIT arXiv:2608.12572

Memory-Dependent Electronic Friction from Anderson Impurity Models


MemoryElectronicFriction.jl computes the frequency-dependent (memory) electronic friction kernel $\mathcal{K}(\omega;x)$ experienced by nonadiabatic molecular adsorbates on metal surfaces, from Anderson impurity and Newns–Anderson models. The package implements memory-dependent (non-Markovian) friction following the theory of Lu et al. (2026), together with its Markovian ($\omega \to 0$) limit, and provides the surrounding infrastructure — adsorbate models, discretised electronic baths, and molecular-dynamics workflows — needed to study vibrationally inelastic molecule–surface scattering.

$$ M\ddot{\mathbf{x}}= -\nabla_{\mathbf{x}} E_0 -\int_0^t \mathrm{d}t'\mathcal{K}\left(t-t';\mathbf{x}(t),\mathbf{x}(t')\right) \dot{\mathbf{x}}(t') +\boldsymbol{\xi}^{\mathrm{c}}(t), $$

A molecule on a metal loses energy to electron–hole pairs, which drag on the nuclei and kick back at them. This generalised Langevin equation keeps only the nuclei $\mathbf{x}$ and folds the electrons into a friction integral and a noise $\boldsymbol{\xi}^{\mathrm{c}}$, tied together by fluctuation–dissipation.

The memory kernel $\mathcal{K}$ makes it a non-Markovian SDE: the drag felt now is a convolution over the entire history of velocities, so the nuclei are no longer their own complete state. If instead the nuclei are slow compared with the electronic response, the kernel collapses to $\mathcal{K}(t-t') \to \Lambda(\mathbf{x})\,\delta(t-t')$ — the integral becomes an instantaneous drag $-\Lambda(\mathbf{x})\dot{\mathbf{x}}$, the noise turns white, and one recovers the Markovian SDE of standard electronic friction.

This package computes $\mathcal{K}(\omega;\mathbf{x})$ so each mode feels the friction appropriate to its own frequency, with $\omega \to 0$ recovering the Markovian limit.

Features

Component Description
Adsorbate models (AndersonImpurityModels) Type hierarchy (1-DOF / N-DOF × wide-band / frequency-dependent hybridisation) with five ready-made models: BrandbygeAdsorbate, ErpenbeckThossAdsorbate, HGeAdsorbate, the 2-D NOAuAdsorbate, and the NQCModels-compatible POGOModel
Memory friction (AndersonImpurityFrictions.FrequencyLambda) $\mathcal{K}(\omega;x)$ via multithreaded computing; analytic wide-band 1-DOF route; 2×2 friction tensors (LambdaAveraged) for two-coordinate models
Markovian limit (AndersonImpurityFrictions.MarkovianLambda) widebandfriction for the instantaneous-friction baseline ($\omega \to 0$)
I/O helpers HDF5 + DrWatson conventions for simulation data (dict_to_data_savename, …)

A complete feature inventory with file references lives in FEATURES.md.

Installation

Prerequisites: Julia ≥ 1.11 (download). This is a DrWatson research project rather than a registered package.

Setup:

julia> using Pkg
julia> Pkg.add("DrWatson")                    # once, globally — enables @quickactivate
julia> Pkg.activate("path/to/MemoryElectronicFriction.jl")
julia> Pkg.instantiate()

Raw simulation data are typically not tracked in git and may need to be regenerated with the scripts under scripts/compute/.

Most scripts begin with

using DrWatson
@quickactivate "MemoryElectronicFriction"

which activates the project and makes DrWatson's local-path helpers (datadir(), plotsdir(), …) work from anywhere in the repository.

Quick Start

using MemoryElectronicFriction
using Unitful, UnitfulAtomic

# Wide-band 1-DOF adsorbate (Erpenbeck–Thoss model)
m = ErpenbeckThossAdsorbate= austrip(1.0u"eV"))

# Memory friction kernel at ħω = 0.1 eV, bond length 2 Å, T = 300 K
# Memory friction kernel at ħω = 0.1 eV, bond length 2 Å, T = 300 K= FrequencyLambda.Lambda(austrip(0.1u"eV"), m, austrip(2.0u"Å"), austrip(300u"K"))

# Markovian (ω → 0) baseline
K0 = MarkovianLambda.widebandfriction(m, austrip(2.0u"Å"), austrip(300u"K"))

Performance Notes

FrequencyLambda.Lambda evaluates quadratures over matrix products; sweeping an array of $\omega$ values parallelises well with Julia's multithreading:

julia -t auto your_script_calling_Kernel.jl

Repository Layout

Path Contents
src/ Package modules: DistributionTools, Baths, AndersonImpurityModels, AndersonImpurityFrictions, IO
scripts/compute/ Production simulations (friction kernels, CPA, MD)
scripts/plot/ Publication-quality figures
test/ Unit tests (Pkg.test())
dev/ Exploratory and development scripts
docs/ Technical derivations and supporting material

Physics workflows

NO/Au(111) Scattering — the 2-D Gardner–Habershon–Maurer Model

A reduced model for vibrationally inelastic scattering of NO from Au(111): a two-state (neutral / charge-transfer) Newns–Anderson Hamiltonian whose ground adiabatic surface depends on two coordinates — the N–O bond length r and the molecule–surface distance z — propagated with Born–Oppenheimer MD. Implementation: POGOModel (NQCModels interface); BO-MD driver in run_md.jl; adapted from NQCD/SurfaceScatteringMQC.

Initial NO vibration (EBK). The incoming NO is prepared in vibrational state ν by Einstein–Brillouin–Keller (EBK) quantisation of the 1-D bond, then phase-space sampled. The animation walks through the logic for ν = 16:

  1. Quantise — freeze the molecule far from the surface (z = 10 Å) to obtain the 1-D bond binding curve V(r), and raise the energy until the EBK action ∮ p dr = 2π(ν+½)ℏ equals the integer ν. This fixes the bond energy .
  2. Sample — at fixed the bond behaves as a 1-D oscillator; draw (r, ṙ) snapshots uniformly in time along the orbit (½μṙ² = Eν − V(r)). Classically, positions accumulate at the turning points, while kinetic energy spans 0 → Eν − V_\text{min}.

EBK initial vibrational sampling for ν = 16
Figure. EBK preparation of the NO(ν = 16) initial state. Left: the 1-D bond binding curve and its quantised levels — the energy is raised until the EBK action equals the integer ν, fixing Eν. Centre: the classical orbit at Eν in phase space (r, ṙ) with sampled snapshots. Right: the resulting distributions of bond length (top) and vibrational kinetic energy (bottom).

The final vibrational state of the scattered trajectories is read off the same binding curve — see run_vib_state_noau.jl. Reproduce the animation with animate_ebk_sampling.jl.

Citation

This package implements the theory of:

X. Lu, C. L. Box, N. Hertl, and R. J. Maurer, "Memory-dependent electronic friction for nonadiabatic dynamics at metal surfaces", arXiv:2608.12572 [cond-mat.mtrl-sci] (2026).

If you use MemoryElectronicFriction.jl in published work, please cite that paper alongside this repository:

@article{Lu2026MemoryElectronicFriction,
  author        = {Lu, Xuexun and Box, Connor L. and Hertl, Nils and Maurer, Reinhard J.},
  title         = {Memory-dependent electronic friction for nonadiabatic dynamics at metal surfaces},
  year          = {2026},
  month         = aug,
  eprint        = {2608.12572},
  archivePrefix = {arXiv},
  primaryClass  = {cond-mat.mtrl-sci},
  doi           = {10.48550/arXiv.2608.12572},
  url           = {https://arxiv.org/abs/2608.12572}
}

@software{MemoryElectronicFriction_jl,
  author = {Lu, Xuexun},
  title  = {{MemoryElectronicFriction.jl}: Memory-dependent electronic friction from Anderson impurity models},
  year   = {2026},
  url    = {https://github.com/Louhokseson/MemoryElectronicFriction.jl}
}

License

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

Email ORCID Google Scholar


Copyright © 2026 Xuexun Lu. All rights reserved.

About

Julia package to compute the memory-dependent electronic friction kernel for Generalise Langevin dynamics (GLE).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages