HPRO: Hamiltonian Projection and Reconstruction to atomic Orbitals
HPRO is a Python package for converting plane-wave DFT calculation results to Hamiltonian matrices in atomic orbital basis. It serves as a bridge between first-principles calculations and tight-binding models or machine learning applications like DeepH.
Features
- Two conversion methods: Wavefunction projection and real-space reconstruction
- Multiple DFT interfaces: Quantum ESPRESSO, BerkeleyGW, GPAW, SIESTA
- MPI parallelization: Scalable calculations on HPC clusters
- DeepH format output: Direct compatibility with DeepH-pack
Installation
Basic Installation
pip install hpro
Or install from source:
pip install git+https://github.com/Xiaoxun-Gong/HPRO.git
With MPI Support
pip install hpro[mpi]
With Full Parallel Support (MPI + SLEPc)
pip install hpro[slepc]
Note: SLEPc requires PETSc to be installed with MKL Pardiso. See the SLEPc documentation for details.
Quick Start
from HPRO import PW2AOkernel
# Create kernel for real-space reconstruction
kernel = PW2AOkernel(
aodata_interface='siesta', # SIESTA orbital files
aodata_root='./aobasis',
hrdata_interface='qe-bgw', # QE + BerkeleyGW
vscdir='./scf/VSC',
upfdir='./pseudos',
ecutwfn=30
)
# Run reconstruction
kernel.run_pw2ao_rs('./output')
For diagonalization and band structure calculation:
from HPRO.aodiag import AODiagKernel
diag = AODiagKernel()
diag.setk(kpts, weights, symbols)
diag.load_deeph_mats('./output')
diag.diag(nbnd=36)
diag.write('./output')
Supported DFT Codes
| Code | Input | Output |
|---|---|---|
| Quantum ESPRESSO | Wavefunctions, potential | ✓ |
| BerkeleyGW | WFN, VSC, VKB | ✓ |
| GPAW | .gpw files | ✓ |
| SIESTA | .ion files, H/S matrices | ✓ |
| VASP | POSCAR structure | - |
Documentation
Requirements
- Python >= 3.9
- numpy >= 1.7
- scipy
- h5py
- tqdm
- matplotlib
Citation
If you use HPRO in your research, please cite:
@software{hpro2024,
author = {Gong, Xiaoxun},
title = {HPRO: Hamiltonian Projection and Reconstruction to atomic Orbitals},
year = {2024},
url = {https://github.com/Xiaoxun-Gong/HPRO}
}
License
GNU General Public License v3.0 or later (GPL-3.0-or-later)
Author
Xiaoxun Gong (xiaoxun.gong@berkeley.edu)
Metadata
Release files for hpro 0.3.1.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hpro-0.3.1.post1-py3-none-any.whl | Python 3 | none | any | Details for hpro-0.3.1.post1-py3-none-any.whl |
Release files / hpro-0.3.1.post1-py3-none-any.whl
| Download URL | hpro-0.3.1.post1-py3-none-any.whl |
|---|---|
| Size | 150.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02ab0a369c8fbb38122aca84c86850570e5de87612f66c3670a1fb086a97dad7
|
|
BLAKE2b-256 checksum How to use checksums |
d143569a3987e801854c039faf596e6482a0277cd264c1fe821c566d4d108423
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logSecurity for hpro 0.3.1.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for hpro-0.3.1.post1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.