Repository map

Primary solver and optimizers

FileRole
vector3d_optimizer.pyYee Maxwell operator, PML, topology parameterization, periodic-lead surface Green functions, fixed-frequency LDOS gradient, profiles, memory estimator, and boundary checks.
shifted_optimizer.pyReal-axis local pole continuation driver and implicit pole-Q or shifted-LDOS optimization.
loewner_optimizer.pyDifferentiable scalar Loewner pole-Q surrogate with AAA/linewidth acceptance.
overlap_optimizer.pySeven-probe, wide/local, overlapping-mode trust-region optimizer.
atom_ldos_optimizer.pyCentered atom-projected LDOS/Purcell optimizer with homogeneous normalization, shifted real-axis Loewner proposals, parallel provisional gradients, constrained MMA/adaptive trust, and fail-closed fixed-atom/shifted/Q/shared-pole acceptance.
accelerated_cooperativity.pyShifted-cooperativity and detuning chain rules, conservative separable moving-asymptote dual, and adaptive trust-radius policy.
refine_checkpoint.pyControlled topology transfer between grids by fitting the projected density.
prepare_symmetry_checkpoint.pyTopology-only transfer into the reflection-closed exact y/z parity backend; deliberately carries no pole or Q.

Spectral acquisition and validation

FileRole
frequency_search.pySparse broad real-frequency resonance search.
pole_validation.pyLocal real-axis nonlinear-pole continuation and Fano-linewidth validation.
rational_pole_validation.pyScalar AAA rational continuation with held-out frequencies.
multiprobe_sweep.pyRestartable real-frequency sweep of seven linear field observables.
multipole_validation.pyShared-pole variable-projection fits and SIMO Loewner checks for overlapping modes.
local_upper_validation.pyDense local upper-mode model-family diagnostics.
combined_rational_validation.pyAuthoritative merged wide/local, seven-probe, four-holdout spectral gate.

PML and field diagnostics

FileRole
pml_convergence.pyLocal-continuation transverse-PML sweep.
rational_pml_convergence.pyScalar rational transverse-PML sweep.
multipole_pml_convergence.pyShared-pole PML gate; use --validator combined for the current mode cluster.
field_diagnostics.pyDriven-field localization and air-strip/inner-defect energy proxies.

Tests

Every test_*.py file is part of the regression suite. test_vector3d.py covers the discrete Maxwell/boundary core; the remaining tests cover spectral fits, gradients, checkpoint transfer, PML aggregation, and optimizer logic.

Run all tests with:

python -m unittest discover -v

requirements.txt gives supported minimum direct dependencies; requirements-tested.txt records the exact direct versions used for this handoff's 30-test run.

Documentation

FilePurpose
START_HERE.mdEntry point and immediate goal.
AGENTS.mdNon-negotiable operating and evidence rules.
DERIVATIONS.mdFull mathematical derivation and approximation ledger.
SCIENTIFIC_STATUS.mdAccepted evidence, missing gates, and claim boundaries.
WORKSTATION96_RUNBOOK.mdExact 96 GB commands and stop conditions.
CODEX_SETUP.mdInstall/login/model/permission guidance for command-line Codex.
REFERENCES.mdFoundational papers/software and their role in the architecture.
README.mdArchitecture, historical results, and command overview.
MILESTONE4_REPORT.md ... MILESTONE7_REPORT.mdDevelopment history and results.
ENVIRONMENT_MEMORY.mdMeasured/estimated resource history and an important eliminated dense-self-energy failure.
ATOM_COUPLING_OBJECTIVE.mdContinuous atom-LDOS definition, discrete normalization, gradient, acceptance tests, and limitations.
SHIFTED_COOPERATIVITY_ARCHITECTURE.mdExact-lead-compatible shifted objective, gradient, normalization, MMA constraints, and independent acceptance contract.
OPTIMIZATION_ACCELERATION_REPORT.mdAccepted fine-grid shifted-MMA demonstration, PML evidence, adjacent-step performance comparison, and gradient benchmark.
SYMMETRY_ACCELERATION.mdExact y/z electromagnetic parity formulation, equivalence tests, fine-grid speed/memory measurements, current accepted evidence, and x-reduction limitation.
PUBLISH.mdStatic documentation/dashboard publishing instructions for the preconfigured Contabo route.
UNATTENDED_RUNBOOK.mdFail-closed one-command fine-grid cooperativity step, restart behavior, fixed protocol, and terminal dashboard handling.
expand_x_checkpoint.pyGeometry-only x expansion by whole periodic-mirror periods with phase-matched explicit lead initialization.
scripts/qualify_domain_transfer.pyFresh wide/dense-local/confirmatory spectral qualification and controller seed creation after a domain transfer.
scripts/bootstrap_xlong_persistent.pyRestartable transfer -> spectral -> PML bootstrap followed by the unbounded fail-closed controller.
scripts/run_persistent_cooperativity.shProduction entry point for the expanded-x no-step-limit campaign.

Checkpoints and key artifacts

PathMeaning
outputs_bragg_loewner_step4/Final accepted coarse Q=200.33 checkpoint.
outputs_bragg_q200_refined_workstation64/Controlled transverse-refinement checkpoint (20 x 18 x 14).
outputs_refined_multiprobe/41-point wide seven-probe controlled-grid sweep.
outputs_refined_multiprobe_mode_b/29-point dense local seven-probe controlled-grid sweep.
outputs_refined_combined_rational_validation/Authoritative controlled-grid Q=921.65 spectral result.
outputs_refined_field_diagnostics/Controlled-grid field-localization evidence.
outputs_refined_fine_workstation64_checkpoint/Geometry transferred to 40 x 26 x 22; starting point for the 96 GB run.
outputs_refined_fine_yz_symmetry_checkpoint/Topology-identical transfer into the exact y/z backend; no spectral state carried.
outputs_fine_yz_symmetry_multiprobe_wide/Fresh 41-point, seven-probe spectrum on the y/z backend.
outputs_fine_yz_symmetry_multiprobe_local_dense113/Fresh 113-point dense local spectrum on the y/z backend.
outputs_fine_yz_symmetry_multiprobe_confirmatory28/Independent 28-point confirmatory spectrum on the y/z backend.
outputs_fine_yz_symmetry_combined_validation_confirm28_order29_32/Retained failed combined validation; this is a candidate, not a spectrally accepted result.
outputs_fine_yz_symmetry_multiprobe_local_dense449/Full 449-point local reacquisition resolving the target's single-sheet interval and adjacent lead branch edges.
outputs_fine_yz_symmetry_multiprobe_confirmatory28_sheetlocal/Separately solved prescribed 28-point sheet-local confirmatory grid.
outputs_fine_yz_symmetry_combined_sheetlocal_dense449_confirm28/Authoritative accepted fine-grid target-pole spectral result.
outputs_fine_yz_symmetry_combined_pml_sheetlocal_v2/Passed seven-case baseline/transverse-PML campaign for the fine input topology.
outputs_atom_cooperativity_yz_step1/First accepted unattended common-ascent atom-LDOS/Q step, fresh spectra, checkpoint, geometry, and field.
outputs_atom_cooperativity_yz_step1_rejected_q_decrease/Retained pure-LDOS trial that passed spectral fitting but was rejected because Q decreased.
outputs_atom_cooperativity_long/step_0001/Second accepted legacy common-ascent step and its checkpoint-bound spectral/PML evidence.
outputs_shifted_mma_demo/step_0001/First fully accepted shifted constrained-MMA step, promotion, seven-case PML gate, timing, and A/B benchmark artifacts.
outputs_atom_cooperativity_xlong_persistent/Expanded 64 x 26 x 22 topology-only transfer, fresh bootstrap evidence, and persistent campaign checkpoints. Its transfer subdirectory carries no pole or Q.

Other output directories are retained because they document intermediate milestones or rejected model/PML behavior. Do not delete them before the fine-grid campaign is safely archived elsewhere.

Checkpoint schema

The exact keys vary by stage, but a normal output directory contains:

  • run_data.npz: raw design variables, density/field data, and tracking state;
  • config.json: the complete Maxwell/grid configuration;
  • metrics.json or checks.json: machine-readable conclusions;
  • history.csv: optimization or continuation history when applicable;
  • a Markdown report; and
  • one or more PNG diagnostics.

Keep run_data.npz and config.json together. A raw design vector is not meaningful without its topology mask, filter, projection, grid, and mirror phase.