- Jupyter Notebook 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| Cr_migration.ipynb | ||
| Cross_sections.ipynb | ||
| CrSBr.cif | ||
| custom_cold_colormap.npy | ||
| Dose_rate_profile.ipynb | ||
| Probe_propagation.ipynb | ||
| README.md | ||
Mesoscale Atomic Engineering in a Crystal Lattice
Authors
Julian Klein — jpklein@mit.edu
Mads Alexander Weile — weile.a.mads@gmail.com
Accompanying notebooks and scripts for the paper:
J. Klein, K. M. Roccapriore, M. Weile et al.,
Mesoscale Atomic Engineering in a Crystal Lattice
Journal, Issue X, Pages X–X (Year)
Overview
This repository contains Jupyter notebooks and analysis scripts accompanying our Nature paper on mesoscale atomic engineering using a focused electron beam in scanning transmission electron microscopy (STEM).
In this work, we demonstrate that ultra-precise electron beam control enables three-dimensional manipulation of Cr atoms within a crystalline lattice. By exploiting electron beam channeling, we selectively steer chromium atoms from lattice layers into interstitial sites within the crystal volume.
A central insight of the paper is that when the beam is positioned precisely on an atomic column, electron channeling keeps the beam intensity confined within that column, enabling controlled atomic rearrangements deep within a multilayer crystal.
The materials in this repository provide simulations and calculations that support:
- Electron dose distribution
- Beam propagation and channeling in multilayer CrSBr
- STEM HAADF image simulations for displaced Cr atoms
- Extraction of effective electron-atom cross sections from experimental rates
Repository Structure
Dose_rate_profile.ipynb
This notebook calculates and visualizes the 1D electron dose profile of the focused probe.
It provides:
- Spatial distribution of electron dose for a given electron beam motion
- Context for understanding how energy is injected into the material
Probe_propagation.ipynb
This notebook simulates electron beam propagation through multilayer CrSBr.
It demonstrates:
- Focused electron probe evolution inside a thick crystal
- Electron channeling along atomic columns
- Beam confinement when positioned precisely on a column
These simulations are critical for explaining how the beam remains localized in depth, enabling atomic manipulation in a 3D crystal volume, not just at the surface. It uses the weights of the 1D electron beam dose profile.
Cr_migration.ipynb
This notebook simulates HAADF-STEM images for a 16-layer thick CrSBr crystal with varying numbers of displaced Cr atoms.
It calculates:
- Column intensity changes as Cr atoms are displaced either from the top or the bottom
- How atom column contrast evolves with the number of displaced Cr atoms
This analysis connects structural rearrangement to experimental Z-contrast in HAADF-STEM.
Cross_sections.py
This script computes the effective electron flux experienced by atomic columns during sinusoidal beam motion and calculates effective cross sections from experimentally fitted transition rates obtained at 200keV.
It implements:
-
A sinusoidally oscillating Gaussian probe model (±b motion)
-
Evaluation of peak or time-averaged flux on selected atomic columns
-
Conversion from flux density to effective cross sections via
σ₀→₂ = Γ₀₂ / Φ₀
σ₂→₀ = Γ₂₀ / Φ₂
The script reproduces the cross-section values reported in the manuscript and clarifies the relationship between measured transition rates, electron flux density, and the extracted effective cross sections. Per-atom cross sections are obtained by dividing the ensemble values by 16 Cr atoms considering 16 layers of CrSBr.
Requirements
The notebooks and scripts were developed in Python using standard scientific libraries, including:
- NumPy
- SciPy
- Matplotlib
- abTEM
Please refer to individual notebooks or scripts for specific package requirements.
Citation
If you use this code or build upon this work, please cite:
J. Klein, K. M. Roccapriore, M. Weile et al.,
Mesoscale Atomic Engineering in a Crystal Lattice
Journal, Issue X, Pages X–X, (2026)