Skip to content

Commit bb743d1

Browse files
authored
Add MSDFT method (#77)
* Add MSDFT method * Using generalized Slater-Condon rules for HF integrals in NOCI * Add comments * typo * Lint * Fix bug in nuclear energy treatments * Error in sm_t * Update tests * Update tests * Adjust threshold in tests * Adjust tests * Numerical noises in mcpdft tests
1 parent 6c1acbd commit bb743d1

File tree

6 files changed

+581
-1
lines changed

6 files changed

+581
-1
lines changed

NOTICE

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The MC-PDFT module within this package was developed by:
22

33
(in chronological order of first commit)
4+
Qiming Sun
45
Matthew R Hermes (University of Chicago)
56
Dayou Zhang (University of Minnesota)
67
Aleksandr Lykhin (University of Chicago)
@@ -12,3 +13,4 @@ Bhavnesh Jangid
1213
Shirong Wang
1314
Jiachen Li <[email protected]>
1415
Jincheng Yu <[email protected]>
16+
Peng Bao

examples/msdft/01-simple-noci.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env/python
2+
3+
# Author: Peng Bao <[email protected]>
4+
# Edited by: Qiming Sun <[email protected]>
5+
6+
from pyscf import gto, msdft
7+
8+
mol = gto.M(atom='''
9+
H 1.080977 -2.558832 0.000000
10+
H -1.080977 2.558832 0.000000
11+
H 2.103773 -1.017723 0.000000
12+
H -2.103773 1.017723 0.000000
13+
H -0.973565 -1.219040 0.000000
14+
H 0.973565 1.219040 0.000000
15+
C 0.000000 0.728881 0.000000
16+
C 0.000000 -0.728881 0.000000
17+
C 1.117962 -1.474815 0.000000
18+
C -1.117962 1.474815 0.000000
19+
''', basis='sto-3g')
20+
21+
mf = msdft.NOCI(mol)
22+
mf.xc = 'pbe0'
23+
24+
h = homo = mol.nelec[0] - 1
25+
l = h + 1
26+
# Single excitation orbital pair
27+
mf.s = [[h,l],[h-1,l],[h,l+1],[h-1,l+1]]
28+
# Double excitation orbital pair
29+
mf.d = [[h,l]]
30+
31+
mf.run()
32+
# reference:
33+
#[-153.93158107 -153.8742658 -153.82198958 -153.69666086 -153.59511111
34+
# -153.53734913 -153.5155775 -153.47367943 -153.40221993 -153.37353437]

pyscf/mcpdft/test/test_diatomic_energies.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def test_h2_cms3ftlda22_631g (self):
126126
# commit: bd596f6cabd6da0301f3623af2de6a14082b34b5
127127
for i in range (3):
128128
with self.subTest (state=i):
129-
self.assertAlmostEqual (e[i], e_ref[i], 5)
129+
self.assertAlmostEqual (e[i], e_ref[i], 4)
130130

131131
def test_h2_cms2ftlda22_631g (self):
132132
e = diatomic ('H', 'H', 1.3, 'ftLDA,VWN3', '6-31G', 2, 2, 2)

pyscf/msdft/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .noci import NOCI

0 commit comments

Comments
 (0)