A mesocrystal is a crystal-like grain, defined by an internal crystal lattice and an outer shape.
The Mesocrystal object is created via
meso = ba.Mesocrystal(crystal, outer_shape)
and requires the objects crystal and outer_shape to be defined.
outer_shape is a hard form factor describing the shape and size of the
mesocrystal:
outer_shape = ba.Cylinder(20*nm, 50*nm)
crystal is built from the basis particle and a 3D lattice:
# Basis particle
inner_ff = ba.Sphere(3*nm)
basis = ba.Particle(material, inner_ff)
# 3D lattice
lattice = ba.Lattice3D(
ba.R3(8*nm, 0, 0),
ba.R3(0, 8*nm, 0),
ba.R3(0, 0, 8*nm),
)
# Crystal
crystal = ba.Crystal(basis, lattice)
Alternatively, basis can be not just a simple particle, but also another
composition:
basis = ba.Compound()
or
basis = ba.CoreAndShell(core, shell)
or even
basis = ba.Mesocrystal(crystal_node, outer_shape_node)