Project Structure
Top-Level Layout
c++/: core solver, runtime orchestration, diagonalization wrappers, operator recalculation, stores, output handling, and symmetry abstractiontools/: standalone preprocessing and postprocessing executables such asadapt,nrgchain,broaden,hilb,resample, andunitarynrginit/: Mathematica-side initialization code used to generate the initialdatafile and related model artifactstest/: unit tests, regression tests, tool tests, and Mathematica-driven integration suitesshare/: installed package metadata and auxiliary CMake modules used by the build and downstream consumersscripts/: helper scripts for inspecting or aggregating output filesdoc/: legacy Sphinx documentation treedocs/: new MkDocs documentation treetemplates/: model and workflow templates used by higher-level generation or testsfloquet/: repository-local example and experiment directories for Floquet-related workflows
Core Native Code In c++/
The c++/ directory is the heart of the runtime. The most important entry and coordination files are:
nrg.cc: executable entry pointnrg-general.hpp: high-level orchestration throughNRG_calculationcore.hpp: main iteration logic and postprocessing helpersread-input.hpp: parses the generateddatafile into in-memory structuresparams.hpp: runtime parameter model and parsing ofparamsymmetry.hpp: abstract symmetry interfacemk_sym.hpp: symmetry backend selectiondiag.hpp: LAPACK wrappers and eigensolver selectioneigen.hpp: eigenspectrum storage and serializationoperators.hpp: operator matrix containerssubspaces.hpp: subspace layout and task generationstore.hpp: thermodynamic and backward-sweep storage
If you are trying to orient yourself quickly, the most useful reading order is:
nrg.ccnrg-general.hppread-input.hppcore.hppeigen.hpp,operators.hpp,store.hpp,subspaces.hppsymmetry.hppandmk_sym.hpp
Concrete symmetry backends are compiled from many sym-*.cc files and corresponding headers.
See also:
Standalone Tools In tools/
Each tool is built as its own executable and linked against the project's common utility code and core numerical dependencies. The tool set covers several categories:
- discretization and chain generation:
adapt,nrgchain - matrix and numerical transforms:
diag,hilb,kk,unitary - spectral postprocessing:
broaden,bw,resample,specmoments - averages and integration helpers:
binavg,intavg,integ,tdavg,mats - file and format utilities:
h5write,matrix
Test Layout In test/
The test tree is organized by style rather than by component:
test/unit/: focused C++ unit tests for core data structures and utilitiestest/c++/: main regression runs for the C++ executabletest/c++sym_basic/,test/c++sym_more/,test/c++sym_all/: regression suites across increasing symmetry coveragetest/tools/: standalone tool teststest/nrginit*,test/models*,test/templates/: Mathematica-dependent end-to-end workflowstest/complex/,test/test_long/: specialized or long-running suites
Documentation During Migration
For now there are two documentation trees:
doc/is the existing Sphinx contentdocs/is the new MkDocs content
The intent is to move contributor-oriented documentation into docs/ first, while keeping the existing material available during the transition.