The XATU ecosystem is a collection of computational tools for studying excitons and their linear and nonlinear optical responses from atomistic electronic-structure models.
Its central component is XATU (eXcitons from ATomistic calcUlations), a program and C++ library designed to solve the Bethe–Salpeter equation (BSE) in condensed-matter systems. XATU starts from tight-binding or density-functional-theory Hamiltonians expressed in a localized-orbital basis, constructs the electron–hole Hamiltonian, and diagonalizes it to obtain exciton energies and wavefunctions.
The theory behind the code plus details about the implementation and some usage examples can be found in our paper Efficient computation of optical excitations in two-dimensional materials with the Xatu code. If you find our paper or the code useful, please consider citing us.
The resulting excitonic states can be analyzed directly in XATU or passed to OpticX, the postprocessing component of the ecosystem, to calculate linear and nonlinear optical responses, including shift current and second-harmonic generation. Additional interfaces and many-body capabilities are under development.
The workflow begins with a single-particle Hamiltonian. XATU currently supports electronic structures produced by:
- Slater–Koster models, provided through a
.modelfile containing the Hamiltonian and orbital positions; - CRYSTAL, provided through an
.outpfile containing the Hamiltonian and overlap matrices; - Wannier90, provided through a
_tb.datfile containing the Hamiltonian, overlap information, and position matrix elements.
These files, together with an exciton.config input file, are passed to XATU.
XATU solves an effective BSE and produces the excitonic spectrum and eigenstates. It can also calculate linear optical conductivity directly. Its main reusable outputs include:
.eigval: exciton energies;.states: exciton eigenstates;_tb.dat: electronic-structure information used in subsequent calculations;- optical-conductivity and exciton-analysis files.
The _tb.dat file can also be sent directly to OpticX for independent-particle calculations. Alternatively, the excitonic states computed by XATU can be supplied to OpticX so that electron–hole interactions are included in the optical response.
OpticX is the optical postprocessing component of the ecosystem. It evaluates linear and nonlinear optical responses, including shift current and second-harmonic generation, either at the independent-particle level or using excitonic states generated by XATU.
A first-principles BSE interface, XATU.GTF, is under development. It will connect ab initio Hamiltonian and overlap matrices to the same excitonic and optical postprocessing workflow.
In compact form, the current workflow is:
Slater–Koster / CRYSTAL / Wannier90
|
v
XATU
effective Bethe–Salpeter equation
|
exciton energies and states
|
v
OpticX
linear and nonlinear optics
OpticX may also be used directly with a _tb.dat file for independent-particle calculations.
XATU constructs and solves the Bethe–Salpeter equation starting from an electronic band structure obtained from a tight-binding model or a DFT calculation using localized orbitals.
Its diagonalization yields the exciton spectrum and eigenstates, which can then be postprocessed to study quantities such as:
- exciton binding energies;
- momentum-space and real-space exciton wavefunctions;
- exciton localization;
- oscillator strengths;
- spin projections;
- linear optical conductivity and absorption.
The theory behind XATU, implementation details, and representative applications are presented in:
A. J. Uría-Álvarez, J. J. Esteve-Paredes, M. A. García-Blázquez, and J. J. Palacios,
“Efficient computation of optical excitations in two-dimensional materials with the Xatu code,”
Computer Physics Communications 295, 109001 (2024).
https://doi.org/10.1016/j.cpc.2023.109001
OpticX postprocesses tight-binding Hamiltonians and excitonic states to calculate optical response functions.
It can operate in two complementary modes:
-
Independent-particle approximation
OpticX reads the electronic Hamiltonian directly from a
_tb.datfile and evaluates the optical response without electron–hole interactions. -
Excitonic calculations
OpticX reads exciton energies and eigenstates generated by XATU and includes the effects of electron–hole interactions in the optical response.
The available nonlinear responses include shift current and second-harmonic generation, with further optical-response capabilities planned for future releases.
Usage of OpticX requires citing:
J. J. Esteve-Paredes, M. A. García-Blázquez, A. J. Uría-Álvarez,
M. Camarasa-Gómez, and J. J. Palacios,
“Excitons in nonlinear optical responses: shift current in MoS₂ and GeS monolayers,”
npj Computational Materials 11, 13 (2025).
https://doi.org/10.1038/s41524-024-01504-2
The complete XATU documentation is available online:
https://xatu-documentation.readthedocs.io/en/latest/index.html
It includes:
- installation instructions;
- input-file descriptions;
- command-line usage;
- exciton-energy and eigenstate output formats;
- momentum-space and real-space wavefunctions;
- oscillator strengths and spin projections;
- optical-conductivity outputs;
- screening models;
- the implementation of the Bethe–Salpeter equation;
- the developer and library API.
XATU is built upon the Armadillo C++ linear-algebra library and the standard BLAS, LAPACK, and ARPACK libraries.
Install the required dependencies:
sudo apt-get install libopenblas-dev liblapack-dev libarpack2-dev libarmadillo-devBuild the XATU static library:
make buildThen build the XATU executable:
make xatuScripts using functions from the XATU library can be placed in the main directory and compiled with:
make <script>The dependencies can be installed using Homebrew:
brew install gcc openblas lapack arpack armadilloIt is recommended to use Homebrew's GCC compiler rather than Clang. The compiler and library locations can then be specified in the Makefile:
CC = g++-13
INCLUDE = -I$(PWD)/include -I/opt/homebrew/include -I/opt/homebrew/opt/openblas/include
LIBS = -DARMA_DONT_USE_WRAPPER -L$(PWD) -L/opt/homebrew/lib -L/opt/homebrew/opt/openblas/lib -lxatu -larmadillo -lopenblas -llapack -fopenmp -lgfortran -larpackWhen the required libraries are unavailable through the system package manager, they may be downloaded and compiled manually.
For example, Armadillo can be installed with:
git clone https://gitlab.com/conradsnicta/armadillo-code.git
cd armadillo-code
cmake .
make
sudo make installThe corresponding include and library directories must then be added to the Makefile:
INCLUDE = -I/path/to/armadillo/include -I/path/to/OpenBLAS/include
LIBS = -L/path/to/OpenBLAS/libThe C++ library documentation can also be generated locally using Doxygen.
Install Doxygen and run the following command from the repository root:
doxygen docs/docs.cfgThe generated documentation can then be opened from:
docs/html/index.html
When using XATU, please cite:
@article{UriaAlvarez2024Xatu,
title = {Efficient computation of optical excitations in two-dimensional materials with the Xatu code},
author = {Uría-Álvarez, A. J. and Esteve-Paredes, J. J. and García-Blázquez, M. A. and Palacios, J. J.},
journal = {Computer Physics Communications},
volume = {295},
pages = {109001},
year = {2024},
doi = {10.1016/j.cpc.2023.109001}
}When using OpticX or the nonlinear optical-response implementation, please also cite:
@article{EsteveParedes2025NonlinearExcitons,
title = {Excitons in nonlinear optical responses: shift current in MoS2 and GeS monolayers},
author = {Esteve-Paredes, J. J. and García-Blázquez, M. A. and Uría-Álvarez, A. J. and Camarasa-Gómez, M. and Palacios, J. J.},
journal = {npj Computational Materials},
volume = {11},
pages = {13},
year = {2025},
doi = {10.1038/s41524-024-01504-2}
}XATU is distributed under the terms of the GNU General Public License v3.0.
Contributions, bug reports, feature requests, and improvements to the documentation are welcome. Please use the issue tracker of the corresponding repository to report problems or discuss proposed changes.