def test_diagnostic_factory(qcelemental_water):
    calculator = MultirefPredict.diagnostic_factory("B1", molecule=qcelemental_water)
    diag = calculator.computeDiagnostic()
    B1Thre = 1e-6
    expected = 0.006334860365228678
    assert fuzzyEqual(diag, expected, B1Thre)

    calculator = MultirefPredict.diagnostic_factory("A25PBE", molecule=qcelemental_water)
    diag = calculator.computeDiagnostic()
    A25PBEThre = 1e-6
    expected = 0.1626572016077259
    assert fuzzyEqual(diag, expected, A25PBEThre)
Exemplo n.º 2
0
def test_diagnostic_factory_TAE(qcelemental_water):
    calculator = MultirefPredict.diagnostic_factory("TAE",
                                                    molecule=qcelemental_water)
    diag = calculator.computeDiagnostic()
    TAEThre = 1e-6
    expected = 0.28078682517214126
    assert compare_recursive(diag, expected, atol=TAEThre)
Exemplo n.º 3
0
def test_diagnostic_factory_A25PBE(qcelemental_water):
    calculator = MultirefPredict.diagnostic_factory("A25PBE",
                                                    molecule=qcelemental_water)
    diag = calculator.computeDiagnostic()
    A25PBEThre = 1e-6
    expected = 0.1626572016077259
    assert compare_recursive(diag, expected, atol=A25PBEThre)
Exemplo n.º 4
0
def test_diagnostic_factory_B1(qcelemental_water):
    calculator = MultirefPredict.diagnostic_factory("B1",
                                                    molecule=qcelemental_water)
    diag = calculator.computeDiagnostic()
    B1Thre = 1e-6
    expected = 0.006334860365228678
    assert compare_recursive(diag, expected, atol=B1Thre)
Exemplo n.º 5
0
def test_diagnostic_factory_D2(qcelemental_water):
    Thre = 1e-6
    calculator = MultirefPredict.diagnostic_factory("D2",
                                                    molecule=qcelemental_water)
    diag = calculator.computeDiagnostic()
    expected = {
        'T1': 0.005903453140867589,
        'D1': 0.012965638464472996,
        'D2': 0.12885433260716933,
        'New D1': 0.012965638464472996
    }
    print(diag)
    assert compare_recursive(diag, expected, atol=Thre)
Exemplo n.º 6
0
def run_fod_timeout(mol, name):
    ca0_path = wfndir+"/"+name+".ca0"
    cb0_path = wfndir+"/"+name+".cb0"
    c0_path = wfndir+"/"+name+".c0"
    if os.path.exists(ca0_path) and os.path.exists(cb0_path):
        c0_path = ""
    elif os.path.exists(c0_path):
        ca0_path = ""
        cb0_path = ""
    else:
        c0_path=""
        ca0_path = ""
        cb0_path = ""
    mywfn = [ca0_path, cb0_path, c0_path]
    fon = MultirefPredict.diagnostic_factory("FOD", molecule=mol,
            program='terachem', molname=name, record=True, wfn = mywfn,
            extras=['scr/geometry.molden'])
    fon.computeDiagnostic("b3lyp")
import MultirefPredict

diagnostics_list = ["B1", "A25PBE"]

input_dict = {"xyzfile": "./geo.xyz",
              "molname": "geo",
              "charge": 0,
              "spinmult": 1,
              "rundir": './',
              "program": 'psi4',
              "record": True}
for diag in diagnostics_list:
    MultirefPredict.diagnostic_factory(diag, **input_dict).computeDiagnostic()