Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 3.14 KB

inputs.md

File metadata and controls

59 lines (41 loc) · 3.14 KB
title numbering label
Simulation Inputs
enumerator
1.%s
sim_inputs_page

(specimen-models)=

Specimen models

This chapter introduces the Atomic Simulation Environment (ASE) for creating specimen models for use in TEM image simulation.

ASE is a set of tools and Python modules for setting up, manipulating and visualizing atomic structures, which is used in conjunction with a large number of atomistic simulation codes, for example GPAW for running DFT simulations. In this notebook, ASE is introduced in the context of running electron microscopy image simulations with abTEM.

The Atoms object

The Atoms object defines a collection of atoms. To define Atoms from scratch, we need to specify at least three things:

  • atomic positions,
  • atomic numbers (or chemical symbols),
  • a periodic cell.

For example, to create a basic model of the N2 molecule, we could define:

atoms = ase.Atoms("N2", positions=[(0.0, 0.0, 0.0), (1.0, 0.0, 0.0)], cell=[6, 6, 6])

All these attributes of the Atoms object are stored in underlying NumPy arrays, which can be directly modified if desired. Convenient arithmetic operations also directly work for the Atoms object, so structures can be easily combined to create more complex specimens.

Importing structures from files

ASE can import all common atomic-structure formats (full list here). Below we import a .cif-file defining a unit cell of strontium titanate (SrTiO3) that we provide with this text and will use in further examples.

srtio3 = ase.io.read("srtio3.cif")

Manipulating atoms

abTEM always assumes that the imaging electrons propagate along the $z$-axis in the direction from negative to positive coordinate values. Hence, to choose the zone axis, we need to manipulate the atoms so they are properly aligned.

ASE has many tools for manipulating structures, but one particularly useful one is the surface function, which can be used for creating a periodic surface (aligned with the $z$-axis) for a given set of Miller indices.

In the widget below, we have oriented the strontium titanate structure along the (110)-direction, and interactively create supercells out of it, with 2 Å of vacuum added at the top and bottom surfaces.

:name: fig_sto_supercell
:placeholder: ./static/sto_supercell.png
**Interactive widget showing supercell construction for the STO(110) supercell**:

Since the positions and atomic numbers are just NumPy arrays, they can be modified in-place. Below, we create an SrTiO3/LaTiO3 interface by changing the atomic numbers of the Sr atoms with a $y$-coordinate less than $7.5 \ \mathrm{Å}$ in a (3,4,10) supercell oriented along the (110) zone axis. This interface created from a will be later used for STEM image simulations.

sto_lto = repeated_srtio3.copy()
mask = sto_lto.symbols == "Sr"
mask = mask * (sto_lto.positions[:, 1] < 7.5)
sto_lto.numbers[mask] = 57