-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f19cfcd
commit f4c7dc2
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Author: Bhavnesh Jangid <email: [email protected]> | ||
# | ||
|
||
import unittest | ||
from pyscf import gto, scf | ||
from mrh.my_pyscf.dkh import dkh | ||
|
||
class KnownValues(unittest.TestCase): | ||
|
||
def test_DKH2(self): | ||
mol = gto.Mole(atom='''Ne 0 0 0''',basis='cc-pvdz-dk',verbose=0) | ||
mol.build() | ||
mfdkh = scf.RHF(mol) | ||
mfdkh.get_hcore = lambda *args: dkh(mol,dkhord=2,c=137.0359895) # Orca's Speed of Light | ||
mfdkh.kernel() | ||
self.assertAlmostEqual(mfdkh.e_tot, -128.62532864034782, 7) | ||
|
||
def test_DKH3(self): | ||
mol = gto.Mole(atom='''Ne 0 0 0''',basis='cc-pvdz-dk',verbose=0) | ||
mol.build() | ||
mfdkh = scf.RHF(mol) | ||
mfdkh.get_hcore = lambda *args: dkh(mol,dkhord=3,c=137.0359895) # Orca's Speed of Light | ||
mfdkh.kernel() | ||
self.assertAlmostEqual(mfdkh.e_tot, -128.62538501869074, 7) | ||
|
||
def test_DKH4(self): | ||
mol = gto.Mole(atom='''Ne 0 0 0''',basis='cc-pvdz-dk',verbose=0) | ||
mol.build() | ||
mfdkh = scf.RHF(mol) | ||
mfdkh.get_hcore = lambda *args: dkh(mol,dkhord=4,c=137.0359895) # Orca's Speed of Light | ||
mfdkh.kernel() | ||
self.assertAlmostEqual(mfdkh.e_tot, -128.62538062385389, 7) | ||
|
||
if __name__ == "__main__": | ||
print("Test for DKH Scalar Relativisitic Effects") | ||
unittest.main() | ||
|