Skip to content

Commit

Permalink
docstring and assert_allclose for coeffs in test_mwfn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenDKelly committed Aug 31, 2020
1 parent b51453f commit a006bfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iodata/test/test_mwfn.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


def helper_load_mwfn_low(fn_mwfn):
"""Load a testing Gaussian log file with iodata.formats.mwfn.load_mwfn_low."""
"""Load a testing Multiwfn file with iodata.formats.mwfn.load_mwfn_low."""
with path('iodata.test.data', fn_mwfn) as fn:
lit = LineIterator(str(fn))
return _load_mwfn_low(lit)
Expand Down Expand Up @@ -103,9 +103,9 @@ def test_load_mwfn_ch3_rohf_g03():
olp_fchk = compute_overlap(mol2.obasis, mol2.atcoords)
assert_allclose(mol.atcoords, mol2.atcoords, atol=1E-7, rtol=1E-7)
assert_allclose(mol2.obasis.shells[0].coeffs, coeffs1)
# fails due to special SP basis storage (leaving commented lines in for future reference)
# assert_allclose(mol2.obasis.shells[1].coeffs, coeffs2)
# assert_allclose(mol2.obasis.shells[2].coeffs, coeffs3)
# Mind the gap, I mean... the SP contraction
assert_allclose(mol2.obasis.shells[1].coeffs[:, 0], np.squeeze(coeffs2.T))
assert_allclose(mol2.obasis.shells[1].coeffs[:, 1], np.squeeze(coeffs3.T))
assert_allclose(mol2.obasis.shells[3].coeffs, coeffs4)
assert_allclose(mol2.obasis.shells[4].coeffs, coeffs4)
assert_allclose(olp, olp_fchk, atol=1E-7, rtol=1E-7)
Expand Down

0 comments on commit a006bfb

Please sign in to comment.