-
Notifications
You must be signed in to change notification settings - Fork 46
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
Rename nprim
to nexp
where appropriate
#357
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,7 @@ def test_load_fchk_hf_sto3g_num(): | |
assert shell0.kinds == ["c"] | ||
assert_allclose(shell0.exponents, np.array([1.66679134e02, 3.03608123e01, 8.21682067e00])) | ||
assert_allclose(shell0.coeffs, np.array([[1.54328967e-01], [5.35328142e-01], [4.44634542e-01]])) | ||
assert shell0.nprim == 3 | ||
assert shell0.nexp == 3 | ||
assert shell0.ncon == 1 | ||
assert shell0.nbasis == 1 | ||
shell1 = mol.obasis.shells[1] | ||
|
@@ -87,11 +87,11 @@ def test_load_fchk_hf_sto3g_num(): | |
] | ||
), | ||
) | ||
assert shell1.nprim == 3 | ||
assert shell1.nexp == 3 | ||
assert shell1.ncon == 2 | ||
assert shell1.nbasis == 4 | ||
shell2 = mol.obasis.shells[2] | ||
assert shell2.nprim == 3 | ||
assert shell2.nexp == 3 | ||
assert shell2.ncon == 1 | ||
assert shell2.nbasis == 1 | ||
assert mol.obasis.primitive_normalization == "L2" | ||
|
@@ -123,7 +123,7 @@ def test_load_fchk_h_sto3g_num(): | |
assert mol.title == "h_sto3g" | ||
assert len(mol.obasis.shells) == 1 | ||
assert mol.obasis.nbasis == 1 | ||
assert mol.obasis.shells[0].nprim == 3 | ||
assert mol.obasis.shells[0].nexp == 3 | ||
Comment on lines
123
to
+126
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Add tests for invalid Consider adding tests to handle invalid |
||
assert len(mol.atcoords) == len(mol.atnums) | ||
assert mol.atcoords.shape[1] == 3 | ||
assert len(mol.atnums) == 1 | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -122,7 +122,7 @@ def test_load_mkl_ethanol(): | |||||||||||||||||||||||
# assert_allclose(mol.obasis.shells[-1].coeffs[-1, -1], 0.181380684) | ||||||||||||||||||||||||
assert_equal([shell.icenter for shell in mol.obasis.shells[:5]], [0, 0, 1, 1, 1]) | ||||||||||||||||||||||||
assert_equal([shell.angmoms[0] for shell in mol.obasis.shells[:5]], [0, 0, 0, 0, 1]) | ||||||||||||||||||||||||
assert_equal([shell.nprim for shell in mol.obasis.shells[:5]], [3, 1, 6, 3, 3]) | ||||||||||||||||||||||||
assert_equal([shell.nexp for shell in mol.obasis.shells[:5]], [3, 1, 6, 3, 3]) | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Include tests for invalid It would be beneficial to include tests for invalid
Suggested change
|
||||||||||||||||||||||||
assert_equal(mol.mo.coeffs.shape, (39, 39)) | ||||||||||||||||||||||||
assert_equal(mol.mo.energies.shape, (39,)) | ||||||||||||||||||||||||
assert_equal(mol.mo.occs.shape, (39,)) | ||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,16 +40,16 @@ def test_load_mwfn_ch3_rohf_g03(): | |
assert_equal(mol.mo.occs.max(), 2.0) | ||
assert_equal(mol.extra["full_virial_ratio"], 2.00174844) | ||
assert_equal(mol.extra["nindbasis"], 8) | ||
assert_equal(np.sum([shell.nprim * shell.nbasis for shell in mol.obasis.shells]), 24) | ||
assert_equal(np.sum([shell.nexp * shell.nbasis for shell in mol.obasis.shells]), 24) | ||
assert_equal(len(mol.obasis.shells), 6) | ||
assert_equal(np.sum([shell.nprim for shell in mol.obasis.shells]), 18) | ||
assert_equal(np.sum([shell.nexp for shell in mol.obasis.shells]), 18) | ||
assert_equal(mol.charge, 0.0) | ||
assert_equal(mol.nelec, 9) | ||
assert_equal(mol.natom, 4) | ||
assert_equal(mol.energy, -3.90732095e01) | ||
assert_allclose([shell.angmoms[0] for shell in mol.obasis.shells], [0, 0, 1, 0, 0, 0]) | ||
assert_allclose([shell.icenter for shell in mol.obasis.shells], [0, 0, 0, 1, 2, 3]) | ||
assert_allclose([shell.nprim for shell in mol.obasis.shells], [3, 3, 3, 3, 3, 3]) | ||
assert_allclose([shell.nexp for shell in mol.obasis.shells], [3, 3, 3, 3, 3, 3]) | ||
Comment on lines
+43
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Add tests for boundary values of Consider adding tests for boundary values of |
||
exponents1 = np.array([7.16168373e01, 1.30450963e01, 3.53051216e00]) | ||
exponents2 = np.array([2.94124936e00, 6.83483096e-01, 2.22289916e-01]) | ||
exponents3 = np.array([2.94124936e00, 6.83483096e-01, 2.22289916e-01]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (testing): Consider adding edge cases for
nexp
valuesIt would be beneficial to add tests for edge cases such as
nexp
being 0 or negative, even if these cases are not expected in normal operation. This ensures robustness against unexpected input.