From 85afcc44cac96f3da01c6c50e1c87dbb7d642037 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 22:54:59 -0400 Subject: [PATCH] suff --- qcengine/programs/tests/test_canonical_config.py | 7 +------ qcengine/programs/tests/test_standard_suite.py | 14 +++++++------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/qcengine/programs/tests/test_canonical_config.py b/qcengine/programs/tests/test_canonical_config.py index a16f56bf..72023850 100644 --- a/qcengine/programs/tests/test_canonical_config.py +++ b/qcengine/programs/tests/test_canonical_config.py @@ -184,7 +184,7 @@ def test_local_options_scratch(program, model, keywords): "psi4": rf"Scratch directory: {scratch_directory}/tmp\w+_psi_scratch/", } if sys.platform.startswith("win"): - #stdout_ref["psi4"] = f"Scratch directory: {str(Path(scratch_directory))}" + # too hard to regex Windows paths that need escape chars stdout_ref["psi4"] = f"Scratch directory: " # a scratch file (preferrably output) expected after job if scratch not cleaned up @@ -207,11 +207,6 @@ def test_local_options_scratch(program, model, keywords): sample_file = list(Path(scratch_directory).glob(scratch_sample[program])) assert len(sample_file) == 1, f"Scratch sample not found: {scratch_sample[program]} in {scratch_directory}" - print(f"sample_file={sample_file}") - print(f"stdout_ref={stdout_ref['psi4']}") - for ln in ret.stdout.split("\n"): - if ln.startswith("Scratch directory:"): - print(ln) assert re.search(stdout_ref[program], ret.stdout), f"Scratch pattern not found: {stdout_ref[program]}" diff --git a/qcengine/programs/tests/test_standard_suite.py b/qcengine/programs/tests/test_standard_suite.py index 8702304b..e2d3dae1 100644 --- a/qcengine/programs/tests/test_standard_suite.py +++ b/qcengine/programs/tests/test_standard_suite.py @@ -312,13 +312,13 @@ def test_hf_hessian_module(inp, dertype, basis, subjects, clsd_open_pmols, reque pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_conv": 12}, }, id="mp2 uhf ae: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf", "mp2__nacore": 0}, }, id="mp2 uhf ae: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__uhf": True}, }, id="mp2 uhf ae: nwchem-tce", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="mp2 uhf ae: nwchem-tce", marks=using("nwchem")), pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True}, }, id="mp2 uhf ae: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "mp2_type": "conv"}, }, id="mp2 uhf ae: psi4", marks=using("psi4_mp2qcsk")), pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"reference": "uhf", "dropmo": 1, "scf_conv": 12}, }, id="mp2 uhf fc: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "uhf", "fcae": "fc", "keywords": {"contrl__scftyp": "uhf"}, }, id="mp2 uhf fc: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1, "scf__uhf": True}, }, id="mp2 uhf fc: nwchem-tce", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1, "scf__uhf": True, "scf__thresh": 1.0e-8},}, id="mp2 uhf fc: nwchem-tce", marks=using("nwchem")), pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"scf__uhf": True, "mp2__freeze": 1}, }, id="mp2 uhf fc: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "uhf", "fcae": "fc", "keywords": {"reference": "uhf", "freeze_core": True, "mp2_type": "conv"}, }, id="mp2 uhf fc: psi4", marks=using("psi4_mp2qcsk")), pytest.param({"call": "qchem", "reference": "uhf", "fcae": "fc", "keywords": {"N_frozen_CORE": "fC"}, }, id="mp2 uhf fc: qchem", marks=using("qchem")), @@ -332,7 +332,7 @@ def test_hf_hessian_module(inp, dertype, basis, subjects, clsd_open_pmols, reque pytest.param({"call": "cfour", "reference": "rohf", "fcae": "fc", "keywords": {"reference": "rohf", "dropmo": 1, "scf_conv": 12}, }, id="mp2 rohf fc: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "rohf", "fcae": "fc", "keywords": {"contrl__scftyp": "rohf", "mp2__ospt": "RMP"}, }, id="mp2 rohf fc: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1, "scf__rohf": True}, "wrong": {0: _w1 }}, id="mp2 rohf fc: nwchem-tce", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1, "scf__rohf": True, "scf__thresh": 1.0e-8},"wrong": {0: _w1 }}, id="mp2 rohf fc: nwchem-tce", marks=using("nwchem")), pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "keywords": {"scf__rohf": True, "mp2__freeze": 1}, "error": {0: _q1 }}, id="mp2 rohf fc: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "rohf", "fcae": "fc", "keywords": {"reference": "rohf", "freeze_core": True, "mp2_type": "conv"}, }, id="mp2 rohf fc: psi4", marks=using("psi4_mp2qcsk")), # yapf: enable @@ -394,7 +394,7 @@ def test_mp2_energy_module(inp, dertype, basis, subjects, clsd_open_pmols, reque pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"REFerence": "UHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc"}, }, id="ccsd uhf ae: cfour-ecc", marks=using("cfour")), # pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf"}, }, id="ccsd uhf ae: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf", "ccinp__ncore": 0}, "error": {0: _q2 }}, id="ccsd uhf ae: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__uhf": True}, }, id="ccsd uhf ae: nwchem-tce", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="ccsd uhf ae: nwchem-tce", marks=using("nwchem")), pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True}, "error": {0: _q3 }}, id="ccsd uhf ae: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf"}, }, id="ccsd uhf ae: psi4", marks=using("psi4_mp2qcsk")), @@ -402,7 +402,7 @@ def test_mp2_energy_module(inp, dertype, basis, subjects, clsd_open_pmols, reque pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"dropmo": [1], "REFerence": "UHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc"}, }, id="ccsd uhf fc: cfour-ecc", marks=using("cfour")), # pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"dropmo": 1, "reference": "uhf"}, }, id="ccsd uhf fc: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "uhf", "fcae": "fc", "keywords": {"contrl__scftyp": "uhf"}, "error": {0: _q2 }}, id="ccsd uhf fc: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"tce__freeze": 1, "qc_module": "tce", "scf__uhf": True}, }, id="ccsd uhf fc: nwchem-tce", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"tce__freeze": 1, "qc_module": "tce", "scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="ccsd uhf fc: nwchem-tce", marks=using("nwchem")), pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"ccsd__freeze": 1, "scf__uhf": True}, "error": {0: _q3 }}, id="ccsd uhf fc: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "uhf", "fcae": "fc", "keywords": {"freeze_core": True, "reference": "uhf"}, }, id="ccsd uhf fc: psi4", marks=using("psi4_mp2qcsk")), @@ -410,7 +410,7 @@ def test_mp2_energy_module(inp, dertype, basis, subjects, clsd_open_pmols, reque pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"REFerence": "roHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc"}, }, id="ccsd rohf ae: cfour-ecc", marks=using("cfour")), # pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf"}, }, id="ccsd rohf ae: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "rohf", "fcae": "ae", "keywords": {"contrl__scftyp": "rohf", "ccinp__ncore": 0, "ccinp__maxcc": 50}, }, id="ccsd rohf ae: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__rohf": True}, }, id="ccsd rohf ae: nwchem-tce", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__rohf": True, "scf__thresh": 1.0e-8}, }, id="ccsd rohf ae: nwchem-tce", marks=using("nwchem")), pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True}, "error": {0: _q3 }}, id="ccsd rohf ae: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "rohf", "fcae": "ae", "sdsc": "sd", "keywords": {"reference": "rohf", "qc_module": "ccenergy"}, }, id="ccsd rohf ae: psi4", marks=using("psi4_mp2qcsk")), # TODO another way for ccenergy? (fc, too) @@ -418,7 +418,7 @@ def test_mp2_energy_module(inp, dertype, basis, subjects, clsd_open_pmols, reque pytest.param({"call": "cfour", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"dropmo": [1], "REFerence": "roHF", "SCF_CONV": 12, "CC_CONV": 12, "orbitals": 0, "cc_program": "ecc"}, }, id="ccsd rohf fc: cfour-ecc", marks=using("cfour")), # pytest.param({"call": "cfour", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"dropmo": 1, "reference": "rohf", "orbitals": 0}, }, id="ccsd rohf fc: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "rohf", "fcae": "fc", "keywords": {"contrl__scftyp": "rohf", "ccinp__iconv": 9, "scf__conv": 9}, "wrong": {0: _w2 }}, id="ccsd rohf fc: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"tce__freeze": 1, "qc_module": "tce", "scf__rohf": True}, }, id="ccsd rohf fc: nwchem-tce", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"tce__freeze": 1, "qc_module": "tce", "scf__rohf": True, "scf__thresh": 1.0e-8}, }, id="ccsd rohf fc: nwchem-tce", marks=using("nwchem")), pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "keywords": {"ccsd__freeze": 1, "scf__rohf": True}, "error": {0: _q3 }}, id="ccsd rohf fc: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"e_convergence": 8, "r_convergence": 7, "freeze_core": True, "reference": "rohf", "qc_module": "ccenergy"}, }, id="ccsd rohf fc: psi4", marks=using("psi4_mp2qcsk")), # yapf: enable