Skip to main content

Hamiltonian Projection and Reconstruction to atomic Orbitals

Project description

HPRO: Hamiltonian Projection and Reconstruction to atomic Orbitals

PyPI version Python License GitHub

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)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

hpro-0.3.1-py3-none-any.whl (148.5 kB view details)

Uploaded Python 3

File details

Details for the file hpro-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: hpro-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 148.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hpro-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6e01c252f3630624397753f147def9d8f69301bb6037a7281c2f34e8af2286b
MD5 306310aa368bb2dc683634454097d014
BLAKE2b-256 9ef5ee13113249143c1fdd3e5ad411d1aff528e1a7f749c53114ed564e376a8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hpro-0.3.1-py3-none-any.whl:

Publisher: publish.yaml on Xiaoxun-Gong/HPRO

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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