diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 7d0711328..00be749d2 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -41,6 +41,8 @@ Enhancements ++++++++++++ - (:pr:`463`) Maint - Pin to QCElemental <0.70 since we now know QCSchema v2 release schedule. - (:pr:`463`) MACE - New v0.3.9 release yields a pytorch error, so recommend pymace=0.3.6 . +- (:pr:`464`, :issue:`447`) CFOUR - Allow CC-PVDZ alias basis specification. Also fix the PwCVXZ + basis keyword. @philipmnel Bug Fixes +++++++++ diff --git a/qcengine/programs/cfour/keywords.py b/qcengine/programs/cfour/keywords.py index 41f323554..86df83520 100644 --- a/qcengine/programs/cfour/keywords.py +++ b/qcengine/programs/cfour/keywords.py @@ -59,6 +59,20 @@ def format_keyword(keyword: str, val: Any) -> Tuple[str, str]: ]: text = str(val.lower()) + # Transform the basis sets that *must* be mixedcase + + # * manual: (keyword is cc-pVXZ or PVXZ, where X = D, T, Q, 5, and 6, respectively) + elif keyword in ["CFOUR_BASIS", "BASIS"] and val.upper() in [ + "CC-PVDZ", "CC-PVTZ", "CC-PVQZ", "CC-PV5Z", "CC-PV6Z", + ]: + text = val[:4].lower() + val[4:].upper() + + # manual: (keyword is PwCVXZ, where X = D, T, and Q, respectively) + elif keyword in ["CFOUR_BASIS", "BASIS"] and val.upper() in [ + "PWCVDZ", "PWCVTZ", "PWCVQZ" + ]: + text = "Pw" + val[3:].upper() + # Transform the methods that *must* be mixed case elif keyword in ["CFOUR_CALC_LEVEL", "CALC_LEVEL"] and val.upper() == "CCSDT-1B": text = "CCSDT-1b" diff --git a/qcengine/programs/tests/test_standard_suite_hf.py b/qcengine/programs/tests/test_standard_suite_hf.py index 8a6356acd..d09163b57 100644 --- a/qcengine/programs/tests/test_standard_suite_hf.py +++ b/qcengine/programs/tests/test_standard_suite_hf.py @@ -35,6 +35,7 @@ def nh2(): @pytest.mark.parametrize( "program,basis,keywords", [ + pytest.param("cfour", "cC-pvdZ", {"scf_conv": 12}, marks=using("cfour")), # test basis handling, not results pytest.param("cfour", "aug-pvdz", {"scf_conv": 12}, marks=using("cfour")), pytest.param("cfour", "aug-pvdz", {}, marks=using("cfour")), pytest.param( @@ -66,6 +67,9 @@ def test_sp_hf_rhf(program, basis, keywords, h2o): assert "provenance" in res assert res["success"] is True + if basis == "cC-pvdZ": + return + # aug-cc-pvdz scf_tot = -76.0413815332