def test_recon_1d(): res = dftd3.from_arrays_qc(functional="b3lyp", dashlevel="d3bJ", dashparams={"a2": 4.4211}, dertype="first") assert compare_recursive(db3lypd3bj, res, atol=1.0e-4) assert compare_strings("B3LYP-D3BJ", compute_key(res), "key")
def test_recon_1e(): ans = copy.deepcopy(db3lypd3bj) ans["functional"] = "" ans["dashparams"]["a2"] = 5.4211 res = dftd3.from_arrays_qc(functional="b3lyp", dashlevel="d3bJ", dashparams={"a2": 5.4211}, dertype="first") assert compare_recursive(ans, res, atol=1.0e-4) assert compare_strings("-D3BJ", compute_key(res), "key")
def test_recon_1c(): res = dftd3.from_arrays_qc(dashparams={ "s8": 1.9889, "s6": 1.0, "a2": 4.4211, "a1": 0.3981 }, dashlevel="d3bj", dertype=1) assert compare_recursive(db3lypd3bj, res, atol=1.0e-4) assert compare_strings("B3LYP-D3BJ", compute_key(res), "key")
def test_recon_1f(): with pytest.raises(qcdb.ValidationError): dftd3.from_arrays_qc(functional="b3lyp", dashlevel="d3bJ", dashparams={"a3": 5.4211}, dertype="first")
def test_recon_1b(): res = dftd3.from_arrays_qc(functional="b3LYP", dashlevel="D3bj", dertype=None) assert compare_recursive(db3lypd3bj, res, atol=1.0e-4) assert compare_strings("B3LYP-D3BJ", compute_key(res), "key")
def test_recon_2b(): res = dftd3.from_arrays_qc(functional="pbe", dashlevel="d3", dertype="Energy") assert compare_recursive(dpbed3zero, res, atol=1.0e-4) assert compare_strings("PBE-D3ZERO", compute_key(res), "key")