Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSDFT method #77

Merged
merged 13 commits into from
Dec 24, 2024
2 changes: 2 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MC-PDFT module within this package was developed by:

(in chronological order of first commit)
Qiming Sun
Matthew R Hermes (University of Chicago)
Dayou Zhang (University of Minnesota)
Aleksandr Lykhin (University of Chicago)
Expand All @@ -12,3 +13,4 @@ Bhavnesh Jangid
Shirong Wang
Jiachen Li <[email protected]>
Jincheng Yu <[email protected]>
Peng Bao
34 changes: 34 additions & 0 deletions examples/msdft/01-simple-noci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env/python

# Author: Peng Bao <[email protected]>
# Edited by: Qiming Sun <[email protected]>

from pyscf import gto, msdft

mol = gto.M(atom='''
H 1.080977 -2.558832 0.000000
H -1.080977 2.558832 0.000000
H 2.103773 -1.017723 0.000000
H -2.103773 1.017723 0.000000
H -0.973565 -1.219040 0.000000
H 0.973565 1.219040 0.000000
C 0.000000 0.728881 0.000000
C 0.000000 -0.728881 0.000000
C 1.117962 -1.474815 0.000000
C -1.117962 1.474815 0.000000
''', basis='sto-3g')

mf = msdft.NOCI(mol)
mf.xc = 'pbe0'

h = homo = mol.nelec[0] - 1
l = h + 1
# Single excitation orbital pair
mf.s = [[h,l],[h-1,l],[h,l+1],[h-1,l+1]]
# Double excitation orbital pair
mf.d = [[h,l]]

mf.run()
# reference:
#[-153.93158107 -153.8742658 -153.82198958 -153.69666086 -153.59511111
# -153.53734913 -153.5155775 -153.47367943 -153.40221993 -153.37353437]
2 changes: 1 addition & 1 deletion pyscf/mcpdft/test/test_diatomic_energies.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_h2_cms3ftlda22_631g (self):
# commit: bd596f6cabd6da0301f3623af2de6a14082b34b5
for i in range (3):
with self.subTest (state=i):
self.assertAlmostEqual (e[i], e_ref[i], 5)
self.assertAlmostEqual (e[i], e_ref[i], 4)

def test_h2_cms2ftlda22_631g (self):
e = diatomic ('H', 'H', 1.3, 'ftLDA,VWN3', '6-31G', 2, 2, 2)
Expand Down
1 change: 1 addition & 0 deletions pyscf/msdft/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .noci import NOCI
Loading