From d1fffe7a83f33c215eab19b3fd14844f6cad7282 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Tue, 24 Oct 2023 13:38:51 -0400 Subject: [PATCH 01/41] fix? --- devtools/conda-envs/nwchem.yaml | 1 + docs/source/changelog.rst | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/devtools/conda-envs/nwchem.yaml b/devtools/conda-envs/nwchem.yaml index e86623e79..2a39fb7d9 100644 --- a/devtools/conda-envs/nwchem.yaml +++ b/devtools/conda-envs/nwchem.yaml @@ -10,6 +10,7 @@ dependencies: - qcelemental >=0.24.0 - pydantic>=1.0.0 - networkx>=2.4.0 + - importlib-resources # Testing - pytest diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 70833c1c2..cb65b8a0b 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -43,14 +43,14 @@ Enhancements Bug Fixes +++++++++ +- (:pr:`427`) Config - Once again, expand environment variables (now more flexibly) and newly expand ``~`` + passed into TaskConfig. Particularly relevant for scratch setting. @yueyericardo Misc. +++++ MUST (Unmerged) +++++++++++++++ -- UNMERGED (:pr:`427`) Config - Once again, expand environment variables (now more flexibly) and newly expand ``~`` - passed into TaskConfig. Particularly relevant for scratch setting. v0.28.1 / 2023-08-18 From e4a4475bfb3f40041667a55ff52eb3cf62490392 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Tue, 24 Oct 2023 14:22:39 -0400 Subject: [PATCH 02/41] experiment --- .github/workflows/CI.yml | 22 ++++++++++++++++- .github/workflows/Lint.yml | 2 +- devtools/conda-envs/nwchem.yaml | 1 - devtools/conda-envs/openmmrc.yaml | 26 +++++++++++++++++++ devtools/conda-envs/opt-disp-cf.yaml | 37 ++++++++++++++++++++++++++++ 5 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 devtools/conda-envs/openmmrc.yaml create mode 100644 devtools/conda-envs/opt-disp-cf.yaml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bc69efa06..8f7cb559c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,11 +34,21 @@ jobs: label: ANI runs-on: ubuntu-latest + - conda-env: torchani + python-version: 3.12 + label: ANI + runs-on: windows-latest + - conda-env: openmm python-version: 3.8 label: OpenMM runs-on: ubuntu-latest + - conda-env: openmmrc + python-version: 3.12 + label: OpenMM + runs-on: windows-latest + - conda-env: xtb python-version: "3.10" label: xTB @@ -55,6 +65,11 @@ jobs: runs-on: ubuntu-20.04 # formerly NWChem v6.6 with python-version: 3.6 & runs-on: ubuntu-16.04 but ubuntu env retired by GH Sep 2021 + - conda-env: nwchem + python-version: 3.12 + label: NWChem + runs-on: ubuntu-20.04 + - conda-env: mrchem python-version: 3.8 label: MRChem @@ -70,7 +85,12 @@ jobs: label: optimization-dispersion runs-on: ubuntu-latest - name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }}" # • ${{ matrix.cfg.runs-on }}" + - conda-env: opt-disp-cf + python-version: 3.11 + label: optimization-dispersion + runs-on: windows-latest + + name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}" runs-on: ${{ matrix.cfg.runs-on }} steps: diff --git a/.github/workflows/Lint.yml b/.github/workflows/Lint.yml index 489ca4461..a47db4298 100644 --- a/.github/workflows/Lint.yml +++ b/.github/workflows/Lint.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7] + python-version: [3.10] steps: - uses: actions/checkout@v1 diff --git a/devtools/conda-envs/nwchem.yaml b/devtools/conda-envs/nwchem.yaml index 2a39fb7d9..e86623e79 100644 --- a/devtools/conda-envs/nwchem.yaml +++ b/devtools/conda-envs/nwchem.yaml @@ -10,7 +10,6 @@ dependencies: - qcelemental >=0.24.0 - pydantic>=1.0.0 - networkx>=2.4.0 - - importlib-resources # Testing - pytest diff --git a/devtools/conda-envs/openmmrc.yaml b/devtools/conda-envs/openmmrc.yaml new file mode 100644 index 000000000..128ad8907 --- /dev/null +++ b/devtools/conda-envs/openmmrc.yaml @@ -0,0 +1,26 @@ +name: test +channels: + - conda-forge/label/openmm_rc + - conda-forge +dependencies: + - rdkit + - openmm + - openff-toolkit + - openff-forcefields + - openmmforcefields + - geometric + - torsiondrive + + # Core + - python + - pyyaml + - py-cpuinfo + - psutil + - qcelemental >=0.11.1 + - pydantic >=1.8.2 + - pint <0.22 + + # Testing + - pytest + - pytest-cov + - codecov diff --git a/devtools/conda-envs/opt-disp-cf.yaml b/devtools/conda-envs/opt-disp-cf.yaml new file mode 100644 index 000000000..ca69da05c --- /dev/null +++ b/devtools/conda-envs/opt-disp-cf.yaml @@ -0,0 +1,37 @@ +name: test +channels: + - conda-forge/label/libint_dev + - conda-forge + - nodefaults +dependencies: + - psi4 + - libblas=*=mkl # not needed but an example of disuading solver from openblas and old psi + - rdkit + - mopac + + # Mixed Tests + - dftd3-python + - dftd4-python=3.3.0 + - psi4/label/dev::mp2d >=1.1 + - gcp + - geometric + - optking + - pymdi + + # Core + - python + - pyyaml + - py-cpuinfo + - psutil + - qcelemental >=0.26.0 + - pydantic>=1.0.0 + - msgpack-python + + # Testing + - pytest + - pytest-cov + - codecov + + - pip + - pip: + - pyberny From 50b4374380b5aea18be44fa21c26d2d035278528 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Tue, 24 Oct 2023 14:52:31 -0400 Subject: [PATCH 03/41] round --- .github/workflows/CI.yml | 7 +------ .github/workflows/Lint.yml | 6 +++--- devtools/conda-envs/opt-disp-cf.yaml | 7 +++---- qcengine/programs/qchem.py | 2 +- qcengine/programs/turbomole/harvester.py | 18 +++++++++--------- qcengine/programs/turbomole/runner.py | 8 ++++---- 6 files changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8f7cb559c..96e461ff1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,11 +34,6 @@ jobs: label: ANI runs-on: ubuntu-latest - - conda-env: torchani - python-version: 3.12 - label: ANI - runs-on: windows-latest - - conda-env: openmm python-version: 3.8 label: OpenMM @@ -47,7 +42,7 @@ jobs: - conda-env: openmmrc python-version: 3.12 label: OpenMM - runs-on: windows-latest + runs-on: ubuntu-latest - conda-env: xtb python-version: "3.10" diff --git a/.github/workflows/Lint.yml b/.github/workflows/Lint.yml index a47db4298..8d4121b1f 100644 --- a/.github/workflows/Lint.yml +++ b/.github/workflows/Lint.yml @@ -16,12 +16,12 @@ jobs: python-version: [3.10] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Python Setup - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: "${{ matrix.python-version }}" - name: Create Environment shell: bash diff --git a/devtools/conda-envs/opt-disp-cf.yaml b/devtools/conda-envs/opt-disp-cf.yaml index ca69da05c..88491272f 100644 --- a/devtools/conda-envs/opt-disp-cf.yaml +++ b/devtools/conda-envs/opt-disp-cf.yaml @@ -2,17 +2,16 @@ name: test channels: - conda-forge/label/libint_dev - conda-forge - - nodefaults + - defaults dependencies: - psi4 - - libblas=*=mkl # not needed but an example of disuading solver from openblas and old psi - rdkit - mopac # Mixed Tests - dftd3-python - - dftd4-python=3.3.0 - - psi4/label/dev::mp2d >=1.1 + - dftd4-python + - psi4::mp2d >=1.1.0 - gcp - geometric - optking diff --git a/qcengine/programs/qchem.py b/qcengine/programs/qchem.py index 79a03bdc8..0a743e115 100644 --- a/qcengine/programs/qchem.py +++ b/qcengine/programs/qchem.py @@ -358,7 +358,7 @@ def _parse_logfile_common(self, outtext: str, input_dict: Dict[str, Any]): properties["calcinfo_natom"] = len(input_dict["molecule"]["symbols"]) - mobj = re.search(r"\n\s*(\d+)\s+" + NUMBER + "\s+" + NUMBER + r"\s+Convergence criterion met\s*\n", outtext) + mobj = re.search(r"\n\s*(\d+)\s+" + NUMBER + r"\s+" + NUMBER + r"\s+Convergence criterion met\s*\n", outtext) if mobj: properties["scf_iterations"] = int(mobj.group(1)) diff --git a/qcengine/programs/turbomole/harvester.py b/qcengine/programs/turbomole/harvester.py index 19a22b9a3..0637a78c8 100644 --- a/qcengine/programs/turbomole/harvester.py +++ b/qcengine/programs/turbomole/harvester.py @@ -8,7 +8,7 @@ def parse_decimal(regex, text, method="search"): - with_float = re.compile(regex + "([\d\-\.]+)") + with_float = re.compile(regex + r"([\d\-\.]+)") matches = getattr(with_float, method)(text) if method == "search": @@ -21,7 +21,7 @@ def parse_reference_energy(stdout: str): energy_dict = PreservingDict() # Total energy from dscf or ridft - total_energy_re = re.compile("total energy\s+=\s+([\d\-\.]+)") + total_energy_re = re.compile(r"total energy\s+=\s+([\d\-\.]+)") mobj = total_energy_re.search(stdout) total_energy = Decimal(mobj[1]) @@ -46,9 +46,9 @@ def parse_ricc2(stdout: str): # As CC2 starts from a MP2 guess that is also reported there may be # multiple matches for the following regex. Thats why we capture all # matches with 'findall'. - matches = parse_decimal("Final (.+?) energy\s+:\s+", stdout, "findall") + matches = parse_decimal(r"Final (.+?) energy\s+:\s+", stdout, "findall") if len(matches) == 0: - matches = parse_decimal("E(MP2)\s+:\s+", stdout, "search") + matches = parse_decimal(r"E(MP2)\s+:\s+", stdout, "search") ricc2_dict["CURRENT ENERGY"] = matches[-1][1] @@ -57,11 +57,11 @@ def parse_ricc2(stdout: str): def parse_gradient(gradient): grad_re = re.compile( - "\$grad.+" - "cycle =\s+(?P\d+)\s+" - "(?P.+?) energy =\s+(?P[\d\.\-]+)\s+" - "\|dE/dxyz\| =\s+(?P[\d\.]+)" - "(?P.+)\$end", + r"\$grad.+" + r"cycle =\s+(?P\d+)\s+" + r"(?P.+?) energy =\s+(?P[\d\.\-]+)\s+" + r"\|dE/dxyz\| =\s+(?P[\d\.]+)" + r"(?P.+)\$end", re.DOTALL, ) mobj = grad_re.match(gradient) diff --git a/qcengine/programs/turbomole/runner.py b/qcengine/programs/turbomole/runner.py index 8c56e73a6..43e2139e2 100644 --- a/qcengine/programs/turbomole/runner.py +++ b/qcengine/programs/turbomole/runner.py @@ -51,7 +51,7 @@ def get_version(self) -> str: tmpdir = Path(tmpdir) stdout = execute_define("\n", cwd=tmpdir) # Tested with V7.3 and V7.4.0 - version_re = re.compile("TURBOMOLE (?:rev\. )?(V.+?)\s+") + version_re = re.compile(r"TURBOMOLE (?:rev\. )?(V.+?)\s+") mobj = version_re.search(stdout) version = mobj[1] self.version_cache[which_prog] = safe_version(version) @@ -77,7 +77,7 @@ def sub_control(self, control, pattern, repl, **kwargs): return control_subbed def append_control(self, control, to_append): - return self.sub_control(control, "\$end", f"{to_append}\n$end") + return self.sub_control(control, r"\$end", f"{to_append}\n$end") def build_input( self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None @@ -164,7 +164,7 @@ def build_input( ricore = mem_mb * ri_fraction ri_per_core = int(ricore / config.ncores) # Update $ricore entry in the control file - control = self.sub_control(control, "\$ricore\s+(\d+)", f"$ricore {ri_per_core} MiB per_core") + control = self.sub_control(control, r"\$ricore\s+(\d+)", f"$ricore {ri_per_core} MiB per_core") # Calculate remaining memory maxcor = mem_mb - ricore assert maxcor > 0, "Not enough memory for maxcor! Need {-maxcor} MB more!" @@ -172,7 +172,7 @@ def build_input( # maxcore per_core per_core = int(maxcor / config.ncores) # Update $maxcor entry in the control file - control = self.sub_control(control, "\$maxcor\s+(\d+)\s+MiB\s+per_core", f"$maxcor {per_core} MiB per_core") + control = self.sub_control(control, r"\$maxcor\s+(\d+)\s+MiB\s+per_core", f"$maxcor {per_core} MiB per_core") ############################ # DETERMINE SHELL COMMANDS # From 5c155b95ce3f48c11cb465ac0b6c548c6594fb8f Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Tue, 24 Oct 2023 18:59:54 -0400 Subject: [PATCH 04/41] qcer --- .github/workflows/Lint.yml | 2 +- devtools/conda-envs/opt-disp-cf.yaml | 3 +-- qcengine/testing.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Lint.yml b/.github/workflows/Lint.yml index 8d4121b1f..a6579f3cd 100644 --- a/.github/workflows/Lint.yml +++ b/.github/workflows/Lint.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.10] + python-version: ["3.10"] steps: - uses: actions/checkout@v4 diff --git a/devtools/conda-envs/opt-disp-cf.yaml b/devtools/conda-envs/opt-disp-cf.yaml index 88491272f..18222ae94 100644 --- a/devtools/conda-envs/opt-disp-cf.yaml +++ b/devtools/conda-envs/opt-disp-cf.yaml @@ -2,7 +2,7 @@ name: test channels: - conda-forge/label/libint_dev - conda-forge - - defaults + - nodefaults dependencies: - psi4 - rdkit @@ -11,7 +11,6 @@ dependencies: # Mixed Tests - dftd3-python - dftd4-python - - psi4::mp2d >=1.1.0 - gcp - geometric - optking diff --git a/qcengine/testing.py b/qcengine/testing.py index 3f7ff1ff7..d16755855 100644 --- a/qcengine/testing.py +++ b/qcengine/testing.py @@ -12,7 +12,7 @@ import qcengine as qcng -QCENGINE_RECORDS_COMMIT = "0e2fdb4" +QCENGINE_RECORDS_COMMIT = "19b843b" def _check_qcenginerecords(return_data=False): From 0ab51cbd39da05012a807fee3d9bf710d195ec46 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 00:18:21 -0400 Subject: [PATCH 05/41] more sutff --- .github/workflows/CI.yml | 4 ++-- devtools/conda-envs/opt-disp-cf.yaml | 2 +- docs/source/changelog.rst | 3 ++- setup.py | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 96e461ff1..75f37a446 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -39,8 +39,8 @@ jobs: label: OpenMM runs-on: ubuntu-latest - - conda-env: openmmrc - python-version: 3.12 + - conda-env: openmm + python-version: 3.11 label: OpenMM runs-on: ubuntu-latest diff --git a/devtools/conda-envs/opt-disp-cf.yaml b/devtools/conda-envs/opt-disp-cf.yaml index 18222ae94..2a1e35caa 100644 --- a/devtools/conda-envs/opt-disp-cf.yaml +++ b/devtools/conda-envs/opt-disp-cf.yaml @@ -11,7 +11,7 @@ dependencies: # Mixed Tests - dftd3-python - dftd4-python - - gcp + - gcp-correction - geometric - optking - pymdi diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index cb65b8a0b..358ad7c5c 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -29,7 +29,7 @@ Changelog .. - UNSOLVED (:issue:`397`) extras failed -v0.28.2 / 2023-MM-DD (Unreleased) +v0.29.0 / 2023-MM-DD (Unreleased) -------------------- Breaking Changes @@ -45,6 +45,7 @@ Bug Fixes +++++++++ - (:pr:`427`) Config - Once again, expand environment variables (now more flexibly) and newly expand ``~`` passed into TaskConfig. Particularly relevant for scratch setting. @yueyericardo +- (:pr:`428`) MDI - Ensure that molecule orientation remains fixed for MDI. @taylor-a-barnes Misc. +++++ diff --git a/setup.py b/setup.py index 92965b94c..d5a268c10 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ cmdclass=versioneer.get_cmdclass(), packages=setuptools.find_packages(), setup_requires=[] + pytest_runner, - install_requires=["pyyaml", "py-cpuinfo", "psutil", "qcelemental>=0.24.0,<0.27.0", "pydantic>=1.8.2"], + install_requires=["pyyaml", "py-cpuinfo", "psutil", "qcelemental>=0.24.0,<0.28.0", "pydantic>=1.8.2"], entry_points={"console_scripts": ["qcengine=qcengine.cli:main"]}, extras_require={ "docs": [ @@ -52,6 +52,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], zip_safe=False, long_description=long_description, From 0198114fb4195508b02426454839f02e8c509ff3 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 00:34:19 -0400 Subject: [PATCH 06/41] next --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 75f37a446..9174be57e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -133,7 +133,7 @@ jobs: # QCEngine CI and Psi4 are circularly dependent, so a hack is in order - name: Special Config - Faux Pydantic Upgrade - if: "(matrix.cfg.label == 'Psi4-nightly') || (matrix.cfg.label == 'optimization-dispersion')" + if: "((matrix.cfg.label == 'Psi4-nightly') || (matrix.cfg.label == 'optimization-dispersion')) && (runner.os != 'Windows')" run: | sed -i s/from\ pydantic\ /from\ pydantic.v1\ /g ${CONDA_PREFIX}/lib/python${{ matrix.cfg.python-version }}/site-packages/psi4/driver/*py From 40307aebe15fabab459b3cef98c07e2788bf42d6 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 02:33:26 -0400 Subject: [PATCH 07/41] asdf --- .github/workflows/CI.yml | 10 ++++++++++ devtools/conda-envs/psi-cf.yaml | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 devtools/conda-envs/psi-cf.yaml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9174be57e..c01bf44ec 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,6 +29,16 @@ jobs: label: Psi4-nightly runs-on: ubuntu-latest + - conda-env: psi-cf + python-version: "3.12" + label: Psi4-cf + runs-on: ubuntu-latest + + - conda-env: psi-cf + python-version: "3.12" + label: Psi4-cf + runs-on: windows-latest + - conda-env: torchani python-version: 3.8 label: ANI diff --git a/devtools/conda-envs/psi-cf.yaml b/devtools/conda-envs/psi-cf.yaml new file mode 100644 index 000000000..e179d7f5e --- /dev/null +++ b/devtools/conda-envs/psi-cf.yaml @@ -0,0 +1,21 @@ +name: test +channels: + - conda-forge + - conda-forge/label/libint_dev + - psi4/label/testing +dependencies: + - psi4 + + # Core + - python + - pyyaml + - py-cpuinfo + - psutil + - qcelemental >=0.27.0 + - pydantic>=1.10.13 + - msgpack-python + + # Testing + - pytest + - pytest-cov + - codecov From 6876aa8407840d226bab5f25dfe59e3192b8e141 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 02:59:31 -0400 Subject: [PATCH 08/41] alt --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c01bf44ec..0d21051f8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -134,6 +134,11 @@ jobs: # conda remove qcelemental --force # python -m pip install qcelemental>=0.26.0 --no-deps + - name: Special Config - QCElemental Dep + run: | + conda remove qcelemental --force + python -m pip install 'git+https://github.com/MolSSI/QCElemental.git@loriab-patch-2' --no-deps + # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 - name: Special Config - QCEngine Dep From f469249c29060da46eccc86d0e39e00eefdfb486 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 09:47:50 -0400 Subject: [PATCH 09/41] probe --- .github/workflows/CI.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0d21051f8..2625cc329 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -139,6 +139,15 @@ jobs: conda remove qcelemental --force python -m pip install 'git+https://github.com/MolSSI/QCElemental.git@loriab-patch-2' --no-deps + - name: Which Testing + shell: python + run: | + import qcelemental as qcel + import psi4 + print(f'{qcel.util.which("psi4.bat")=}") + print(f'{qcel.util.which("psi4.exe")=}') + print(f'{qcel.util.which("psi4")=}') + # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 - name: Special Config - QCEngine Dep From fa847f525a980dad3e69b9d2936706032b85e0a1 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 09:50:29 -0400 Subject: [PATCH 10/41] fix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2625cc329..af1908324 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -144,7 +144,7 @@ jobs: run: | import qcelemental as qcel import psi4 - print(f'{qcel.util.which("psi4.bat")=}") + print(f'{qcel.util.which("psi4.bat")=}') print(f'{qcel.util.which("psi4.exe")=}') print(f'{qcel.util.which("psi4")=}') From 5a593bb3ff67d3d7e805e3dedd0d294b3e4d52a0 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 10:02:43 -0400 Subject: [PATCH 11/41] rework --- .github/workflows/CI.yml | 72 ++-------------------------------------- 1 file changed, 3 insertions(+), 69 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index af1908324..eb2e02dd9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,15 +19,7 @@ jobs: fail-fast: false matrix: cfg: - - conda-env: psi - python-version: 3.7 - label: Psi4-release - runs-on: ubuntu-latest - - conda-env: psi-nightly - python-version: "3.10" - label: Psi4-nightly - runs-on: ubuntu-latest - conda-env: psi-cf python-version: "3.12" @@ -39,61 +31,6 @@ jobs: label: Psi4-cf runs-on: windows-latest - - conda-env: torchani - python-version: 3.8 - label: ANI - runs-on: ubuntu-latest - - - conda-env: openmm - python-version: 3.8 - label: OpenMM - runs-on: ubuntu-latest - - - conda-env: openmm - python-version: 3.11 - label: OpenMM - runs-on: ubuntu-latest - - - conda-env: xtb - python-version: "3.10" - label: xTB - runs-on: ubuntu-latest - - - conda-env: qcore - python-version: 3.7 - label: QCore - runs-on: ubuntu-latest - - - conda-env: nwchem - python-version: 3.8 - label: NWChem - runs-on: ubuntu-20.04 - # formerly NWChem v6.6 with python-version: 3.6 & runs-on: ubuntu-16.04 but ubuntu env retired by GH Sep 2021 - - - conda-env: nwchem - python-version: 3.12 - label: NWChem - runs-on: ubuntu-20.04 - - - conda-env: mrchem - python-version: 3.8 - label: MRChem - runs-on: ubuntu-latest - - - conda-env: adcc - python-version: 3.8 - label: ADCC - runs-on: ubuntu-latest - - - conda-env: opt-disp - python-version: 3.8 - label: optimization-dispersion - runs-on: ubuntu-latest - - - conda-env: opt-disp-cf - python-version: 3.11 - label: optimization-dispersion - runs-on: windows-latest name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}" runs-on: ${{ matrix.cfg.runs-on }} @@ -140,13 +77,10 @@ jobs: python -m pip install 'git+https://github.com/MolSSI/QCElemental.git@loriab-patch-2' --no-deps - name: Which Testing - shell: python run: | - import qcelemental as qcel - import psi4 - print(f'{qcel.util.which("psi4.bat")=}') - print(f'{qcel.util.which("psi4.exe")=}') - print(f'{qcel.util.which("psi4")=}') + python -c 'import qcelemental as qc; print(qcel.util.which("psi4.bat"))' + python -c 'import qcelemental as qc; print(qcel.util.which("psi4.exe"))' + python -c 'import qcelemental as qc; print(qcel.util.which("psi4"))' # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 From 106872bd2bd32e9a8ef8514ec00a078e33a04259 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 10:06:00 -0400 Subject: [PATCH 12/41] spell --- .github/workflows/CI.yml | 6 +++--- docs/source/changelog.rst | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index eb2e02dd9..3aea82a79 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -78,9 +78,9 @@ jobs: - name: Which Testing run: | - python -c 'import qcelemental as qc; print(qcel.util.which("psi4.bat"))' - python -c 'import qcelemental as qc; print(qcel.util.which("psi4.exe"))' - python -c 'import qcelemental as qc; print(qcel.util.which("psi4"))' + python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.bat"))' + python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.exe"))' + python -c 'import qcelemental as qcel; print(qcel.util.which("psi4"))' # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 358ad7c5c..1ce1a7b81 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -52,6 +52,7 @@ Misc. MUST (Unmerged) +++++++++++++++ +- (:pr:`433`) v0.28.1 / 2023-08-18 From ee8a22aeebbedc2f0103fc99f64e11f3dca1cfd9 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 10:15:07 -0400 Subject: [PATCH 13/41] progress --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3aea82a79..5cdb1b78b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,6 +81,7 @@ jobs: python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.bat"))' python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.exe"))' python -c 'import qcelemental as qcel; print(qcel.util.which("psi4"))' + python -c 'import qcelemental as qcel; print(qcel.util.which("ls"))' # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 From e660f2a69e99697b8a897d416bdf74b43b55f880 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 16:17:25 -0400 Subject: [PATCH 14/41] more --- .github/workflows/CI.yml | 15 ++++++++------- qcengine/programs/psi4.py | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5cdb1b78b..5d5da81fc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -76,13 +76,6 @@ jobs: conda remove qcelemental --force python -m pip install 'git+https://github.com/MolSSI/QCElemental.git@loriab-patch-2' --no-deps - - name: Which Testing - run: | - python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.bat"))' - python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.exe"))' - python -c 'import qcelemental as qcel; print(qcel.util.which("psi4"))' - python -c 'import qcelemental as qcel; print(qcel.util.which("ls"))' - # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 - name: Special Config - QCEngine Dep @@ -105,6 +98,14 @@ jobs: run: | python -m pip install . --no-deps + - name: Which Testing + run: | + python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.bat"))' + python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.exe"))' + python -c 'import qcelemental as qcel; print(qcel.util.which("psi4"))' + python -c 'import qcelemental as qcel; print(qcel.util.which("ls"))' + python -c "import qcengine as qcng; qcng.get_program('psi4')" + - name: QCEngineRecords run: | qcengine info diff --git a/qcengine/programs/psi4.py b/qcengine/programs/psi4.py index 1ba3d7fac..8ce22ef64 100644 --- a/qcengine/programs/psi4.py +++ b/qcengine/programs/psi4.py @@ -248,12 +248,14 @@ def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicRe "--qcschema", "data.msgpack", ] + print(f"{run_cmd=}") if config.scratch_messy: run_cmd.append("--messy") input_files = {"data.msgpack": input_model.serialize("msgpack-ext")} success, output = execute( run_cmd, input_files, ["data.msgpack"], as_binary=["data.msgpack"], scratch_directory=tmpdir ) + print("AAAA", success, output) if success: output_data = deserialize(output["outfiles"]["data.msgpack"], "msgpack-ext") else: From bfba6c6957b3dbb325716864d8925ec1a5b42192 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 16:50:04 -0400 Subject: [PATCH 15/41] deeper --- .github/workflows/CI.yml | 5 +++-- qcengine/programs/psi4.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5d5da81fc..a9cc8d973 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -104,9 +104,10 @@ jobs: python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.exe"))' python -c 'import qcelemental as qcel; print(qcel.util.which("psi4"))' python -c 'import qcelemental as qcel; print(qcel.util.which("ls"))' - python -c "import qcengine as qcng; qcng.get_program('psi4')" + python -c "import qcengine as qcng; pf = qcng.get_program('psi4'); print(pf.found(), pf.get_version())" - name: QCEngineRecords + if: false run: | qcengine info export QCER_VER=`python -c "import qcengine.testing; print(qcengine.testing.QCENGINE_RECORDS_COMMIT)"` @@ -115,7 +116,7 @@ jobs: - name: PyTest run: | - pytest -rws -v --cov=qcengine --color=yes --cov-report=xml qcengine/ + pytest -rws -v --cov=qcengine -k "grd1 or tricky" --color=yes --cov-report=xml qcengine/ - name: CodeCov uses: codecov/codecov-action@v3 diff --git a/qcengine/programs/psi4.py b/qcengine/programs/psi4.py index 8ce22ef64..c6ad1c6a6 100644 --- a/qcengine/programs/psi4.py +++ b/qcengine/programs/psi4.py @@ -255,7 +255,7 @@ def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicRe success, output = execute( run_cmd, input_files, ["data.msgpack"], as_binary=["data.msgpack"], scratch_directory=tmpdir ) - print("AAAA", success, output) + print("AAAA", success, output, deserialize(output["outfiles"]["data.msgpack"], "msgpack-ext")) if success: output_data = deserialize(output["outfiles"]["data.msgpack"], "msgpack-ext") else: From bfda5112ab33bf818aa124170215eeb691e9fabc Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 17:34:57 -0400 Subject: [PATCH 16/41] explciit call --- .github/workflows/CI.yml | 50 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a9cc8d973..dda7a2164 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -114,9 +114,57 @@ jobs: pip install git+https://github.com/MolSSI/QCEngineRecords.git@${QCER_VER}#egg=qcenginerecords python -c "import qcengine; print(qcengine.config.global_repr())" + - name: Misc + run: | + cat > labelfail.py < Date: Wed, 25 Oct 2023 18:04:08 -0400 Subject: [PATCH 17/41] abc --- .github/workflows/CI.yml | 102 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dda7a2164..0cf6059b1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -114,9 +114,9 @@ jobs: pip install git+https://github.com/MolSSI/QCEngineRecords.git@${QCER_VER}#egg=qcenginerecords python -c "import qcengine; print(qcengine.config.global_repr())" - - name: Misc + - name: Misc A run: | - cat > labelfail.py < labelfailA.py < labelfailB.py < labelfailC.py < Date: Wed, 25 Oct 2023 18:09:29 -0400 Subject: [PATCH 18/41] prog --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0cf6059b1..4d44c74ef 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -141,7 +141,7 @@ jobs: ) atres = psi4.schema_wrapper.run_qcschema(atin) - #atres = qcng.compute(atin, qcprog) + #atres = qcng.compute(atin, "psi4") pprint.pprint(atres.dict(), width=200) nre = 1.0828427 @@ -189,7 +189,7 @@ jobs: ) #atres = psi4.schema_wrapper.run_qcschema(atin) - atres = qcng.compute(atin, qcprog) + atres = qcng.compute(atin, "psi4") pprint.pprint(atres.dict(), width=200) nre = 1.0828427 @@ -237,7 +237,7 @@ jobs: ) #atres = psi4.schema_wrapper.run_qcschema(atin) - atres = qcng.compute(atin, qcprog) + atres = qcng.compute(atin, "psi4") pprint.pprint(atres.dict(), width=200) nre = 1.0828427 From be543a807880d17c9e0020b558d4308c7d798b9f Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 18:55:59 -0400 Subject: [PATCH 19/41] execute --- .github/workflows/CI.yml | 49 +++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4d44c74ef..7aefae5a7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -162,10 +162,11 @@ jobs: EOF python labelfailA.py - - name: Misc B + - name: Misc D run: | - cat > labelfailB.py < labelfailD.py < labelfailC.py < labelfailC.py < labelfailB.py < Date: Wed, 25 Oct 2023 22:42:25 -0400 Subject: [PATCH 20/41] ef --- .github/workflows/CI.yml | 78 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7aefae5a7..cf5e32aea 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -188,13 +188,85 @@ jobs: atin = qcel.models.AtomicInput( **{"molecule": kmol, "model": {"method": "mp2", "basis": "aug-cc-pvdz"}, "driver": "energy", "keywords": {"scf_type": "pk", "mp2_type": "conv"}} ) - input_files = {"data.json": atin.json()} - success, output = qcng.util.execute([qcel.util.which("psi4"), "--qcschema", "data.json"], input_files, ["data.json"]) + input_files = {"dataD.json": atin.json()} + run_cmd = [qcel.util.which("psi4"), "--qcschema", "dataD.json"] + print(f"{run_cmd=}") + success, output = qcng.util.execute(run_cmd, input_files, ["dataD.json"]) print("BBBB", success, output) - print("CCCC", qcel.util.deserialize(output["outfiles"]["data.json"], "json")) + print("CCCC", qcel.util.deserialize(output["outfiles"]["dataD.json"], "json")) EOF python labelfailD.py + - name: Misc E + run: | + cat > labelfailE.py < labelfailF.py < labelfailC.py < Date: Wed, 25 Oct 2023 23:08:52 -0400 Subject: [PATCH 21/41] gh --- .github/workflows/CI.yml | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cf5e32aea..2faccf1ea 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -267,6 +267,78 @@ jobs: EOF python labelfailF.py + - name: Misc G + run: | + cat > labelfailG.py < labelfailH.py < labelfailC.py < Date: Wed, 25 Oct 2023 23:15:26 -0400 Subject: [PATCH 22/41] fix h --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2faccf1ea..aff2d15e2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -329,7 +329,7 @@ jobs: **{"molecule": kmol, "model": {"method": "mp2", "basis": "aug-cc-pvdz"}, "driver": "energy", "keywords": {"scf_type": "pk", "mp2_type": "conv"}} ) input_files = {"dataH.msgpack": atin.serialize("msgpack-ext")} - with temporary_directory(suffix="_psi_scratch", messy=True) as tmpdir: + with qcng.util.temporary_directory(suffix="_psi_scratch", messy=True) as tmpdir: run_cmd = [qcel.util.which("psi4"), '--nthread', '1', '--memory', '2.375GiB', '--qcschema', 'dataH.msgpack', '--messy', "--scratch", str(tmpdir)] print(f"{run_cmd=}") success, output = qcng.util.execute(run_cmd, input_files, ["dataH.msgpack"], as_binary=["dataH.msgpack"], From 2350bf270e6ca0645b4139f05dc9a80bf1edf8b1 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 25 Oct 2023 23:31:53 -0400 Subject: [PATCH 23/41] ij --- .github/workflows/CI.yml | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index aff2d15e2..28543132c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -339,6 +339,91 @@ jobs: EOF python labelfailH.py + - name: Misc I + run: | + cat > labelfailI.py < labelfailJ.py < labelfailC.py < Date: Wed, 25 Oct 2023 23:49:21 -0400 Subject: [PATCH 24/41] l --- .github/workflows/CI.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 28543132c..4136049df 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -194,6 +194,7 @@ jobs: success, output = qcng.util.execute(run_cmd, input_files, ["dataD.json"]) print("BBBB", success, output) print("CCCC", qcel.util.deserialize(output["outfiles"]["dataD.json"], "json")) + assert success EOF python labelfailD.py @@ -229,6 +230,7 @@ jobs: success, output = qcng.util.execute(run_cmd, input_files, ["dataE.json"]) print("BBBB", success, output) print("CCCC", qcel.util.deserialize(output["outfiles"]["dataE.json"], "json")) + assert success EOF python labelfailE.py @@ -264,9 +266,46 @@ jobs: success, output = qcng.util.execute(run_cmd, input_files, ["dataF.msgpack"], as_binary=["dataF.msgpack"]) print("BBBB", success, output) print("CCCC", qcel.util.deserialize(output["outfiles"]["dataF.msgpack"], "msgpack-ext")) + assert success EOF python labelfailF.py + - name: Misc L + run: | + cat > labelfailL.py < labelfailG.py < Date: Thu, 26 Oct 2023 00:11:42 -0400 Subject: [PATCH 25/41] m --- .github/workflows/CI.yml | 51 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4136049df..728c9e6f9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -306,6 +306,55 @@ jobs: EOF python labelfailL.py + - name: Misc M + run: | + cat > labelfailM.py < labelfailG.py < Date: Thu, 26 Oct 2023 00:27:52 -0400 Subject: [PATCH 26/41] b1c1 --- .github/workflows/CI.yml | 108 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 728c9e6f9..a1ee3fcff 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -163,6 +163,7 @@ jobs: python labelfailA.py - name: Misc D + if: false run: | cat > labelfailD.py < labelfailE.py < labelfailF.py < labelfailL.py < labelfailM.py < labelfailG.py < labelfailH.py < labelfailI.py < labelfailJ.py < labelfailC1.py < labelfailB1.py < labelfailC.py < Date: Thu, 26 Oct 2023 00:46:21 -0400 Subject: [PATCH 27/41] b1 --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1ee3fcff..23f6d2a40 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -601,7 +601,6 @@ jobs: ) #atres = psi4.schema_wrapper.run_qcschema(atin) - atres = qcng.compute(atin, "psi4") atres = qcng.compute(atin, "psi4", task_config={"memory": 1.0}) pprint.pprint(atres.dict(), width=200) From 40fb9a22e0bd5e23dc6536fa00676b0e751246d2 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 01:24:17 -0400 Subject: [PATCH 28/41] full tests --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 23f6d2a40..dab623108 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -723,7 +723,7 @@ jobs: - name: PyTest run: | - pytest -rws -v --cov=qcengine -k "label" --color=yes --cov-report=xml qcengine/ + pytest -rws -v --cov=qcengine --color=yes --cov-report=xml qcengine/ - name: CodeCov uses: codecov/codecov-action@v3 From 22eef016583ae4004280b82ebc2f3210bf89093f Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 01:56:51 -0400 Subject: [PATCH 29/41] no hes2 --- .github/workflows/CI.yml | 2 +- qcengine/programs/psi4.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dab623108..0be213323 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -723,7 +723,7 @@ jobs: - name: PyTest run: | - pytest -rws -v --cov=qcengine --color=yes --cov-report=xml qcengine/ + pytest -rws -v -k "not hes2" --cov=qcengine --color=yes --cov-report=xml qcengine/ - name: CodeCov uses: codecov/codecov-action@v3 diff --git a/qcengine/programs/psi4.py b/qcengine/programs/psi4.py index c6ad1c6a6..1ba3d7fac 100644 --- a/qcengine/programs/psi4.py +++ b/qcengine/programs/psi4.py @@ -248,14 +248,12 @@ def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicRe "--qcschema", "data.msgpack", ] - print(f"{run_cmd=}") if config.scratch_messy: run_cmd.append("--messy") input_files = {"data.msgpack": input_model.serialize("msgpack-ext")} success, output = execute( run_cmd, input_files, ["data.msgpack"], as_binary=["data.msgpack"], scratch_directory=tmpdir ) - print("AAAA", success, output, deserialize(output["outfiles"]["data.msgpack"], "msgpack-ext")) if success: output_data = deserialize(output["outfiles"]["data.msgpack"], "msgpack-ext") else: From c3a5381a3b2931c5cddf54f0bb8befa03805a328 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 17:13:41 -0400 Subject: [PATCH 30/41] fixup --- .github/workflows/CI.yml | 63 +++++++++++++++++++++++++++++++++++++++ docs/source/changelog.rst | 5 +++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0be213323..bdd1d1b08 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,7 +19,15 @@ jobs: fail-fast: false matrix: cfg: + - conda-env: psi + python-version: 3.7 + label: Psi4-release + runs-on: ubuntu-latest + - conda-env: psi-nightly + python-version: "3.10" + label: Psi4-nightly + runs-on: ubuntu-latest - conda-env: psi-cf python-version: "3.12" @@ -31,6 +39,61 @@ jobs: label: Psi4-cf runs-on: windows-latest + - conda-env: torchani + python-version: 3.8 + label: ANI + runs-on: ubuntu-latest + + - conda-env: openmm + python-version: 3.8 + label: OpenMM + runs-on: ubuntu-latest + + - conda-env: openmm + python-version: 3.11 + label: OpenMM + runs-on: ubuntu-latest + + - conda-env: xtb + python-version: "3.10" + label: xTB + runs-on: ubuntu-latest + + - conda-env: qcore + python-version: 3.7 + label: QCore + runs-on: ubuntu-latest + + - conda-env: nwchem + python-version: 3.8 + label: NWChem + runs-on: ubuntu-20.04 + # formerly NWChem v6.6 with python-version: 3.6 & runs-on: ubuntu-16.04 but ubuntu env retired by GH Sep 2021 + + - conda-env: nwchem + python-version: 3.12 + label: NWChem + runs-on: ubuntu-20.04 + + - conda-env: mrchem + python-version: 3.8 + label: MRChem + runs-on: ubuntu-latest + + - conda-env: adcc + python-version: 3.8 + label: ADCC + runs-on: ubuntu-latest + + - conda-env: opt-disp + python-version: 3.8 + label: optimization-dispersion + runs-on: ubuntu-latest + + - conda-env: opt-disp-cf + python-version: 3.11 + label: optimization-dispersion + runs-on: windows-latest name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}" runs-on: ${{ matrix.cfg.runs-on }} diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 1ce1a7b81..c8f561c35 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -25,7 +25,6 @@ Changelog .. WIP (Unmerged) .. ++++++++++++++ .. - UNMERGED (:pr:`421`) GAMESS - error handling and memory @taylor-a-barnes -.. - UNMERGED (:pr:`405`, :issue:`415`, :pr:`417`) Config - change default `jobs_per_node` from 2 to more expected 1 so a single job fills the node. Alter CPU count formula to return physical cores on Hyerthreading machines, affecting default `ncores`. The net effect (both changes) for default cores running on Hyperthreading machines is unchanged. @cvsik, @loriab .. - UNSOLVED (:issue:`397`) extras failed @@ -46,6 +45,10 @@ Bug Fixes - (:pr:`427`) Config - Once again, expand environment variables (now more flexibly) and newly expand ``~`` passed into TaskConfig. Particularly relevant for scratch setting. @yueyericardo - (:pr:`428`) MDI - Ensure that molecule orientation remains fixed for MDI. @taylor-a-barnes +- (:pr:`405`, :issue:`415`, :pr:`417`) Config - change default ``jobs_per_node`` from 2 to more expected 1 + so a single job fills the node. Alter CPU count formula to return physical cores on Hyerthreading + machines, affecting default ``ncores``. The net effect (both changes) for default cores running on + Hyperthreading machines is unchanged. @cvsik, @loriab Misc. +++++ From 5ea56996fcb10263b0e9e8d2d89c33dfd2b3296c Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 17:58:08 -0400 Subject: [PATCH 31/41] last win --- .github/workflows/CI.yml | 13 ++----------- devtools/conda-envs/psi-nightly.yaml | 2 +- qcengine/programs/tests/test_canonical_config.py | 5 +++++ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bdd1d1b08..02cac8787 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -21,12 +21,12 @@ jobs: cfg: - conda-env: psi python-version: 3.7 - label: Psi4-release + label: Psi4-1.5 runs-on: ubuntu-latest - conda-env: psi-nightly python-version: "3.10" - label: Psi4-nightly + label: Psi4-1.6 runs-on: ubuntu-latest - conda-env: psi-cf @@ -161,16 +161,7 @@ jobs: run: | python -m pip install . --no-deps - - name: Which Testing - run: | - python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.bat"))' - python -c 'import qcelemental as qcel; print(qcel.util.which("psi4.exe"))' - python -c 'import qcelemental as qcel; print(qcel.util.which("psi4"))' - python -c 'import qcelemental as qcel; print(qcel.util.which("ls"))' - python -c "import qcengine as qcng; pf = qcng.get_program('psi4'); print(pf.found(), pf.get_version())" - - name: QCEngineRecords - if: false run: | qcengine info export QCER_VER=`python -c "import qcengine.testing; print(qcengine.testing.QCENGINE_RECORDS_COMMIT)"` diff --git a/devtools/conda-envs/psi-nightly.yaml b/devtools/conda-envs/psi-nightly.yaml index b175ec049..04d408993 100644 --- a/devtools/conda-envs/psi-nightly.yaml +++ b/devtools/conda-envs/psi-nightly.yaml @@ -3,7 +3,7 @@ channels: - psi4/label/dev - conda-forge dependencies: - - psi4 + - psi4=1.6 - blas=*=mkl # not needed but an example of disuading solver from openblas and old psi # Core diff --git a/qcengine/programs/tests/test_canonical_config.py b/qcengine/programs/tests/test_canonical_config.py index 192a4ea7b..1dd06c87b 100644 --- a/qcengine/programs/tests/test_canonical_config.py +++ b/qcengine/programs/tests/test_canonical_config.py @@ -203,6 +203,11 @@ 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=}") + print(f"{stdout_ref['psi4']=}") + for ln in ret.stdout: + if ln.startswith("Scratch directory:"): + print(ln) assert re.search(stdout_ref[program], ret.stdout), f"Scratch pattern not found: {stdout_ref[program]}" From fe3e4d038793920e02e7c39b3d54e8f9f2842ae8 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 18:33:32 -0400 Subject: [PATCH 32/41] escape --- .github/workflows/CI.yml | 628 +----------------- .../programs/tests/test_canonical_config.py | 4 +- 2 files changed, 21 insertions(+), 611 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 02cac8787..46f9428fd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,77 +23,92 @@ jobs: python-version: 3.7 label: Psi4-1.5 runs-on: ubuntu-latest + pytest: "" - conda-env: psi-nightly python-version: "3.10" label: Psi4-1.6 runs-on: ubuntu-latest + pytest: "" - conda-env: psi-cf python-version: "3.12" label: Psi4-cf runs-on: ubuntu-latest + pytest: "" - conda-env: psi-cf python-version: "3.12" label: Psi4-cf runs-on: windows-latest + pytest: "'not hes2'" - conda-env: torchani python-version: 3.8 label: ANI runs-on: ubuntu-latest + pytest: "" - conda-env: openmm python-version: 3.8 label: OpenMM runs-on: ubuntu-latest + pytest: "" - conda-env: openmm python-version: 3.11 label: OpenMM runs-on: ubuntu-latest + pytest: "" - conda-env: xtb python-version: "3.10" label: xTB runs-on: ubuntu-latest + pytest: "" - conda-env: qcore python-version: 3.7 label: QCore runs-on: ubuntu-latest + pytest: "" - conda-env: nwchem python-version: 3.8 label: NWChem runs-on: ubuntu-20.04 + pytest: "" # formerly NWChem v6.6 with python-version: 3.6 & runs-on: ubuntu-16.04 but ubuntu env retired by GH Sep 2021 - conda-env: nwchem python-version: 3.12 label: NWChem runs-on: ubuntu-20.04 + pytest: "" - conda-env: mrchem python-version: 3.8 label: MRChem runs-on: ubuntu-latest + pytest: "" - conda-env: adcc python-version: 3.8 label: ADCC runs-on: ubuntu-latest + pytest: "" - conda-env: opt-disp python-version: 3.8 label: optimization-dispersion runs-on: ubuntu-latest + pytest: "" - conda-env: opt-disp-cf python-version: 3.11 label: optimization-dispersion runs-on: windows-latest + pytest: "'not hes2'" name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}" runs-on: ${{ matrix.cfg.runs-on }} @@ -142,13 +157,13 @@ jobs: # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 - name: Special Config - QCEngine Dep - if: "(matrix.cfg.label == 'Psi4-nightly') || (matrix.cfg.label == 'ADCC') || (matrix.cfg.label == 'optimization-dispersion')" + if: "(matrix.cfg.label == 'Psi4-1.6') || (matrix.cfg.label == 'ADCC') || (matrix.cfg.label == 'optimization-dispersion')" run: | conda remove qcengine --force # QCEngine CI and Psi4 are circularly dependent, so a hack is in order - name: Special Config - Faux Pydantic Upgrade - if: "((matrix.cfg.label == 'Psi4-nightly') || (matrix.cfg.label == 'optimization-dispersion')) && (runner.os != 'Windows')" + if: "((matrix.cfg.label == 'Psi4-1.6') || (matrix.cfg.label == 'optimization-dispersion')) && (runner.os != 'Windows')" run: | sed -i s/from\ pydantic\ /from\ pydantic.v1\ /g ${CONDA_PREFIX}/lib/python${{ matrix.cfg.python-version }}/site-packages/psi4/driver/*py @@ -168,616 +183,9 @@ jobs: pip install git+https://github.com/MolSSI/QCEngineRecords.git@${QCER_VER}#egg=qcenginerecords python -c "import qcengine; print(qcengine.config.global_repr())" - - name: Misc A - run: | - cat > labelfailA.py < labelfailD.py < labelfailE.py < labelfailF.py < labelfailL.py < labelfailM.py < labelfailG.py < labelfailH.py < labelfailI.py < labelfailJ.py < labelfailC1.py < labelfailB1.py < labelfailC.py < labelfailB.py < Date: Thu, 26 Oct 2023 18:51:28 -0400 Subject: [PATCH 33/41] again --- .github/workflows/CI.yml | 7 ++++--- qcengine/programs/tests/test_canonical_config.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 46f9428fd..e1ac69b58 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,7 +41,8 @@ jobs: python-version: "3.12" label: Psi4-cf runs-on: windows-latest - pytest: "'not hes2'" + #pytest: "-k 'not hes2'" + pytest: "-k 'scratch'" - conda-env: torchani python-version: 3.8 @@ -108,7 +109,7 @@ jobs: python-version: 3.11 label: optimization-dispersion runs-on: windows-latest - pytest: "'not hes2'" + pytest: "-k 'not hes2'" name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}" runs-on: ${{ matrix.cfg.runs-on }} @@ -185,7 +186,7 @@ jobs: - name: PyTest run: | - pytest -rws -v -k ${{ matrix.cfg.pytest }} --cov=qcengine --color=yes --cov-report=xml qcengine/ + pytest -rws -v ${{ matrix.cfg.pytest }} --cov=qcengine --color=yes --cov-report=xml qcengine/ - name: CodeCov uses: codecov/codecov-action@v3 diff --git a/qcengine/programs/tests/test_canonical_config.py b/qcengine/programs/tests/test_canonical_config.py index ce628e4cc..313c1f84d 100644 --- a/qcengine/programs/tests/test_canonical_config.py +++ b/qcengine/programs/tests/test_canonical_config.py @@ -3,6 +3,7 @@ """ import pprint import re +import sys import tempfile from pathlib import Path From 247f760b9a5c98573336e9a6dcb3733d913ea0d6 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 20:38:47 -0400 Subject: [PATCH 34/41] more --- qcengine/programs/tests/test_canonical_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcengine/programs/tests/test_canonical_config.py b/qcengine/programs/tests/test_canonical_config.py index 313c1f84d..0a77f89f1 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"] = rf"Scratch directory: {scratch_directory}" + stdout_ref["psi4"] = rf"Scratch directory: {str(Path(scratch_directory))}" # a scratch file (preferrably output) expected after job if scratch not cleaned up scratch_sample = { @@ -206,8 +206,8 @@ 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=}") - print(f"{stdout_ref['psi4']=}") + 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) From 80af97ef233840f903db8a2b189df2818bb12d47 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 21:27:12 -0400 Subject: [PATCH 35/41] asdf --- .github/workflows/CI.yml | 13 ++++--------- devtools/conda-envs/nwchem.yaml | 2 ++ qcengine/programs/tests/test_canonical_config.py | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e1ac69b58..ce11cf65b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -134,7 +134,8 @@ jobs: # note: any activate/deactivate use the conda cmd. other cmds use mamba cmd. - name: Special Config - NWChem - if: "(matrix.cfg.label == 'NWChem')" + if: false + #if: "(matrix.cfg.label == 'NWChem')" run: | sudo apt-get -y install nwchem @@ -143,14 +144,8 @@ jobs: run: | qcore --accept-license - # note: psi4 on c-f pins to a single qcel and qcng, so this may be handy for solve-and-replace - #- name: Special Config - QCElemental Dep - # if: (matrix.cfg.label == 'ADCC') - # run: | - # conda remove qcelemental --force - # python -m pip install qcelemental>=0.26.0 --no-deps - - name: Special Config - QCElemental Dep + if: false run: | conda remove qcelemental --force python -m pip install 'git+https://github.com/MolSSI/QCElemental.git@loriab-patch-2' --no-deps @@ -158,7 +153,7 @@ jobs: # note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412 # alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75 - name: Special Config - QCEngine Dep - if: "(matrix.cfg.label == 'Psi4-1.6') || (matrix.cfg.label == 'ADCC') || (matrix.cfg.label == 'optimization-dispersion')" + if: "(startsWith(matrix.cfg.label, 'Psi4')) || (matrix.cfg.label == 'ADCC') || (matrix.cfg.label == 'optimization-dispersion')" run: | conda remove qcengine --force diff --git a/devtools/conda-envs/nwchem.yaml b/devtools/conda-envs/nwchem.yaml index e86623e79..8f4683fcc 100644 --- a/devtools/conda-envs/nwchem.yaml +++ b/devtools/conda-envs/nwchem.yaml @@ -2,6 +2,8 @@ name: test channels: - conda-forge dependencies: + - nwchem + # Core - python - pyyaml diff --git a/qcengine/programs/tests/test_canonical_config.py b/qcengine/programs/tests/test_canonical_config.py index 0a77f89f1..45fa29b44 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"] = rf"Scratch directory: {str(Path(scratch_directory))}" + stdout_ref["psi4"] = f"Scratch directory: {str(Path(scratch_directory))}" # a scratch file (preferrably output) expected after job if scratch not cleaned up scratch_sample = { From ed9f1f84680e4802ec80d0d6472340533db153de Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 22:09:30 -0400 Subject: [PATCH 36/41] nwc --- qcengine/programs/tests/test_canonical_config.py | 3 ++- qcengine/programs/tests/test_standard_suite.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qcengine/programs/tests/test_canonical_config.py b/qcengine/programs/tests/test_canonical_config.py index 45fa29b44..a16f56bfd 100644 --- a/qcengine/programs/tests/test_canonical_config.py +++ b/qcengine/programs/tests/test_canonical_config.py @@ -184,7 +184,8 @@ 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))}" + #stdout_ref["psi4"] = f"Scratch directory: {str(Path(scratch_directory))}" + stdout_ref["psi4"] = f"Scratch directory: " # a scratch file (preferrably output) expected after job if scratch not cleaned up scratch_sample = { diff --git a/qcengine/programs/tests/test_standard_suite.py b/qcengine/programs/tests/test_standard_suite.py index ba9a00bb5..8702304b1 100644 --- a/qcengine/programs/tests/test_standard_suite.py +++ b/qcengine/programs/tests/test_standard_suite.py @@ -148,12 +148,12 @@ def _trans_key(qc, bas, key): pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_conv": 12}, }, id="hf uhf ae: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf"}, }, id="hf uhf ae: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True}, }, id="hf uhf ae: nwchem", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="hf uhf ae: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_type": "pk"}, }, id="hf uhf ae: psi4", marks=using("psi4_mp2qcsk")), pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_conv": 12}, }, id="hf rohf ae: cfour", marks=using("cfour")), pytest.param({"call": "gamess", "reference": "rohf", "fcae": "ae", "keywords": {"contrl__scftyp": "rohf"}, }, id="hf rohf ae: gamess", marks=using("gamess")), - pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True}, }, id="hf rohf ae: nwchem", marks=using("nwchem")), + pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True, "scf__thresh": 1.0e-8}, }, id="hf rohf ae: nwchem", marks=using("nwchem")), pytest.param({"call": "psi4", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_type": "pk"}, }, id="hf rohf ae: psi4", marks=using("psi4_mp2qcsk")), # yapf: enable ], From 85afcc44cac96f3da01c6c50e1c87dbb7d642037 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 26 Oct 2023 22:54:59 -0400 Subject: [PATCH 37/41] 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 a16f56bfd..72023850a 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 8702304b1..e2d3dae16 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 From df5905055dda1c93fbd10749794e2e357315a8d4 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Fri, 27 Oct 2023 00:37:27 -0400 Subject: [PATCH 38/41] more --- .github/workflows/CI.yml | 18 +++++------------- devtools/conda-envs/nwchem-cf.yaml | 19 +++++++++++++++++++ devtools/conda-envs/nwchem.yaml | 2 -- devtools/conda-envs/openmmrc.yaml | 26 -------------------------- devtools/conda-envs/opt-disp-cf.yaml | 2 +- 5 files changed, 25 insertions(+), 42 deletions(-) create mode 100644 devtools/conda-envs/nwchem-cf.yaml delete mode 100644 devtools/conda-envs/openmmrc.yaml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ce11cf65b..d6af4712d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,8 +41,7 @@ jobs: python-version: "3.12" label: Psi4-cf runs-on: windows-latest - #pytest: "-k 'not hes2'" - pytest: "-k 'scratch'" + pytest: "-k 'not hes2'" - conda-env: torchani python-version: 3.8 @@ -56,12 +55,6 @@ jobs: runs-on: ubuntu-latest pytest: "" - - conda-env: openmm - python-version: 3.11 - label: OpenMM - runs-on: ubuntu-latest - pytest: "" - - conda-env: xtb python-version: "3.10" label: xTB @@ -76,15 +69,15 @@ jobs: - conda-env: nwchem python-version: 3.8 - label: NWChem + label: NWChem70 runs-on: ubuntu-20.04 pytest: "" # formerly NWChem v6.6 with python-version: 3.6 & runs-on: ubuntu-16.04 but ubuntu env retired by GH Sep 2021 - - conda-env: nwchem + - conda-env: nwchem-cf python-version: 3.12 label: NWChem - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest pytest: "" - conda-env: mrchem @@ -134,8 +127,7 @@ jobs: # note: any activate/deactivate use the conda cmd. other cmds use mamba cmd. - name: Special Config - NWChem - if: false - #if: "(matrix.cfg.label == 'NWChem')" + if: "(matrix.cfg.label == 'NWChem70')" run: | sudo apt-get -y install nwchem diff --git a/devtools/conda-envs/nwchem-cf.yaml b/devtools/conda-envs/nwchem-cf.yaml new file mode 100644 index 000000000..8f4683fcc --- /dev/null +++ b/devtools/conda-envs/nwchem-cf.yaml @@ -0,0 +1,19 @@ +name: test +channels: + - conda-forge +dependencies: + - nwchem + + # Core + - python + - pyyaml + - py-cpuinfo + - psutil + - qcelemental >=0.24.0 + - pydantic>=1.0.0 + - networkx>=2.4.0 + + # Testing + - pytest + - pytest-cov + - codecov diff --git a/devtools/conda-envs/nwchem.yaml b/devtools/conda-envs/nwchem.yaml index 8f4683fcc..e86623e79 100644 --- a/devtools/conda-envs/nwchem.yaml +++ b/devtools/conda-envs/nwchem.yaml @@ -2,8 +2,6 @@ name: test channels: - conda-forge dependencies: - - nwchem - # Core - python - pyyaml diff --git a/devtools/conda-envs/openmmrc.yaml b/devtools/conda-envs/openmmrc.yaml deleted file mode 100644 index 128ad8907..000000000 --- a/devtools/conda-envs/openmmrc.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: test -channels: - - conda-forge/label/openmm_rc - - conda-forge -dependencies: - - rdkit - - openmm - - openff-toolkit - - openff-forcefields - - openmmforcefields - - geometric - - torsiondrive - - # Core - - python - - pyyaml - - py-cpuinfo - - psutil - - qcelemental >=0.11.1 - - pydantic >=1.8.2 - - pint <0.22 - - # Testing - - pytest - - pytest-cov - - codecov diff --git a/devtools/conda-envs/opt-disp-cf.yaml b/devtools/conda-envs/opt-disp-cf.yaml index 2a1e35caa..ff0fb1e09 100644 --- a/devtools/conda-envs/opt-disp-cf.yaml +++ b/devtools/conda-envs/opt-disp-cf.yaml @@ -22,7 +22,7 @@ dependencies: - py-cpuinfo - psutil - qcelemental >=0.26.0 - - pydantic>=1.0.0 + - pydantic=1.10.13 - msgpack-python # Testing From f73a33b242d043af35cdcadae6f93deaf6c46ffb Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Fri, 27 Oct 2023 01:24:16 -0400 Subject: [PATCH 39/41] log --- .github/workflows/CI.yml | 4 ++-- docs/source/changelog.rst | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d6af4712d..3c149c7dc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,7 +41,7 @@ jobs: python-version: "3.12" label: Psi4-cf runs-on: windows-latest - pytest: "-k 'not hes2'" + pytest: "-k 'not (hes2 or qchem)'" - conda-env: torchani python-version: 3.8 @@ -102,7 +102,7 @@ jobs: python-version: 3.11 label: optimization-dispersion runs-on: windows-latest - pytest: "-k 'not hes2'" + pytest: "-k 'not (hes2 or qchem)'" name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}" runs-on: ${{ matrix.cfg.runs-on }} diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index c8f561c35..00aa9f247 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -49,9 +49,11 @@ Bug Fixes so a single job fills the node. Alter CPU count formula to return physical cores on Hyerthreading machines, affecting default ``ncores``. The net effect (both changes) for default cores running on Hyperthreading machines is unchanged. @cvsik, @loriab +UNMERGED - (:pr:`433`) Turbomole, Q-Chem - Use raw strings when needed to avoid py312 warnings. Misc. +++++ +UNMERGED - (:pr:`433`) CI - Check py312 and some Windows lanes. MUST (Unmerged) +++++++++++++++ From c5ac871764e9fb3788b7c09a3b3064c669811c35 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Fri, 27 Oct 2023 13:54:50 -0400 Subject: [PATCH 40/41] new p4 packages --- .github/workflows/CI.yml | 2 +- devtools/conda-envs/psi-cf.yaml | 5 +---- docs/source/changelog.rst | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3c149c7dc..f667425b5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -39,7 +39,7 @@ jobs: - conda-env: psi-cf python-version: "3.12" - label: Psi4-cf + label: Psi4-1.8 runs-on: windows-latest pytest: "-k 'not (hes2 or qchem)'" diff --git a/devtools/conda-envs/psi-cf.yaml b/devtools/conda-envs/psi-cf.yaml index e179d7f5e..e28e200ad 100644 --- a/devtools/conda-envs/psi-cf.yaml +++ b/devtools/conda-envs/psi-cf.yaml @@ -2,17 +2,14 @@ name: test channels: - conda-forge - conda-forge/label/libint_dev - - psi4/label/testing dependencies: - - psi4 + - psi4=1.8 # Core - python - pyyaml - py-cpuinfo - psutil - - qcelemental >=0.27.0 - - pydantic>=1.10.13 - msgpack-python # Testing diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 00aa9f247..0b25fcee7 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -57,7 +57,6 @@ UNMERGED - (:pr:`433`) CI - Check py312 and some Windows lanes. MUST (Unmerged) +++++++++++++++ -- (:pr:`433`) v0.28.1 / 2023-08-18 From bde053c23f4e5c030ceb08247ca0e15b09636da9 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Fri, 27 Oct 2023 14:15:37 -0400 Subject: [PATCH 41/41] remove lane --- .github/workflows/CI.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f667425b5..25b331cf5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,12 +31,6 @@ jobs: runs-on: ubuntu-latest pytest: "" - - conda-env: psi-cf - python-version: "3.12" - label: Psi4-cf - runs-on: ubuntu-latest - pytest: "" - - conda-env: psi-cf python-version: "3.12" label: Psi4-1.8