Extrapolation methods for complete basis sets
Project description
packaging-extrapolation Manual
About
- This package contains partial extrapolation methods in quantum chemistry, written using the extrapolation method proposed in the literature. Extrapolation to the CBS limit can be done by entering two successive energies.
- Additionally, the web calculator is availble at the internet: https://xizaokaiz-1324489885.cos.ap-shanghai.myqcloud.com/homepage.html
- If you found this site useful for your work please cite it as: Xi, Z.; Ding, Y.; Tian, X. Building a New Platform for Significantly Improving Performance of Hartree–Fock and CCSD(T) Correlation Energy Based on Two-Point Complete Basis Set Extrapolation Schemes. J. Phys. Chem. A 2024, 128 (18), 3742–3749. https://doi.org/10.1021/acs.jpca.4c01712
Quickly Use
- Please use the
pip
command to install:pip install packaging-extrapolation
orpython3 -m pip install packaging-extrapolation
- Please make sure the package is the latest:
pip install --upgrade packaging-extrapolation
- After installation, test the example in
src/packaging_extrapolation/examples/examples_energy.py
to see if you get results.- Extrapolation Method Calls:
python examples_energy.py -m "Klopper_1986" -xe -76.0411795 -ye -76.0603284 -low 2 -high 3 -a 4.25
-m
: extrapolation method name.-xe
: energy for E(X).-ye
: energy for E(Y).-low
: cardinal number for X.-high
: cardinal number for Y.-a
: extrapolation parameter alpha/beta.
- Extrapolation Method Calls:
Tow-Point Extrapolation Schemes
Method | Two-point From | Name | Reference |
---|---|---|---|
Klopper-1986 | $E_{CBS}=\frac{E(Y)e^{-α\sqrt{X}}-E(X)e^{-α\sqrt{Y}}}{e^{-α\sqrt{X}}-e^{-α\sqrt{Y}}}$ | Klopper_1986 |
https://doi.org/10.1016/0166-1280(86)80068-9 |
Feller-1992 | $E_{CBS}=\frac{E(Y)e^{-αX}-E(X)e^{-αY}}{e^{-αX}-e^{-αY}}$ | Feller_1992 |
https://doi.org/10.1063/1.462652 |
Truhlar-1998 (Hartree-Fock) | $E_{CBS}=\frac{E(Y)X^{-\alpha}-E(X)Y^{-\alpha}}{X^{-\alpha}-Y^{-\alpha}}$ | Truhlar_1998 |
https://doi.org/10.1016/S0009-2614(98)00866-5 |
Jensen-2001 | $E_{CBS}=\frac{E(Y)(X+1)e^{-α\sqrt{X}}-E(X)(Y+1))e^{-α\sqrt{Y}}}{(X+1)e^{-α\sqrt{X}}-(Y+1)e^{-α\sqrt{Y}}}$ | Jensen_2001 |
https://doi.org/10.1063/1.1413524 |
Schwenke-2005 | $E_{CBS}=[E(Y)-E(X)]\alpha+E(X)$ | Schwenke_2005 |
https://doi.org/10.1063/1.1824880 |
Martin-1996 | $E_{CBS}=\frac{E(Y)(X+1/2)^{-\beta}-E(X)(Y+1/2)^{-\beta}}{(X+1/2)^{-\beta}-(Y+1/2)^{-\beta}}$ | Martin_1996 |
https://doi.org/10.1016/0009-2614(96)00898-6 |
Truhlar-1998 (Correlation) | $E_{CBS}=\frac{E(Y)X^{-\beta}-E(X)Y^{-\beta}}{X^{-\beta}-Y^{-\beta}}$ | Truhlar_1998 |
https://doi.org/10.1016/S0009-2614(98)00866-5 |
Huh-2003 | $E_{CBS}=\frac{E(Y)(X+\beta)^{-3}-E(X)(Y+\beta)^{-3}}{(X+\beta)^{-3}-(Y+\beta)^{-3}}$ | HuhLee_2003 |
https://doi.org/10.1063/1.1534091 |
Bakowies-2007 | $E_{CBS}=\frac{E(Y)(X+1)^{-\beta}-E(X)(Y+1)^{-\beta}}{(X+1)^{-\beta}-(Y+1)^{-\beta}}$ | Bkw_2007 |
https://doi.org/10.1063/1.2749516 |
OAN(C) | $E_{CBS}=\frac{3^3E(Y)-\beta^3E(X)}{3^3-\beta^3}$ | OAN_C |
https://doi.org/10.1002/jcc.23896 |
Another Use
- If you need to calculate the extrapolation energy of more systems, please refer to the following examples:
from packaging_extrapolation import UtilTools
from packaging_extrapolation.Extrapolation import FitMethod
import pandas as pd
import numpy as np
"""
Calculate more systems.
"""
if __name__ == "__main__":
# Input file.
data = pd.read_csv('../data/hf.CSV')
# Extrapolation model.
model = FitMethod()
# The E(X) and E(Y).
x_energy_list, y_energy_list = data['aug-cc-pvdz'], data['aug-cc-pvtz']
# Using Klopper-1986 method and alpha=4.25, extrapolate to the CBS limit at the AV {D, T}Z basis set pair.
low_card, high_card, alpha, method_name = 2, 3, 4.25, 'Klopper_1986'
result = UtilTools.train_alpha(model=model,
method=method_name,
x_energy_list=x_energy_list,
y_energy_list=y_energy_list,
low_card=low_card,
high_card=high_card,
alpha=alpha)
for i in range(len(result)):
print(result[i], 'Eh')
df = pd.DataFrame()
df['CBS Energy'] = result
# Output file.
df.to_csv('CBS_Energy.csv', index=False)
- The input file should be in
.csv
format and have the following content:
mol,aug-cc-pvdz,aug-cc-pvtz
HCN,-92.8880397,-92.9100033
HCO,-113.2672513,-113.2947633
HNO,-129.8114596,-129.8401888
HO2,-150.2024221,-150.239531
N2O,-183.7105405,-183.7530387
NH2,-55.5749363,-55.5878344
NH3,-56.1972947,-56.2127423
NO2,-204.0664514,-204.1137363
Functions |
---|
UtilTools.calc_MAD(y_true, y_pred) : Calculate the Mean Absolute Deviation (kcal/mol). |
UtilTools.calc_max_MAD(y_true, y_pred) : Calculate the Maximum Absolute Deviation (kcal/mol). |
UtilTools.calc_min_MAD(y_true, y_pred) : Calculate the Minimum Absolute Deviation (kcal/mol). |
UtilTools.calc_RMSE(y_true, y_pred) : Calculate the Root Mean Square Deviation (kcal/mol). |
UtilTools.calc_MSD(y_true, y_pred) : Calculate the Mean Square Deviation (kcal/mol). |
UtilTools.calc_MaxPosMAD(y_true, y_pred) : Calculate the Maximum Positive Deviation (kcal/mol). |
UtilTools.train_alpha(*, model, method, x_energy_list, y_energy_list, alpha, low_card, high_card) : Calculate extrapolated energy. |
UtilLog.extract_energy(input_path, output_path) : Extracting energy from many log files. |
UtilLog.train_all(*, model, method, x_energy_list, y_energy_list, low_card, high_card, limit_list, init_guess=0.001, temp='RMSD') : Optimizing extrapolation parameters with RMSD or MAD . |
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
File details
Details for the file packaging-extrapolation-1.1.0.tar.gz
.
File metadata
- Download URL: packaging-extrapolation-1.1.0.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7453efdd1b3abe9005de36fe07839ba6a02abe6a15a0525f4fb914e97e370fc1 |
|
MD5 | 37160b9d1fb05c7ebe7b253e91b69939 |
|
BLAKE2b-256 | 7895627245e658c8c2c8b2679829d2fac249035bdd2a54ade8aaf2b44ded1d4e |
File details
Details for the file packaging_extrapolation-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: packaging_extrapolation-1.1.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2ce5bdcf9cb4dddf27ed54e642196da163e7852a707226f20cca06ad60ba9d9 |
|
MD5 | 18602aac66280242b6b150b823abc895 |
|
BLAKE2b-256 | f36610742e616cd58f290b7928130848718b5a121a949fb784c06dd5a0021287 |