Conventions
Code design and conventions
From a user's perspective the code provides 2 high-level functions to perform calculations of:
- Fixed orientation far-field cross-sections (extinction, absorption and scattering), for multiple wavelengths and incidence directions
- Orientation-averaged cross-sections (extinction, absorption and scattering) and associated circular dichroism spectra, using numerical cubature over the full solid angle
The high-level functions require at least 2 inputs:
- A
Clusterobject, describing the geometry of the particle cluster - A
Materialobject, describing the wavelength-dependent optical properties of the various media
Geometry description
Cluster is a structure comprising 4 fields,
positions, a vector of N particle positions stored as 3-vectors storing cartesian coordinates x,y,zorientations, a vector of N particle orientations stored as quaternions (4 components, $\cos\phi/2; \sin\phi/2 \mathbf{v}$ with $\mathbf{v}$ the rotation axis). The quaternions are automatically converted into rotation matrices with theRotations.jlpackage.material, a string referencing the material for each particle; the corresponding dielectric functions are stored as a dictionary in theMaterialobjecttype, a string indicating whether the polarisability corresponds to apointdipole, or to aparticle. For the former, a local-field correction needs to be applied to convert the polarisability into an effective one responding to macroscopic fields.
Material description
The Material structure contains two fields:
wavelengths, array-like wavelengths to use in the calculationsmedia, a dictionary containing:- the different dielectric functions, such as
"Au" => epsAu - the refractive index of the embedding medium, stored under the name
"medium" => (x -> 1.33) - for point dipoles, a wavelength-dependent polarisability function
"alpha" => alpha_dye
- the different dielectric functions, such as