Exemple #1
0
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_dicts(ans, res, 4, sys._getframe().f_code.co_name)
    assert compare_strings('-D3BJ', compute_key(res), 'key')
Exemple #2
0
def test_recon_2b():
    res = dftd3.from_arrays_qc(functional='pbe', dashlevel='d3', dertype='Energy')
    assert compare_dicts(dpbed3zero, res, 4, sys._getframe().f_code.co_name)
    assert compare_strings('PBE-D3ZERO', compute_key(res), 'key')
Exemple #3
0
def test_recon_1f():
    with pytest.raises(qcdb.ValidationError):
        dftd3.from_arrays_qc(functional='b3lyp', dashlevel='d3bJ', dashparams={'a3': 5.4211}, dertype='first')
Exemple #4
0
def test_recon_1d():
    res = dftd3.from_arrays_qc(functional='b3lyp', dashlevel='d3bJ', dashparams={'a2': 4.4211}, dertype='first')
    assert compare_dicts(db3lypd3bj, res , 4, sys._getframe().f_code.co_name)
    assert compare_strings('B3LYP-D3BJ', compute_key(res), 'key')
Exemple #5
0
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_dicts(db3lypd3bj, res, 4, sys._getframe().f_code.co_name)
    assert compare_strings('B3LYP-D3BJ', compute_key(res), 'key')
Exemple #6
0
def test_recon_1b():
    res = dftd3.from_arrays_qc(functional='b3LYP', dashlevel='D3bj', dertype=None)
    assert compare_dicts(db3lypd3bj, res, 4, sys._getframe().f_code.co_name)
    assert compare_strings('B3LYP-D3BJ', compute_key(res), 'key')