A unified deep learning package for electronic structure models including tight-binding, KS Hamiltonian and density matrix models
Project description
🚀 About DeePTB
DeePTB is an innovative Python package that uses deep learning to accelerate ab initio electronic structure simulations. It offers versatile, accurate, and efficient simulations for a wide range of materials and phenomena. Trained on small systems, DeePTB can predict electronic structures of large systems, handle structural perturbations, and integrate with molecular dynamics for finite temperature simulations, providing comprehensive insights into atomic and electronic behavior.
- Key Features
DeePTB contains two main components:
-
DeePTB-SK: deep learning based local environment dependent Slater-Koster TB.
- Customizable Slater-Koster parameterization with neural network corrections for .
- Flexible basis and exchange-correlation functional choices.
- Handle systems with strong spin-orbit coupling (SOC) effects.
-
DeePTB-E3: E3-equivariant neural networks for representing quantum operators.
- Construct DFT Hamiltonians/density and overlap matrices under full LCAO basis.
- Utilize (Strictly) Localized Equivariant Message-passing ((S)LEM) model for high data-efficiency and accuracy.
- Employs SO(2) convolution for efficient handling of higher-order orbitals in LCAO basis.
-
For more details, see our papers:
📚 Documentation
-
Online documentation
For a comprehensive guide and usage tutorials, visit Documentation website.
-
Contributing
We welcome contributions to DeePTB. Please refer to our contributing guidelines for details.
🛠️ Installation
Installing DeePTB is straightforward. We recommend using a virtual environment for dependency management.
-
Requirements
- Git
- Python 3.9 to 3.12.
- Torch 2.0.0 to 2.5.1 (PyTorch Installation).
- ifermi (optional, for 3D fermi-surface plotting).
- TBPLaS (optional).
-
From Source
Highly recommended to install DeePTB from source to get the latest features and bug fixes.
-
Setup Python environment: Using conda (recommended, python >=3.9, <=3.12 ), e.g.,
conda create -n dptb_venv python=3.10 conda activate dptb_venv
or using venv (make sure python >=3.9,<=3.12)
python -m venv dptb_venv source dptb_venv/bin/activate
-
Clone DeePTB and Navigate to the root directory:
git clone https://github.com/deepmodeling/DeePTB.git cd DeePTB
-
Install
torch:pip install "torch>=2.0.0,<=2.5.0"
-
Install
torch-scatter(two ways):- Recommended: Install torch and torch-scatter using the following commands:
python docs/auto_install_torch_scatter.py - Manual: Install torch and torch-scatter manually:
pip install torch-scatter -f https://data.pyg.org/whl/torch-${version}+${CUDA}.html
where${version}is the version of torch, e.g., 2.5.0, and${CUDA}is the CUDA version, e.g., cpu, cu118, cu121, cu124. See torch_scatter doc for more details.
- Recommended: Install torch and torch-scatter using the following commands:
-
Install DeePTB:
pip install .
-
-
Easy Installation
note: not fully tested, please use the source installation for a stable version.
- Using PyPi
- Ensure you have Python 3.9 to 3.12 and Torch installed.
- Install DeePTB with pip:
pip install dptb
Test code
To ensure the code is correctly installed, please run the unit tests first:
pytest ./dptb/tests/
Be careful if not all tests pass!
🤝 How to Cite
The following references are required to be cited when using DeePTB. Specifically:
-
For DeePTB-SK:
Q. Gu, Z. Zhouyin, S. K. Pandey, P. Zhang, L. Zhang, and W. E, Deep Learning Tight-Binding Approach for Large-Scale Electronic Simulations at Finite Temperatures with Ab Initio Accuracy, Nat Commun 15, 6772 (2024).
-
For DeePTB-E3:
Z. Zhouyin, Z. Gan, S. K. Pandey, L. Zhang, and Q. Gu, Learning Local Equivariant Representations for Quantum Operators, In The 13th International Conference on Learning Representations (ICLR) 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dptb-2.2.0.tar.gz.
File metadata
- Download URL: dptb-2.2.0.tar.gz
- Upload date:
- Size: 50.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1afe691ceb33d8ee28dc4019baabf814524bdb1c9d055e49009cee2a37a20781
|
|
| MD5 |
e9a4babd5bb029cfcd07b83b22376a6c
|
|
| BLAKE2b-256 |
3f13caadcb75362bc0cd209a15a44fe82f2ff16846fd5410074fda7abfa0e8cd
|
File details
Details for the file dptb-2.2.0-py3-none-any.whl.
File metadata
- Download URL: dptb-2.2.0-py3-none-any.whl
- Upload date:
- Size: 50.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
691560155835c8daf9280eb9c0e8a3f423632fb59100b79af4dcff0f3b0a28dd
|
|
| MD5 |
83b9d0a1618efbb3abfb81df12bb3523
|
|
| BLAKE2b-256 |
8e33483c4c8e5e09178435ca4da9c8e3310c5980f085198de18afdb57e343cc2
|