A minimal DMET prototype built on top of PySCF.
Project description
DMET
A minimal DMET prototype based on PySCF, currently implementing:
- RHF reference state
- Lowdin-orthogonalized AO local basis
- Environment 1-RDM based bath/core orbital construction
- Fragment embedding Hamiltonian
- FCI as embedding solver
- One-shot DMET total energy estimation
This version focuses on "minimum runnable", and does not yet include DMET correlation potential self-consistency, chemical potential fitting, or more rigorous fragment energy partitioning.
Quick Start
from pyscf import gto
from dmet import RHFDMET, make_atom_fragments
mol = gto.M(
atom="""
H 0.0 0.0 0.0
H 0.0 0.0 0.8
H 0.0 0.0 1.6
H 0.0 0.0 2.4
""",
basis="sto-3g",
unit="Angstrom",
verbose=0,
)
dmet = RHFDMET(mol)
result = dmet.kernel(make_atom_fragments(mol))
print("RHF energy:", result.mean_field_energy)
print("DMET energy estimate:", result.total_energy)
for fragment in result.fragments:
print(
fragment.fragment.name,
"bath=",
fragment.bath_dimension,
"embed=",
fragment.embedding_dimension,
"E_emb=",
fragment.embedding_energy,
)
API
Fragment(name, ao_indices): Manually define a fragmentmake_atom_fragments(mol): One fragment per atomRHFDMET(mol, mf=None): Build a one-shot DMET solverRHFDMET.kernel(fragments): ReturnsDMETResult
For minimal end-to-end usage, you can also check the test file test_dmet.py.
Development
just test
License
MIT
Project details
Release history Release notifications | RSS feed
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 dmet-0.1.0.tar.gz.
File metadata
- Download URL: dmet-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b517e786b45c5fa198e245fe6327cf4db3262de9b07e604c9f5bfbfce14625b
|
|
| MD5 |
e2cfb3e56d820d0a1cd80158e3736d70
|
|
| BLAKE2b-256 |
e350d796d41450f232e8a7fc118e6033854e424a223615da4f3443f093d76027
|
File details
Details for the file dmet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dmet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e782960703451e12f46b07842c281dca9cb1fef7102aa275003389b279ac2a3f
|
|
| MD5 |
7b9cbd05d3a3ddcf61cff1a8a60b17fe
|
|
| BLAKE2b-256 |
929d5c04ec517718024e94b9ee2d9d97b5de4af196dca6bd4e33ffaf0d4dd7f7
|