Option: mesocrystal computation

Scattering on mesocrystal can be computed in two ways.

  1. The first and the default way is to find all the lattice position inside the mesocrystal shape and coherently sum the scattering from all the unit cells. This gives the exact result, equal to the composition of all these particles. The computation time depends on the number of particles in mesocrystal.

  2. The second way is to wrap form-factor of the mesocrystal outer shape with summation over the reciprocal lattice nodes within a certain reasonable radius. The result is approximate; the artifacts are stronger for small outer shapes. The computation time does not depend on the number of particles in mesocrystal.

simulation.options().setMesoReciprocalSum(True, 2.1)

The default state is False which corresponds to the first approach.

The second argument is the factor determining the summation radius of reciprocal lattice. The computation time grows as cube of this factor.

Reciprocal-space selection rules

What the rule does

SimpleSelectionRule(a, b, c, modulus) keeps reciprocal-lattice indices (h,k,l) satisfying (a*h + b*k + c*l) % modulus == 0, with modulus > 0. It filters terms in the scattering sum; particle positions and material volume remain those of the supplied structure.

When to use it

  • Known symmetry: skip reflections whose basis amplitude already vanishes to save computation time. The same structure can be simulated without it.
  • Compare structures: filter A/B ordering reflections to obtain the mean-SLD pattern in the binary mesocrystal example. This changes the scattering model. An arbitrary filter need not correspond to a mean-SLD structure.

Rules require approximate reciprocal-space summation:

simulation.options().setMesoReciprocalSum(True, 2.1)

Direct real-space summation rejects an explicit rule. With a correctly defined structure, it produces physical interference without one.

Example: body-centred cubic

Build an 8 nm cubic cell with two copies of an existing particle:

basis = ba.Compound()
basis.addComponent(particle, ba.R3(0, 0, 0))
basis.addComponent(particle, ba.R3(4, 4, 4))
lattice = ba.CubicLattice(8)
lattice.setSelectionRule(ba.SimpleSelectionRule(1, 1, 1, 2))
crystal = ba.Crystal(basis, lattice)

Attach the rule before constructing the Crystal, which copies the lattice. This keeps even h+k+l. A physical body-centred cubic cell still needs two identical particles at fractional positions (0,0,0) and (1/2,1/2,1/2). Their amplitudes cancel for odd h+k+l and add for even h+k+l. Using one particle plus the rule gives half the allowed-reflection amplitude and one quarter of the intensity of the two-particle cell.

Limits

  • Index convention: indices refer to the supplied lattice vectors. Conventional-cell conditions do not apply directly to primitive vectors such as those returned by FCCLattice.
  • Expressiveness: one linear modular condition does not cover all reflection conditions; face centring requires multiple conditions.
  • Finite size: suppressing a reflection does not guarantee a dark pixel; other reflections contribute through the finite outer-shape form factor. Direct sums retain whole cells at the boundary; reciprocal sums use the outer-shape envelope. Raising the cutoff does not remove this difference; check peak accuracy against direct summation of an equivalent explicit structure.

Examples