Skip to content

Commit

Permalink
add sasa_ng to unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
wxj6000 committed Jan 27, 2024
1 parent 6ad811a commit b29d0b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gpu4pyscf/solvent/tests/test_smd.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ def tearDownModule():
class KnownValues(unittest.TestCase):
def test_cds_solvent(self):
smdobj = smd.SMD(mol)
smdobj.sasa_ng = 590
smdobj.solvent = 'toluene'
e_cds = smdobj.get_cds()
assert numpy.abs(e_cds - -0.0013476016530476354) < 1e-8

def test_cds_water(self):
smdobj = smd.SMD(mol)
smdobj.sasa_ng = 590
smdobj.solvent = 'water'
e_cds = smdobj.get_cds()
assert numpy.abs(e_cds - 0.0022903044356530726) < 1e-8
Expand All @@ -54,13 +56,15 @@ def test_smd_solvent(self):
mf = scf.RHF(mol)
mf = mf.SMD()
mf.with_solvent.solvent = 'ethanol'
mf.with_solvent.sasa_ng = 590
e_tot = mf.kernel()
assert numpy.abs(e_tot - -76.075066568) < 2e-4

def test_smd_water(self):
mf = scf.RHF(mol)
mf = mf.SMD()
mf.with_solvent.solvent = 'water'
mf.with_solvent.sasa_ng = 590
e_tot = mf.kernel()
assert numpy.abs(e_tot - -76.0756052903) < 2e-4

Expand Down

0 comments on commit b29d0b7

Please sign in to comment.