Plotting scripts and raw data supporting the manuscript
A Scalable Translationally Invariant Variational Theory of Ab Initio Polarons.
This repository contains everything needed to reproduce the figures in the main text and supplementary information from compact HDF5 bundles, together with the Quantum ESPRESSO and Perturbo input files used to generate the underlying electron–phonon integrals.
.
├── figures/
│ ├── reproduce_plots.ipynb Single notebook that reproduces every figure
│ ├── band_plot_data.h5 Bloch-projected polaron band, observables, DiagMC reference
│ ├── band_and_r2_subset.h5 Band convergence with N_k and per-window R² metric
│ ├── frohlich_coupling_scan.h5 D2 / dD2 / DiagMC vs Fröhlich α benchmark
│ ├── phonons_data.h5 Phonon-number distributions for each material
│ ├── wavefunction_data.h5 Wannier/phonon weights along k-path (wavefunction figure)
│ ├── svd_errors/ SVD truncation error and binding-energy series per material
│ │ ├── lif_e.h5
│ │ ├── lif_h.h5
│ │ ├── anatase.h5
│ │ └── rutile.h5
│ └── *.pdf Pre-rendered figures from the manuscript
└── qe_perturbo/ Quantum ESPRESSO + Perturbo input files
├── lif_e/ LiF, electron polaron
├── lif_h/ LiF, hole polaron
└── anatase/ TiO₂ anatase
Each material directory under qe_perturbo/ contains the inputs for the full pipeline (scf/, nscf/, wann/, phonon/, qe2pert/) together with the pseudopotentials in pseudo/.
cd figures
jupyter notebook reproduce_plots.ipynbRun the cells in order. The notebook reads only the bundled HDF5 files and writes the manuscript PDFs (paper_all_four.pdf, r2_error.pdf, band_and_r2_subset_replot.pdf, phonons.pdf, wavefunction.pdf) into the same directory.
numpy
scipy
matplotlib
h5py
pandas
Tested with Python 3.10 and 3.12.
- Rutile QE/Perturbo inputs are intentionally not included. The rutile electron–phonon integrals used here were taken directly from the intermediate HDF5 file produced for the rutile calculations in Lafuente-Bartolome et al., Nature Physics (cited as Ref. [15] in the manuscript). Readers wishing to reproduce the rutile pipeline from scratch should consult the data release accompanying that publication.
A Zenodo DOI will be added here on acceptance.
Released under the Apache License 2.0. See LICENSE.
Questions: Moritz Baumgarten — mbaumgarten@g.harvard.edu.