Skip to content

Commit

Permalink
qcsk: a0 as Bohr abbreviation. test basis sets as str or float
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Sep 8, 2020
1 parent e07efcb commit aadfdf0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion qcelemental/models/common_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
class Provenance(ProtoModel):
"""Provenance information."""


creator: str = Field(..., description="The name of the program, library, or person who created the object.")
version: str = Field(
"",
Expand Down
2 changes: 1 addition & 1 deletion qcelemental/physical_constants/ureg.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def build_units_registry(context):
ureg.define("debye = 1e-18 * statcoulomb * cm = D")

# Distance
ureg.define("bohr = {} * meter = bohr_radius = Bohr = au_length".format(phys_const["bohr radius"]["value"]))
ureg.define("bohr = {} * meter = bohr_radius = Bohr = a0 = au_length".format(phys_const["bohr radius"]["value"]))
ureg.define("wavenumber = 1 / centimeter")
ureg.define("Angstrom = angstrom")

Expand Down
7 changes: 5 additions & 2 deletions qcelemental/tests/test_model_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
{
"harmonic_type": "spherical",
"angular_momentum": [0],
"exponents": [130.70939, 23.808861, 6.4436089],
"coefficients": [[0.15432899, 0.53532814, 0.44463454]],
"exponents": [130.70939, "23.808861", 6.4436089],
"coefficients": [[0.15432899, "0.53532814", 0.44463454]],
},
{
"harmonic_type": "cartesian",
Expand Down Expand Up @@ -173,6 +173,9 @@ def test_basis_set_build(request):
assert es[1].is_contracted() is False
assert es[2].is_contracted()

assert es[0].exponents == [130.70939, 23.808861, 6.4436089]
assert es[0].coefficients == [[0.15432899, 0.53532814, 0.44463454]]


def test_basis_electron_center_raises():
data = center_data["bs_sto3g_h"]["electron_shells"][0].copy()
Expand Down

0 comments on commit aadfdf0

Please sign in to comment.