This repository is a lightweight inference branch for the paper [[ICLR 2026] NextHAM: Advancing Universal Deep Learning for Electronic-Structure Hamiltonian Prediction of Materials].
Unlike the main branch (which includes full training, testing, and ground-truth accuracy comparisons), this branch focuses strictly on the inference pipeline. It is heavily simplified, runs much faster, and is specifically designed for predicting the Hamiltonian of new material structures.
The Python dependencies are identical to the main repository. Please refer to the NextHAM Main Branch for detailed Conda/Pip installation instructions.
Before running the pipeline, you need to generate the zeroth-step Hamiltonian using the get_hs code.
- Source Code: abacus-develop/largescale
- Compile and run this code on your target material samples. In our examples, we use a Silicon (Si) system as a sample. You can download the example folder from here (Extraction code:
bFeV) and place it in theget_hs_res/si/directory.
Script: full_inference_pipeline_python.sh
sh full_inference_pipeline_python.shWhat this script does:
- Runs
pre_process.pyto parse ABACUS outputs and generate the.pthgraph entirely in Python. - Combines the data and runs inference (
infer.sh). - Post-processes the predicted tensors and plots the band structure using
post_process.py.
If you are evaluating your own structures, open either .sh script and modify the variables at the top:
# Modify these paths to point to your specific structure directories
TARGET_DIR="${BASE_DIR}/get_hs_res/YOUR_MATERIAL_DIR"
# Modify the Fermi energy for your specific system (crucial for accurate band plotting)
FERMI_ENERGY="6.58"The output plots and final matrices will be saved in the res_si_split/plots/ (or your defined --save-path) directory.
For full training pipelines, evaluation, and accuracy comparisons against ground truth, please visit the NextHAM Main Repository.