diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index 98db567a4..000000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,175 +0,0 @@ -name: CI - -on: - push: - branches: - - "main" - pull_request: - branches: - - "main" - schedule: - - cron: "21 0 * * *" - workflow_dispatch: - -defaults: - run: - shell: bash -l {0} - -jobs: - test: - if: (github.event_name == 'schedule' && github.repository == 'openforcefield/openff-toolkit') || (github.event_name != 'schedule') - name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }}, NAGL=${{ matrix.nagl }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - python-version: ["3.12", "3.13"] - rdkit: [true, false] - openeye: [true, false] - nagl: [true, false] - exclude: - - rdkit: false - openeye: false - - openeye: true - python-version: "3.13" - - rdkit: false - nagl: true - - env: - OE_LICENSE: ${{ github.workspace }}/oe_license.txt - PYTEST_ARGS: -r fE --tb=short -nauto - COV: --cov=openff/toolkit/ --cov-append --cov-report=xml - - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Set environment variables - run: | - if [[ ${{ matrix.openeye }} == true && ${{ matrix.rdkit }} == true ]]; then - echo "ENVFILE=test_env" >> $GITHUB_ENV - echo "JOBNAME=RDKit and OpenEye" >> $GITHUB_ENV - echo "TOOLKIT_CHECKS=RDKIT OPENEYE" >> $GITHUB_ENV - echo "PACKAGES_TO_REMOVE=" >> $GITHUB_ENV - fi - - if [[ ${{ matrix.openeye }} == true && ${{ matrix.rdkit }} == false ]]; then - echo "ENVFILE=openeye" >> $GITHUB_ENV - echo "JOBNAME=OpenEye" >> $GITHUB_ENV - echo "TOOLKIT_CHECKS=OPENEYE" >> $GITHUB_ENV - echo "PACKAGES_TO_REMOVE=ambertools rdkit" >> $GITHUB_ENV - fi - - if [[ ${{ matrix.openeye }} == false && ${{ matrix.rdkit }} == true ]]; then - echo "ENVFILE=rdkit" >> $GITHUB_ENV - echo "JOBNAME=RDKit" >> $GITHUB_ENV - echo "TOOLKIT_CHECKS=RDKIT" >> $GITHUB_ENV - echo "PACKAGES_TO_REMOVE=openeye-toolkits" >> $GITHUB_ENV - fi - - - name: Install environment with ${{ env.JOBNAME }} - uses: mamba-org/setup-micromamba@v3 - with: - environment-file: devtools/conda-envs/${{ env.ENVFILE }}.yaml - create-args: >- - python=${{ matrix.python-version }} - - - name: Make oe_license.txt file from GH org secret "OE_LICENSE" - env: - OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }} - run: echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE} - - - name: Install package - run: | - # While Interchange is being installed with pip, there is no need to - # force uninstall openff-toolkit-base since it's only pulled in when - # Interchange is installed with conda. Un-comment this when testing - # against a conda build of Interchange. (It may also be pulled down - # by `openmmforcefields` and should be removed in that case a well.) - micromamba remove --force openff-toolkit openff-toolkit-base - python -m pip install . - - - name: Install test plugins - run: python -m pip install utilities/test_plugins - - - name: Remove undesired toolkits - run: | - if [ ! -z "${{ env.PACKAGES_TO_REMOVE }}" ]; then - for cpkg in ${{ env.PACKAGES_TO_REMOVE }}; do - if [[ $(micromamba list | grep $cpkg) ]]; then micromamba remove --force $cpkg --yes ; fi - done - fi - - - name: Optionally remove OpenFF NAGL - if: ${{ matrix.nagl == false }} - run: micromamba remove openff-nagl-base openff-nagl-models - - - name: Check installed toolkits - run: | - for tk in ${{ env.TOOLKIT_CHECKS }}; do - python -c "from openff.toolkit.utils.toolkits import ${tk}_AVAILABLE; assert ${tk}_AVAILABLE, '${tk} unavailable'" - done - - - name: Check uninstalled toolkits - run: | - if [ ! -z "${{ env.PACKAGES_TO_REMOVE }}" ]; then - for tk in ${{ env.PACKAGES_TO_REMOVE }}; do - TK=$(echo ${tk%-*} | tr 'a-z' 'A-Z') - python -c "from openff.toolkit.utils.toolkits import ${TK}_AVAILABLE; assert not ${TK}_AVAILABLE, '${TK} available'" - done - fi - - - name: Environment Information - run: | - micromamba info - micromamba list - pip list - - - name: Run mypy - # When possible re-enable this with OE+RDK=True, but for now rdkit builds often have bugs - # in stubs and there are other subtleties (in the source code and builds) that reduce the number - # of available builds. - # See ex https://github.com/rdkit/rdkit/issues/7221 - # and https://github.com/rdkit/rdkit/issues/7583 - if: ${{ matrix.rdkit == false && matrix.openeye == true }} - run: mypy -p "openff.toolkit" - - - name: Run unit tests - run: | - PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_examples.py" - PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_links.py" - - # TODO: Flip back to schedule condition before merge - PYTEST_ARGS+=" --runslow" - - python -m pytest -x --durations=20 $PYTEST_ARGS $COV openff/toolkit/_tests - - - name: Run code snippets in docs - if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.nagl == true }} - run: pytest -v --no-cov --doctest-glob="docs/*.rst" --doctest-glob="docs/*.md" docs/ - - - name: Run notebooks in docs - if: ${{ matrix.rdkit == true && matrix.openeye == true }} - run: python -m pytest -v --durations=10 --no-cov --nbval-lax docs/ - - - name: Run examples in docstrings - if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.nagl == true }} - run: | - pytest openff \ - -v -x -n logical --no-cov --doctest-modules \ - --ignore-glob='openff/toolkit/_tests*' \ - --ignore=openff/toolkit/data/ \ - --ignore=openff/toolkit/utils/utils.py - - - name: Codecov - uses: codecov/codecov-action@v6 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - disable_search: true - fail_ci_if_error: true - - - name: Check links - if: ${{ matrix.rdkit == true && matrix.openeye == true }} - run: pytest -r fE --tb=short openff/toolkit/_tests/test_links.py diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 0943458e7..cb386444b 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -18,23 +18,18 @@ defaults: jobs: test: if: (github.event_name == 'schedule' && github.repository == 'openforcefield/openff-toolkit') || (github.event_name != 'schedule') - name: ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }}, NAGL=${{ matrix.nagl }} + name: ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }} runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: os: [ubuntu-latest, macos-latest] python-version: [ "3.12"] rdkit: [true, false] - openeye: [true, false] - nagl: [true, false] + openeye: [false] exclude: - rdkit: false openeye: false - - rdkit: true - openeye: true - - rdkit: false - nagl: true env: OE_LICENSE: ${{ github.workspace }}/oe_license.txt @@ -63,6 +58,7 @@ jobs: - name: Install conda environment with ${{ env.ENVFILE }} uses: mamba-org/setup-micromamba@v3 + timeout-minutes: 10 with: environment-file: devtools/conda-envs/${{env.ENVFILE}}-examples.yaml create-args: >- @@ -73,10 +69,6 @@ jobs: OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }} run: echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE} - - name: Optionally remove OpenFF NAGL - if: ${{ matrix.nagl == false }} - run: micromamba remove openff-nagl-base openff-nagl-models --force - - name: Install package run: python -m pip install . diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index dbb60133e..b87fdcbeb 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -6,30 +6,29 @@ dependencies: - python - versioningit - packaging - - numpy <2.3 + - numpy - networkx - cachetools # https://github.com/openforcefield/openff-toolkit/issues/2150 - xmltodict <=1.0.2 - python-constraint - - openmm >=7.6 - - openff-forcefields >=2023.11 + - openmm >=8.4 + - openff-forcefields - openff-amber-ff-ports >=0.0.3 - openff-units - openff-utilities >=0.1.5 - openff-interchange-base >=0.5 # No idea why this is necessary, see https://github.com/openforcefield/openff-toolkit/pull/1821 - - nomkl - - openff-nagl-base >=0.4.0 - - openff-nagl-models >=0.3.0 + # nomkl + - openff-nagl-base >=0.5.5 + - openff-nagl-models >=2025.09 - typing_extensions - nglview # Toolkit-specific - - ambertools - # https://github.com/rdkit/rdkit/issues/7221 and https://github.com/rdkit/rdkit/issues/7583 - - rdkit =2024 + - ambertools =24.8 + - rdkit >=2024 # Test-only/optional/dev/typing/examples - - pytest =8 + - pytest >=8 - pytest-xdist - pytest-rerunfailures - pyyaml @@ -42,5 +41,10 @@ dependencies: - nbval - mdtraj - pdbfixer - - openmmforcefields >=0.11.2 - - gromacs >=2023.3 + - openmmforcefields >=0.16.0 + # older versions okay, just constrain to help solver + - gromacs >=2025 + + # this is just to help the solver, and is a consequence of AmberTools not being re-built for + # any recent versions of Boot + - icu =75 diff --git a/examples/SMIRNOFF_simulation/run_simulation.ipynb b/examples/SMIRNOFF_simulation/run_simulation.ipynb index 020688f3d..1d21748fd 100644 --- a/examples/SMIRNOFF_simulation/run_simulation.ipynb +++ b/examples/SMIRNOFF_simulation/run_simulation.ipynb @@ -114,7 +114,7 @@ ")\n", "\n", "# Load the OpenFF \"Sage\" force field.\n", - "forcefield = ForceField(\"openff-2.2.0.offxml\")\n", + "forcefield = ForceField(\"openff-2.3.0.offxml\")\n", "\n", "# Parametrize the topology and create an Interchange object.\n", "interchange = forcefield.create_interchange(topology)" diff --git a/examples/forcefield_modification/forcefield_modification.ipynb b/examples/forcefield_modification/forcefield_modification.ipynb index 80b65b830..8e59b8857 100644 --- a/examples/forcefield_modification/forcefield_modification.ipynb +++ b/examples/forcefield_modification/forcefield_modification.ipynb @@ -96,7 +96,7 @@ "ligand_smiles = \"CC(C)(C)c1c(O)c(O)c2c(c1O)[C@H]1OCCC[C@H]1[C@H](c1cc(O)c(O)c(F)c1)N2\"\n", "ligand = Molecule.from_smiles(ligand_smiles)\n", "ligand.generate_conformers(n_conformers=1)\n", - "force_field = ForceField(\"openff-2.2.0.offxml\")" + "force_field = ForceField(\"openff-2.3.0.offxml\")" ] }, { @@ -1862,7 +1862,7 @@ "metadata": {}, "outputs": [], "source": [ - "force_field = ForceField(\"openff-2.1.0.offxml\")\n", + "force_field = ForceField(\"openff-2.3.0.offxml\")\n", "cyclic_nitrogen_angle = force_field[\"Angles\"].parameters[cyclic_nitrogen_smirks]\n", "cyclic_nitrogen_angle.angle = 179 * unit.degree" ] diff --git a/examples/inspect_assigned_parameters/inspect_assigned_parameters.ipynb b/examples/inspect_assigned_parameters/inspect_assigned_parameters.ipynb index b947e0ea8..4f0fe04f3 100644 --- a/examples/inspect_assigned_parameters/inspect_assigned_parameters.ipynb +++ b/examples/inspect_assigned_parameters/inspect_assigned_parameters.ipynb @@ -125,7 +125,7 @@ "topology = Topology.from_molecules([molecule])\n", "\n", "# Let's label using the Sage force field\n", - "forcefield = ForceField(\"openff-2.2.0.offxml\")\n", + "forcefield = ForceField(\"openff-2.3.0.offxml\")\n", "\n", "# Run the molecule labeling\n", "molecule_force_list = forcefield.label_molecules(topology)\n", diff --git a/examples/toolkit_showcase/toolkit_showcase.ipynb b/examples/toolkit_showcase/toolkit_showcase.ipynb index 7eef9b1a8..cfb1c17aa 100644 --- a/examples/toolkit_showcase/toolkit_showcase.ipynb +++ b/examples/toolkit_showcase/toolkit_showcase.ipynb @@ -520,7 +520,7 @@ "metadata": {}, "outputs": [], "source": [ - "sage_ff14sb = ForceField(\"openff-2.2.0.offxml\", \"ff14sb_off_impropers_0.0.4.offxml\")" + "sage_ff14sb = ForceField(\"openff-2.3.0.offxml\", \"ff14sb_off_impropers_0.0.4.offxml\")" ] }, { diff --git a/examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb b/examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb index ae5ca5995..442f816b8 100644 --- a/examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb +++ b/examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb @@ -92,7 +92,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -107,7 +107,7 @@ } ], "source": [ - "forcefield = ForceField(\"openff-2.2.0.offxml\")\n", + "forcefield = ForceField(\"openff-2.3.0.offxml\")\n", "forcefield" ] }, diff --git a/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb b/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb index 4b7df39c6..b52e9eaed 100644 --- a/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb +++ b/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb @@ -80,7 +80,7 @@ "source": [ "ligand_molecule = Molecule.from_file(\"ligand.sdf\")\n", "\n", - "sage = ForceField(\"openff-2.2.0.offxml\")\n", + "sage = ForceField(\"openff-2.3.0.offxml\")\n", "\n", "ligand_system = sage.create_interchange(topology=ligand_molecule.to_topology())\n", "\n", diff --git a/examples/virtual_sites/vsite_showcase.ipynb b/examples/virtual_sites/vsite_showcase.ipynb index bb7b63cea..8ba8a369b 100644 --- a/examples/virtual_sites/vsite_showcase.ipynb +++ b/examples/virtual_sites/vsite_showcase.ipynb @@ -133,7 +133,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "pycharm": { "name": "#%%\n" @@ -184,7 +184,7 @@ "\"\"\"\n", "\n", "# Load Sage and append our virtual sites\n", - "force_field = ForceField(\"openff-2.2.0.offxml\", vsite_offxml)" + "force_field = ForceField(\"openff-2.3.0.offxml\", vsite_offxml)" ] }, {