Skip to main content

pyscf-vorticity

Geometric correlation analysis for quantum chemistry

What it does

Computes an effective correlation dimension γ from first-principles two-particle reduced density matrices, helping you select the optimal DFT functional for your system.


Quick Start

from pyscf import gto, scf, fci
from pyscf_vorticity import compute_vorticity

# Your molecule
mol = gto.M(atom='...', basis='cc-pvdz')
mf = scf.RHF(mol).run()
cisolver = fci.FCI(mf)
E_fci, fcivec = cisolver.kernel()

# Compute vorticity
rdm2 = cisolver.make_rdm12(fcivec, mol.nao, nelec)[1]
V, k = compute_vorticity(rdm2, mol.nao)
alpha = abs(E_fci - mf.e_tot) / V

# → Use γ to guide functional selection

HOW TO: Choosing Your Functional

The following table provides practical guidelines based on physical interpretation of γ. These are recommendations, not absolute rules.

Your γ Optimal a Recommended Functional
γ ≈ 0 a ≈ 1.0 HF or high exact exchange hybrid
γ ≈ 1 a ≈ 0.5 M06-2X, BH&HLYP
γ ≈ 2 a ≈ 0.33 PBE0, B3LYP
γ ≈ 3-4 a ≈ 0.25 B3LYP
γ > 5 a < 0.15 TPSSh, pure GGA

Guideline formula: a ≈ 1 / (1 + γ)


WHY: The Physics Behind It

The Problem

Standard DFT functionals contain empirical "magic numbers" - like B3LYP's 20% exact exchange - that work on average but fail systematically for:

  • Strong correlation (Mott insulators, transition metals)
  • Static correlation (bond breaking, diradicals)
  • Weak correlation (metals)

The Root Cause

Most functionals implicitly assume a fixed correlation structure.

Reality: correlation strength varies across systems.

The Solution

The exchange-correlation energy scales with a vorticity measure V, allowing extraction of the correlation exponent γ through system-size dependence.

γ characterizes how correlated your system is:

γ value Correlation type Electron behavior
γ → 0 Strong (Mott) Localized, atomic-like
γ ≈ 1 Intermediate Partially localized
γ ≈ 2 Moderate Molecular bonding
γ > 3 Weak (metallic) Fully delocalized

HOW TO: Strong Correlation Systems

When γ → 0, standard DFT typically fails.

What to do:

  1. Use high exact exchange
   mf = dft.RKS(mol)
   mf.xc = 'HF*0.5 + PBE*0.5'  # 50% exact exchange
  1. Consider range-separated hybrids
   mf.xc = 'camb3lyp'
  1. Or go beyond DFT (CASSCF, DMFT, CC)

WHY this works:

Strong correlation (γ → 0) indicates localized electrons. Localized electrons require exact exchange to avoid self-interaction error. GGA/LDA assume delocalized electrons → systematic failure.


HOW TO: Weak Correlation (Metals)

When γ > 3:

mf.xc = 'PBE'   # Pure GGA
mf.xc = 'TPSS'  # Meta-GGA

WHY:

Delocalized electrons screen effectively. Exact exchange over-localizes → wrong band structure.


Validated Examples

H₂ Dissociation

R = 0.74Å: α = 0.062 (equilibrium)
R = 1.50Å: α = 0.039 (minimum)
R = 5.00Å: α = 0.097 (dissociated)

U-shaped α(R) captures weak → strong correlation transition.

Atoms

He (2e):  α = 0.090
Be (4e):  α = 0.003
Ne (10e): α = 0.004

The 30× drop from 2e to 4+e systems ("α-cliff") reflects the emergence of many-body correlation structure.


Installation

pip install git+https://github.com/miosync-masa/pyscf-vorticity.git

GPU acceleration (recommended):

pip install jax jaxlib

Citation

@article{iizumi2025geometric,
  title={Geometric Origin of Exchange-Correlation in Density Functional Theory},
  author={Iizumi, Masamichi},
  journal={arXiv preprint},
  year={2025}
}

License

MIT

Metadata

Release files for pyscf-vorticity 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyscf-vorticity 0.1.0
File Size Uploaded Provenance Actions
pyscf_vorticity-0.1.0.tar.gz 8.0 kB With provenance Details for pyscf_vorticity-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyscf-vorticity 0.1.0
File Interpreter ABI Platform Actions
pyscf_vorticity-0.1.0-py3-none-any.whl Python 3 none any Details for pyscf_vorticity-0.1.0-py3-none-any.whl

Total release size: 17.4 kB

Release files / pyscf_vorticity-0.1.0.tar.gz

Download URL pyscf_vorticity-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d346b0c4379a142516d823bada481a7f7a745f20c42b7d7b7181c8160792b2a2
BLAKE2b-256 checksum
How to use checksums
10979f44606c8eda892e72e57e94610fe840c68cf649a8094800ae399b7648cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Dec 28, 2025.

Transparency log

Release files / pyscf_vorticity-0.1.0-py3-none-any.whl

Download URL pyscf_vorticity-0.1.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a73271062096fafce6144f9fad9e8cd0777a2cbf37fc20309c6f95db67015d4
BLAKE2b-256 checksum
How to use checksums
8b5ec3f5d963fad544192a5eaeaf665feccc5c0658cbbe6ca1871bb01480659b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Dec 28, 2025.

Transparency log

Security for pyscf-vorticity 0.1.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyscf_vorticity-0.1.0.tar.gz

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 Dec 28, 2025.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page