Skip to content

Add a tutorial on time-resolved TEM from molecular dynamics - #27

Merged
TomaSusi merged 4 commits into
mainfrom
claude/contributed-docs-review-21e8a2
Sep 18, 2026
Merged

TomaSusi merged 4 commits into
mainfrom
claude/contributed-docs-review-21e8a2

Conversation

@TomaSusi

Copy link
Copy Markdown
Member

Adopts the documentation contributed by @giolajide and @tgmaxson in #4, which shows how the finite exposure time of a TEM image averages over atomic motion. A Cu adatom on Cu(111) is imaged both from a single molecular dynamics snapshot and as an average over a 10 ps trajectory, and the underlying study (Olajide, Maxson & Szilvási, ACS Catal. 15, 18908, 2025) is added to the bibliography and cited.

The page goes under the advanced tutorials, and the frozen phonons walkthrough now links to it — the two are the same ensemble average over atomic configurations, differing only in what the configurations represent.

Changes to the contributed notebook

The physics is unchanged; the adaptations are for reproducibility, runtime, and house style.

  • Reproducibility. EMT (parametrized for Cu) replaces the MACE/EMT fallback and the GPU autodetection, so the notebook runs anywhere. The molecular dynamics, the frozen phonons, and the shot noise are all seeded — two full re-executions agree to within 1.7% of pixels, inside the 3% tolerance used by the notebook tests.
  • Runtime. The trajectory is sampled every 90 fs instead of every 6 fs, giving 112 snapshots instead of 1667. The whole notebook executes in about a minute, with no visible change to the averaged image.
  • One physics fix. The original applied frozen phonons to all atoms, including the two layers held fixed during the MD, which left the substrate blurrier in the static panel than in the time-averaged one. Per-atom sigmas that vanish on the fixed layers make the two panels directly comparable.
  • Figures. abtem.stack(...).show(explode=True, common_color_scale=True) replaces hand-transposed arrays and a magic /2e2 rescaling, the field of view is cropped to the surface (it was ~60% vacuum), and a line profile through the adatom quantifies the effect: a 19% peak in the short exposure becomes a broad 3% ripple after 10 ps.
  • Prose. The "static" case is reframed as the short-exposure limit — long compared to a phonon period, too short for the adatom to move — which is what the frozen-phonon average actually represents. Absolute readthedocs URLs became internal cross-references, the to_zarr/from_zarr step became a tip rather than executed cells writing into the docs tree, and the MD trajectory is kept in memory so nothing is written to disk.

Checks

jb build . succeeds and adds no new warnings; both citations and all cross-references resolve; the notebook widget lint passes.

Closes #4

🤖 Generated with Claude Code

TomaSusi and others added 4 commits September 17, 2026 19:26
Adopts the documentation contributed by Gbolagade Olajide and Tristan
Maxson in #4, which demonstrates how the finite exposure time of
a TEM image averages over atomic motion: a Cu adatom on Cu(111) is imaged
both from a single molecular dynamics snapshot and as an average over a
10 ps trajectory.

Adapted to the conventions of the documentation:

- EMT replaces the MACE/EMT fallback and the GPU autodetection, so the
  notebook runs anywhere and reproduces on re-execution (the molecular
  dynamics, frozen phonons and shot noise are all seeded).
- The trajectory is sampled every 90 fs rather than every 6 fs, bringing
  the full notebook down to about a minute of execution.
- The fixed substrate layers are given a vanishing frozen-phonon
  amplitude, so the substrate is treated the same way in the static and
  the time-averaged simulation.
- Figures use the abTEM plotting interface with a common color scale
  instead of hand-transposed arrays, the field of view is cropped to the
  surface, and a line profile through the adatom quantifies the loss of
  contrast.
- Cross-references point into the walkthrough and tutorials, and the
  underlying study is cited from the bibliography.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Frozen phonons and molecular dynamics averaging are the same ensemble
average over atomic configurations, differing in what the configurations
represent, so point readers of the walkthrough at the tutorial.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…torial

A slice thickness of 1 Å deviates from the 0.2 Å result by 0.76% of the
contrast range, which is invisible here and cuts the multislice time by a
factor of three. Drawing the atoms at half their radius makes the
adatom's hollow site visible in the top view, where full-radius circles
overlapped into a solid sheet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
show_atoms sorts by the depth axis in the propagation direction, so what
was labelled the top view is the view from -z, with the adatom drawn
behind the substrate atom it sits on. Call it the beam view and point at
the conventions appendix for the reason.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TomaSusi
TomaSusi merged commit 9f85d0e into main Sep 18, 2026
1 check passed
@TomaSusi
TomaSusi deleted the claude/contributed-docs-review-21e8a2 branch September 18, 2026 12:45
@TomaSusi
TomaSusi restored the claude/contributed-docs-review-21e8a2 branch September 18, 2026 13:02
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.

Time Resolved TEM

1 participant