Skip to content

Commit

Permalink
suff
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Oct 27, 2023
1 parent ed9f1f8 commit 85afcc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
7 changes: 1 addition & 6 deletions qcengine/programs/tests/test_canonical_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]}"


Expand Down
14 changes: 7 additions & 7 deletions qcengine/programs/tests/test_standard_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand All @@ -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
Expand Down Expand Up @@ -394,31 +394,31 @@ 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")),
pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"dropmo": [1], "REFerence": "UHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "vcc", "print": 2}, }, id="ccsd uhf fc: cfour-vcc", marks=using("cfour")),
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")),
pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"REFerence": "roHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "vcc", "print": 2}, }, id="ccsd rohf ae: cfour-vcc", marks=using("cfour")),
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)
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": "vcc", "print": 2}, }, id="ccsd rohf fc: cfour-vcc", marks=using("cfour")),
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
Expand Down

0 comments on commit 85afcc4

Please sign in to comment.