API

BcdiSimulate.atomSimulateElectricFieldMethod
atomSimulateElectricField(x, y, z, hRanges, kRanges, lRanges)

Simulate the electric field for a group of atoms (x, y, and z) on a sequence of grids in reciprocal space (hRanges, kRanges, lRanges). More concretely, calculate

\[F_{hkl} = \sum_j e^{- 2 \pi i (x_j h + y_j k + z_j l)}\]

x, y, and z do not have to lie on any grid and are assumed to be Vector{Real}. 'hRanges', 'kRanges' and 'lRanges' are not individual points, but are Vector{StepRangeLen}, that together, define the grid to sample reciprocal space over. In general, this will be faster than a full discrete Fourier transform (with $O(n^2)$ operations) because it uses an NUFFT.

source
BcdiSimulate.atomSimulateDiffractionMethod
atomSimulateDiffraction(x, y, z, hRanges, kRanges, lRanges, numPhotons; seed=nothing)

Simulate diffraction patterns for a group of atoms (x, y, and z) on a sequence of grids in reciprocal space (hRanges, kRanges, lRanges). More concretely, obtain samples from a Poisson distribution that satisfy

\[I_{hkl} \overset{ind}{\sim} Pois(F_{hkl})\]

where

\[F_{hkl} = \sum_j e^{- 2 \pi i (x_j h + y_j k + z_j l)}\]

x, y, and z do not have to lie on any grid and are assumed to be Vector{Real}. 'hRanges', 'kRanges' and 'lRanges' are not individual points, but are Vector{StepRangeLen}, that together, define the grid to sample reciprocal space over. numPhotons defines the number of photons that will, on average, be simulated, and seed is the rng seed. In general, this will be faster than a full discrete Fourier transform (with $O(n^2)$ operations) because it uses an NUFFT.

source
BcdiSimulate.relaxCrystalMethod
relaxCrystal(x, y, z, lmpOptions, potentialName)

Use LAMMPS to relax the supplied atom positions (x, y, and z). lmpOptions defines command line options to pass to LAMMPS and the potentialName defines the interatomic potential used in the LAMMPS relaxation.

source