Skip to main content

slakonet

Project description

SlakoNet

Accurate and efficient prediction of electronic band structures is essential for designing materials with targeted properties. However, existing machine learning models often lack universality and struggle to predict detailed electronic structures, while traditional tight-binding models based on the Slater-Koster (SK) formalism suffer from (i) limited transferability, (ii) the need for manual parameterization, and (iii) training on low-fidelity electronic structure data. To address these challenges, I introduce SlaKoNet, a parameter optimization framework that learns SK-based Hamiltonian matrix elements across 65 elements of the periodic table using automatic differentiation. SlaKoNet is trained on density functional theory data from the JARVIS-DFT database using the Tran-Blaha modified Becke-Johnson (TBmBJ), encompassing over 20000 materials. The framework achieves a mean absolute error (MAE) of 0.74 eV for bandgap predictions against experimental data, representing a reasonable improvement over standard GGA functionals (MAE = 1.14 eV) while preserving the computational advantages and physical interpretability of tight-binding methods. SlaKoNet demonstrates promising scalability with up to 8.4× speedup on GPUs, enabling rapid electronic structure screening for materials discovery.

SlakoNet schematic

Key Features

  • Universal parameterization: Works across 65 elements and their combinations
  • Physics-informed: Based on Slater-Koster tight-binding formalism
  • High accuracy: Mean absolute error of 0.74 eV for band gaps vs experimental values
  • Scalable: GPU-accelerated calculations for systems up to 2000 atoms
  • Comprehensive properties: Predicts band structures, DOS, band gaps, and orbital projections

Installation

Install via pip:

pip install slakonet

Or create a conda environment and install SlaKoNet in editable mode. To do so, first, install miniforge https://github.com/conda-forge/miniforge. For example:

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"

Based on your system requirements, you'll get a file something like 'Miniforge3-XYZ'.

bash Miniforge3-$(uname)-$(uname -m).sh

Now, make a conda environment:

conda create --name slakonet python=3.10 -y
conda activate slakonet
git clone https://github.com/atomgptlab/slakonet.git
cd slakonet
pip install uv; uv pip install -e .

Quick Start

Google Colab example

Open in Colab

Example of Training Models

python slakonet/train_slakonet.py --config_name slakonet/examples/config_example.json

Example of Inference

python slakonet/predict_slakonet.py  --file_path slakonet/examples/POSCAR-JVASP-107.vasp 

SlakoNet output

Using Pretrained Models in Python

from slakonet.optim import (
    MultiElementSkfParameterOptimizer,
    get_atoms,
    kpts_to_klines,
    default_model,
)
import torch
from slakonet.atoms import Geometry
from slakonet.main import generate_shell_dict_upto_Z65

model = default_model()

# Get structure (example with JARVIS ID)
atoms, opt_gap, mbj_gap = get_atoms("JVASP-107")  
geometry = Geometry.from_ase_atoms([atoms.ase_converter()])
shell_dict = generate_shell_dict_upto_Z65()

# Compute electronic properties
with torch.no_grad():
    properties, success = model.compute_multi_element_properties(
        geometry=geometry,
        shell_dict=shell_dict,
        get_fermi=True,
        device="cuda"
    )

# Access results
print(f"Band gap: {properties['band_gap_eV']:.3f} eV")
print(f"Fermi energy: {properties['fermi_energy_eV']:.3f} eV")

# Plot band structure and DOS
eigenvalues = properties["eigenvalues"]
dos_values = properties['dos_values_tensor']
dos_energies = properties['dos_energy_grid_tensor']

ASE Calculator

SlaKoNetCalculator exposes SlaKoNet through the standard ASE Calculator API. The trained model is loaded once and injected into the calculator, then reused for every structure and every call (no per-call reload). Energy, forces and stress use the usual ASE methods; band structure and DOS are dedicated methods.

from ase.build import bulk
from slakonet.optim import default_model
from slakonet.ase_calc import SlaKoNetCalculator

# load the trained model ONCE
model = default_model().float()

calc = SlaKoNetCalculator(model, kpoints=(3, 3, 3))

si = bulk("Si", "diamond", a=5.43)
si.calc = calc
si.get_potential_energy()        # eV
si.get_forces()                  # eV/Ang, shape (N, 3)
si.get_stress()                  # eV/Ang^3, Voigt(6)

# band structure (-> PNG) and total DOS, same loaded model
bs = calc.band_structure(si, path="GXWKGL", npoints=20,
                         savefig="si_bands.png")
e, dos = calc.dos(si)
print(calc.get_bandgap(), calc.get_fermi_level())

# reuse on another structure with NO model reload
ge = bulk("Ge", "diamond", a=5.66); ge.calc = calc
ge.get_potential_energy()

Toggles (constructor keywords): compute_forces, compute_stress, use_scc, include_dos, kpoints, cutoff, kT, alpha, beta, device. Setting compute_forces=False gives a fast energy-only path for high-throughput screening.

Notes: forces are scaled by beta (default 0.1); pass beta=1.0 for physically correct forces. Stress is converted to ASE units (eV/Ang^3, Voigt) but should be validated against a numerical-strain reference before use in cell relaxation. A full runnable demo is in slakonet/examples/slakonet_calculator_example.py. See also the ASE docs page Calculators -> SlaKoNet.

Supported Materials

  • Elements: Z = 1-65
  • Material classes: Oxides, carbides, nitrides, chalcogenides, halides, intermetallics
  • Crystal structures: All major structure types

Performance Benchmarks

  • Accuracy: 0.76 eV MAE for band gaps (vs 0.38 eV for reference TB-mBJ DFT)
  • Speed: <10 seconds for 1000-atom systems on GPU
  • Scalability: Efficient with GPU acceleration
  • Coverage: Validated on 50 semiconductor/insulator compounds for experiments

SlakoNet timing

Output Properties

SlakoNet predicts comprehensive electronic properties including:

  • Electronic band structures along high-symmetry k-paths
  • Total and projected density of states (DOS)
  • Band gaps (direct/indirect) and band edges
  • Fermi energy and electronic structure topology
  • Atom-projected and orbital-projected DOS (s/p/d contributions)

Applications

  • High-throughput materials screening
  • Electronic structure prediction without expensive DFT
  • Band structure and DOS calculations for device design
  • Semiconductor and quantum materials discovery
  • Educational tools for solid-state physics

Dataset

Methodology

SlakoNet employs a neural network to learn distance-dependent Slater-Koster parameters:

  • Basis set: sp³d tight-binding orbitals
  • Training data: JARVIS-DFT with TB-mBJ functional
  • Loss function: Combined DOS + band gap optimization
  • Framework: PyTorch with GPU acceleration
  • Cutoff radius: 7 Å for orbital interactions

Limitations

  • Limited to elements Z ≤ 65
  • Trained on specific meta-GGA DFT (TBmBJ)
  • Discrepancies in conduction band descriptions
  • No self-consistent cycle
  • No spin-orbit coupling or magnetic properties

Citation

If you use SlakoNet in your research, please cite:

@article{choudhary2025slakonet,
  title={SlaKoNet: A Unified Slater-Koster Tight-Binding Framework Using Neural Network Infrastructure for the Periodic Table},
  author={Choudhary, Kamal},
  journal={ChemRxiv},
  doi={https://doi.org/10.26434/chemrxiv-2025-4vjr9-v2},
  year={2025}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slakonet-5.20.2026.tar.gz (210.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slakonet-5.20.2026-py2.py3-none-any.whl (220.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file slakonet-5.20.2026.tar.gz.

File metadata

  • Download URL: slakonet-5.20.2026.tar.gz
  • Upload date:
  • Size: 210.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for slakonet-5.20.2026.tar.gz
Algorithm Hash digest
SHA256 731db5b14c424d50103fb07063013eead643dcda716b2164da9ee10c9f39904f
MD5 f74a6333f687de3f9ccb860d5e629499
BLAKE2b-256 e47cb088801d0b83793af36b6318fe20d9d66dd261af24d433fc83d3dd7b1cbf

See more details on using hashes here.

File details

Details for the file slakonet-5.20.2026-py2.py3-none-any.whl.

File metadata

  • Download URL: slakonet-5.20.2026-py2.py3-none-any.whl
  • Upload date:
  • Size: 220.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for slakonet-5.20.2026-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e89f047c9b136a624782e20020d309c56c77f8e7a6b6c6ff0704838dd3fff9fe
MD5 e2d2848276e95862af1662a040ee083d
BLAKE2b-256 3b01416ed750544cd9d9d474b6777e73d73941a29ec4359a78118dbdff3c17fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page