Agentic non-linear optics: SHG and photocurrents vs experiment#
PAOFLOW.agentic.nlo compares the second-order responses of
nonlinear_optics (shift and injection currents, SHG) with
experiments and published calculations. The data toolkit is the one of
thermo-optics. The agent playbook, lessons learned, prompts
and templates live in agentic/nlo/.
Modules#
module |
role |
|---|---|
|
|
|
|
Design choices#
The symmetry audit is the error bar. A DFT-derived PAO Hamiltonian is symmetric only to about a meV; the second-order responses amplify this into percent-level leakage into forbidden components and spread between equivalent ones. The adapter quantifies both from the computed tensor and the crystal class, and the playbook quotes them with every comparison.
Conventions are data. Experimental coefficients are stored with their convention (d or χ, component, photon energy, reference crystal, 3D or sheet with a thickness); the conversions are explicit methods, never implicit.
Point groups from generators, not from tables of allowed components: any axis convention can be added by listing its generators, and the forbidden components and relations follow.
Tests#
tests/unit/agentic/nlo/: group closure (T_d 24, D3h 12, mm2 4 operations), forbidden components
and relations of T_d, 3m and mm2, symmetrisation and the Kleinman error, the adapter on a synthetic
output (spectra, tensors, static values, peaks, onsets, symmetry and Kleinman checks, unit
conversions, 2D sheet units, spin-channel files ignored).
Since October 28 2026 the point-group code lives in src/PAOFLOW/utils/point_groups.py (also used by the engine’s k-grid reduction); PAOFLOW.agentic.nlo.symmetry re-exports it.