Skip to content

Code to support the paper: A. Fabrizio, K. R. Briling, D. D. Girardier, and C. Corminboeuf, “Learning on-top: regressing the on-top pair density for real-space visualization of electron correlation”, J. Chem. Phys. 153, 204111 (2020)

License

Notifications You must be signed in to change notification settings

lcmd-epfl/OTPD-basis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTPD-basis

DOI

This code supports the paper

A. Fabrizio, K. R. Briling, D. D. Girardier, and C. Corminboeuf,
“Learning on-top: regressing the on-top pair density for real-space visualization of electron correlation”
J. Chem. Phys. 153, 204111 (2020) arXiv:2010.07116 [physics.chem-ph]

It is written to optimize the basis set for decomposition of the on-top pair density (OTPD) onto atom-centered contributions.

Requirements

Usage

1. Generate the densities to be fitted

python otpd.py [-h] [-g grid] molecule basis output

Computes the on-top pair density at the Hartree–Fock level and writes the molecular structure and OTPD values on a grid along with grid points and weights.

Command-line arguments

  • molecule: .xyz file with molecular geometry
  • basis: AO basis
  • output: .npz output file
  • grid: pyscf grid level

Examples

python otpd.py mol/xyz/H2.xyz   ccpvtz H2.npz
python otpd.py mol/xyz/H2O.xyz  ccpvtz H2O.npz
python otpd.py mol/xyz/H2O2.xyz ccpvtz H2O2.npz

2. Optimize the basis set for decomposition

optimizer.py [-h] [-e element1 [element2 ...]] -b basis [basis ...]
                  --molecules molecule1 [molecule2 ...] [-g gtol]
                  [--method method] [--check]

Finds the exponents of the given basis set to minimize the OTPD decomposition error.

Command-line arguments

  • elements: elements basis is optimized for
  • basis: basis set to use as an initial guess in pyscf format
  • molecules: molecular data files (outputs of otpd.py)
  • method: gradient-based optimization method (e.g. cg, bfgs)
  • gtol: gradient norm tolerance for optimization
  • check: if enabled, check gradient and exit

Examples

Optimize exponents for Hydrogen on OTPD of H₂:

python optimizer.py -b initial/H_N0.txt --molecules mol/otpd/H2.ccpvtz.grid3.npz

Optimize exponents for Oxygen on OTPD of H₂O and H₂O₂, using optimized basis for Hydrogen:

python optimizer.py -e O -b opt/H_N0.bfgs.txt initial/O_N0.txt \
                    --molecules mol/otpd/H2O.ccpvtz.grid3.npz mol/otpd/H2O2.ccpvtz.grid3.npz

Compare numerical and analytical derivatives used for optimization:

python optimizer.py -e O -b opt/H_N0.bfgs.txt initial/O_N0.txt \
                    --molecules mol/otpd/H2O.ccpvtz.grid3.npz mol/otpd/H2O2.ccpvtz.grid3.npz\
                    --check

About

Code to support the paper: A. Fabrizio, K. R. Briling, D. D. Girardier, and C. Corminboeuf, “Learning on-top: regressing the on-top pair density for real-space visualization of electron correlation”, J. Chem. Phys. 153, 204111 (2020)

Resources

License

Stars

Watchers

Forks

Languages