Skip to content

Correct the structure-factor and coupling formulas of the Bloch-wave tutorial - #49

Merged
TomaSusi merged 1 commit into
devfrom
docs/bloch-formula-fixes
Nov 3, 2026
Merged

TomaSusi merged 1 commit into
devfrom
docs/bloch-formula-fixes

Conversation

@TomaSusi

@TomaSusi TomaSusi commented Nov 3, 2026

Copy link
Copy Markdown
Member

Summary

Four formulas in the Bloch-wave tutorial disagree with what abtem.bloch computes. The structure-matrix formulas were already corrected for the three use_wave_eq forms. This PR fixes the rest, in markdown only, so no cell outputs change.

Formula Tutorial before Code (abtem/bloch/dynamical.py)
Structure factor $\sum_j f_j \exp(-2\pi i,\mathbf{g}\cdot\mathbf{r}_j)$ $\frac{1}{\Omega}\sum_j f_j \exp(+2\pi i,\mathbf{g}\cdot\mathbf{r}_j)$ (calculate_structure_factors)
Potential $\kappa \int F(g)\exp(2\pi i,\mathbf{g}\cdot\mathbf{r}),\mathrm{d}\mathbf{r}$ $\frac{1}{\kappa}\sum_\mathbf{g} F(\mathbf{g})\exp(-2\pi i,\mathbf{g}\cdot\mathbf{r})$ (structure_factor_to_potential)
Debye–Waller factor $\exp(-2\pi^2\sigma^2 g)$ $\exp(-2\pi^2\sigma_j^2 g^2)$ (calculate_scattering_factors)
Coupling $U_g = F_g$ $U_g = \frac{\sigma}{\pi\lambda\kappa} F_g = \frac{2me}{h^2} V_g$ (calculate_structure_matrix)

Here $\Omega$ is the unit-cell volume, $\kappa = 4\pi\epsilon_0 / (2\pi a_0 e)$ (abtem.core.constants.kappa) and $\sigma$ is the interaction parameter (energy2sigma). The PR also fixes two typos in the potential paragraph ("vaccum permitivity").

Checks

  • Built the book locally (jupyter-book build docs, ABTEM_DOCS_VERSION=dev). All 69 equations on the page render in MathJax with no errors, and the four edited ones read as intended.
  • Each formula checked against the abTEM dev source named above.

🤖 Generated with Claude Code

…tutorial

The tutorial's formulas disagreed with abtem.bloch:

- F(g) carries 1/Omega and the crystallographic sign exp(+2 pi i g.r_j),
  as in calculate_structure_factors.
- The potential is V(r) = (1/kappa) sum_g F(g) exp(-2 pi i g.r), a sum
  over reciprocal lattice vectors divided by kappa, as in
  structure_factor_to_potential; it was written as an integral multiplied
  by kappa.
- The Debye-Waller factor is exp(-2 pi^2 sigma_j^2 g^2), not ... g.
- U_g = sigma F_g / (pi lambda kappa) = (2 m e / h^2) V_g, the prefactor
  calculate_structure_matrix applies; the tutorial had U_g = F_g.

Markdown only; no cell outputs change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TomaSusi
TomaSusi merged commit 5418ea6 into dev Nov 3, 2026
1 check passed
@TomaSusi
TomaSusi deleted the docs/bloch-formula-fixes branch November 3, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant