Running the Pluto examples
The gallery is generated from the same .jl files that you open in Pluto. No Julia installation is needed to read the rendered results on this website. To edit and rerun them, use a local checkout with Julia 1.10 or later.
From the repository root:
julia --project=examples -e 'using Pkg; Pkg.develop(path=pwd()); Pkg.instantiate()'
julia --project=examples -e 'using Pluto; Pluto.run()'Open one of these files in Pluto:
| Example | Notebook source | Focus |
|---|---|---|
| 01 Chiral dimer | 01_dimer.pluto.jl | Coupling and circular dichroism |
| 02 Mirror-image helices | 02_helix.pluto.jl | Handedness and orientation averaging |
| 03 Near-field map | 03_nearfield.pluto.jl | Spatial intensity and particle exclusion |
| 04 Dye molecules | 04_dyes.pluto.jl | Uniaxial molecular point dipoles |
| 05 Core-shell OA spectra | 05coreshelloa.pluto.jl | Sphere-mediated coupling switches in core-shell response |
| 06 Core-shell CDA vs Mie | 06coreshellmie_compare.pluto.jl | Explicit dipole shell versus effective multilayer-Mie model |
| 07 Core-shell convergence sweeps | 07coreshellconvergence.pluto.jl | N_mie / N_esa / N_theta error-runtime trade-offs |
| 08 Planar-interface dimers (prototype) | 08planarinterface_dimer.pluto.jl | 45° incidence, orientation/separation sweeps, and differential absorption above a plane |
| 17 Finite solvers | 17finitesolvers.pluto.jl | Diffractive-array and helix-CD solver studies: direct vs GMRES, preconditioners, disorder, block multi-RHS |
Machine-dependent benchmark notebooks and saved-result performance studies (numbered 09–16 during development) are local research material and are not distributed with the package or included in the static documentation build. Notebook 17 supersedes them using only integrated package APIs.
The explicit Pkg.activate(joinpath(@__DIR__, "..")) cell selects the shared examples environment. This deliberately uses the local development checkout rather than Pluto's automatic per-notebook package manager: it ensures that examples exercise the code being developed, even before it is published. Run the setup command once before opening notebooks; a generated local manifest records resolved versions. Keep the notebooks in their examples directory, or update their activation path if you copy them elsewhere.
The first run may take time to install/precompile plotting packages. Subsequent runs reuse the environment. Edit geometry and material cells to explore the response. Static pages show the default parameter values, not interactive widgets.
Book figure scripts
Finite solver example
Run julia --project=examples examples/finite_solvers.jl for a small oblique direct/GMRES comparison. The rendered finite-solvers notebook shows the diffractive-array and helix-CD studies: direct-vs-iterative crossover, preconditioner behaviour under size and positional disorder, array-size scaling, and orientation-averaged CD with block multi-RHS solves. It calls only integrated package APIs. See Finite-cluster solvers for executable documentation.
Figure-generation scripts ported from the book repository are available under examples/figures/. They are organized by chapter and share common output helpers so generated files land in predictable folders.
See examples/figures/README.md for layout, conventions, and run instructions.
Planar-interface prototype examples
The Phase-10 planar-interface prototype now includes focused dimer workflows:
examples/figures/06_interface/fig_planar_dimer_dabs_sweep.jlFixed incidence at 45°, two polarisations, four dimer orientation cases (head-to-tail/side-by-side × dipole axis parallel/perpendicular to plane), inter-dipole separation sweep, differential absorptionΔσ_abs, and wavelength-dispersive gold substrate responseε_Au(λ).examples/figures/06_interface/fig_planar_dimer_substrate_compare.jlSingle dimer geometry with substrate comparison (matched, dielectric, dispersive gold) for both differential absorption and prototype substrate-loss channel differences.examples/figures/06_interface/fig_planar_dimer_gold_model_compare.jlBefore/after comparison of fixed-index gold (n_Au(600nm)) versus wavelength-dispersive gold (n_Au(λ)) across the same dimer orientation cases.
Both scripts place dipoles close to the plane (z = 0.5 nm) and enable prototype reflected self-interaction to make near-interface reaction effects visible.