A mesocrystal combines a three-dimensional crystal with a finite outer shape. The crystal defines the lattice and its basis particle; the outer shape selects the lattice sites that belong to the mesocrystal.
# Particle at each lattice site
inner_shape = ba.Sphere(3*nm)
basis = ba.Particle(material, inner_shape)
# Three-dimensional lattice
lattice = ba.Lattice3D(
ba.R3(8*nm, 0, 0),
ba.R3(0, 8*nm, 0),
ba.R3(0, 0, 8*nm),
)
# Lattice and basis
crystal = ba.Crystal(basis, lattice)
# Finite mesocrystal
outer_shape = ba.Cylinder(20*nm, 50*nm)
mesocrystal = ba.Mesocrystal(crystal, outer_shape)
The basis can be a simple Particle or a particle
composition such as a
Compound,
CoreAndShell, or another
Mesocrystal.
The Mesocrystal with basis
example uses a Compound as
the basis.
The outer shape must be a closed hard form factor. It selects complete lattice sites and does not clip basis particles at the surface.
By default, BornAgain sums the selected lattice sites exactly. An approximate reciprocal-space algorithm is available for large mesocrystals; see Mesocrystal summation.