[ICLR 2026] NextHAM: Advancing Universal Deep Learning for Electronic-Structure Hamiltonian Prediction of Materials
This is the official implementation of the paper "Advancing Universal Deep Learning for Electronic-Structure Hamiltonian Prediction of Materials", accepted at ICLR 2026.
Both training and inference were conducted on high-performance hardware:
- GPU: 4x NVIDIA A800 (80GiB VRAM each).
- Note: Due to the high dimensionality of Hamiltonian matrices, a large GPU memory is recommended for optimal performance.
The software dependencies are managed via Conda. All required packages are specified in the ./environment.yml file.
To set up the environment, run:
# Create the environment from the file
conda env create -f environment.yml
# Activate the environment
conda activate nexthamThe Materials-SOC-HAM dataset proposed in this paper is publicly available.
-
Download: You can access the dataset via the link below:
- Link: [Materials-SOC-HAM Dataset] (https://dzefile.hpccube.com:65011/efile/s/w/bmV4dGhhbQ==_c3c50c552df97ace&)
- Extraction Code:
vFWY
-
Configuration: Once the dataset is downloaded and extracted to your local directory, you must update the file roots:
- Locate the following files:
datasets/train.txt,datasets/val.txt, anddatasets/test.txt. - Replace the placeholder
/your_path/in each file with the absolute path to your local dataset directory.
- Locate the following files:
-
Pre-trained Models (Optional)
If you wish to train on new data, we highly recommend fine-tuning from our provided pre-trained models to achieve faster convergence.
- Download Link: [NextHAM Pre-trained Weights] (https://dzefile.hpccube.com:65011/efile/s/w/bmV4dGhhbQ==_191f3754a48697e8&)
- Password:
VDGJ - Setup: Please download the weights and place them in the
./pretrained_modelsdirectory.
-
Training To start the model training and validation process, execute the following script:
sh scripts/train/train_val.sh
-
Testing To test the model after training, execute the following script:
sh scripts/test/test.sh
This section provides a step-by-step tutorial on how to prepare your own dataset using ABACUS, train the NextHAM model on it, and visualize the predicted band structures against the Density Functional Theory (DFT) ground truth.
- Log in to www.scnet.cn and download
abacus-v3.10.0LTSandabacus-v3.9.0.18from the App Store. Deploy them to your local directory. - Update the ABACUS executable paths in
./ABACUS2NextHAM/src/abacus2nextham/constant.py(lines 12-15). - Download the
ase_abacuspackage and activate its environment:source /your_path/apprepo/ase_abacus/v1.9.16-matplotlib/scripts/env.sh⚠️ Important Note: Sourcing this script initializes a new sub-environment. You will need to reinstall some of the dependencies from./environment.ymlinto this active environment.
- Configure your custom working paths in
./ABACUS2NextHAM/src/abacus2nextham/constant.py(lines 5-10). - Place your target ABACUS structure files (
STRU) into./ABACUS2NextHAM/input/structures/. This directory supports batch processing for multiple structures. - Navigate to the processing directory and run the calculation:
cd ./ABACUS2NextHAM python src/abacus2nextham/main.py - Wait for the Self-Consistent Field (SCF) calculations to complete. The raw output data will be saved in the
./ABACUS2NextHAM/simulate/directory.
Execute the conversion script to process the raw ABACUS output into NextHAM-compatible equivariant tensors:
python run_convert.pyThe processed .pth data files will be stored in the processed_data/ directory. Concurrently, a data.txt file will be generated in the same directory, recording the absolute paths of all processed data samples.
- Navigate back to the project root directory.
- Split the
data.txt(generated in Step 3) into three separate files:train.txt,val.txt, andtest.txt. Save them under the./datasets/directory. - Follow the standard training and testing commands detailed in the Training and Evaluation section above.
- Required for Visualization: If you intend to plot band structures later, you must save the model's predictions during testing. Uncomment line 440 in
test.pybefore running the test script. Predictions will be saved in the./res/directory by default.
To reconstruct the predicted Hamiltonians into band structures and visually compare them with the DFT ground truth:
cd ./NextHAM2Bands
sh run_bands.sh💡 Tip: The run_bands.sh script uses case-0 (the first sample of your custom dataset) as a default example. You can modify the script to replace case-0 with any specific sample name/ID you wish to analyze.
If you find our work and dataset useful in your research, please cite our paper:
@inproceedings{yin2026nextham,
title={Advancing Universal Deep Learning for Electronic-Structure Hamiltonian Prediction of Materials},
author={Shi Yin, Zujian Dai, Xinyang Pan, and Lixin He},
booktitle={International Conference on Learning Representations (ICLR)},
year={2026}
}