From 70406f845dc35e7a9e3baa570dd6a9c4dfaec00e Mon Sep 17 00:00:00 2001 From: Jeffrey Wagner Date: Thu, 15 Oct 2026 11:36:43 -0700 Subject: [PATCH 1/9] update qcportal pin to >=0.70 in CI --- devtools/conda-envs/examples.yaml | 2 +- devtools/conda-envs/test_env.yaml | 2 +- devtools/conda-envs/test_env_no_openeye.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/conda-envs/examples.yaml b/devtools/conda-envs/examples.yaml index 488353266..089d5ea11 100644 --- a/devtools/conda-envs/examples.yaml +++ b/devtools/conda-envs/examples.yaml @@ -32,7 +32,7 @@ dependencies: - msgpack-python - pydantic =2 - qcelemental - - qcportal >=0.50 + - qcportal >=0.70 - qcengine - nbval - mdtraj diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index d7e8f98d3..bbdde817d 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -36,7 +36,7 @@ dependencies: - msgpack-python - pydantic =2 - qcelemental - - qcportal >=0.50 + - qcportal >=0.70 - qcengine - nglview - mdtraj diff --git a/devtools/conda-envs/test_env_no_openeye.yaml b/devtools/conda-envs/test_env_no_openeye.yaml index ccb17fca3..05fb9ab67 100644 --- a/devtools/conda-envs/test_env_no_openeye.yaml +++ b/devtools/conda-envs/test_env_no_openeye.yaml @@ -34,7 +34,7 @@ dependencies: - msgpack-python - pydantic =2 - qcelemental - - qcportal >=0.50 + - qcportal >=0.70 - qcengine - nglview - pip: From 48073adc58ea703846a03139e53fa18fcc145a86 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 18:37:19 +0000 Subject: [PATCH 2/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- openff/toolkit/topology/molecule.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openff/toolkit/topology/molecule.py b/openff/toolkit/topology/molecule.py index d50301b83..862fbf30f 100644 --- a/openff/toolkit/topology/molecule.py +++ b/openff/toolkit/topology/molecule.py @@ -1170,7 +1170,14 @@ def to_dict(self) -> dict: # https://mypy.readthedocs.io/en/latest/typed_dict.html#typeddict molecule_dict: dict[ str, - str | bytes | dict[str, Any] | list[str] | list[bytes] | list[HierarchyElement] | list[dict[str, Any]] | None, + str + | bytes + | dict[str, Any] + | list[str] + | list[bytes] + | list[HierarchyElement] + | list[dict[str, Any]] + | None, ] = dict() molecule_dict["name"] = self._name From 53bc256a8280265af232d07c9513956907596064 Mon Sep 17 00:00:00 2001 From: Jeffrey Wagner Date: Thu, 15 Oct 2026 11:53:16 -0700 Subject: [PATCH 3/9] define mypy and typing deps in conda section so their deps aren't removed when nagl is uninstalled --- devtools/conda-envs/test_env.yaml | 14 +++++++------- devtools/conda-envs/test_env_no_openeye.yaml | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index bbdde817d..7b951359a 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -41,12 +41,12 @@ dependencies: - nglview - mdtraj - nbval + - mypy =2 + - types-setuptools + - types-toml + - types-PyYAML + - types-networkx + - types-xmltodict + - types-cachetools - pip: - - mypy ==2 - - types-setuptools - - types-toml - - types-PyYAML - - types-networkx - - types-xmltodict - - types-cachetools - mongo-types diff --git a/devtools/conda-envs/test_env_no_openeye.yaml b/devtools/conda-envs/test_env_no_openeye.yaml index 05fb9ab67..d9b0d068c 100644 --- a/devtools/conda-envs/test_env_no_openeye.yaml +++ b/devtools/conda-envs/test_env_no_openeye.yaml @@ -37,12 +37,12 @@ dependencies: - qcportal >=0.70 - qcengine - nglview + - mypy =2 + - types-setuptools + - types-toml + - types-PyYAML + - types-networkx + - types-xmltodict + - types-cachetools - pip: - - mypy ==2 - - types-setuptools - - types-toml - - types-PyYAML - - types-networkx - - types-xmltodict - - types-cachetools - mongo-types From a7d1d4cd4391f8ff8189a294d0833338d0a953ab Mon Sep 17 00:00:00 2001 From: Jeffrey Wagner Date: Thu, 15 Oct 2026 12:15:26 -0700 Subject: [PATCH 4/9] switch deps from python-constraint to python-constraint2 per https://github.com/conda-forge/openff-toolkit-feedstock/pull/135 --- devtools/conda-envs/examples.yaml | 2 +- devtools/conda-envs/test_env.yaml | 2 +- devtools/conda-envs/test_env_no_openeye.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/conda-envs/examples.yaml b/devtools/conda-envs/examples.yaml index 089d5ea11..e58fa7f53 100644 --- a/devtools/conda-envs/examples.yaml +++ b/devtools/conda-envs/examples.yaml @@ -9,7 +9,7 @@ dependencies: - networkx - cachetools - xmltodict - - python-constraint + - python-constraint2 - openmm >=7.6 - openff-forcefields >=2025 - openff-amber-ff-ports >=0.0.3 diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 7b951359a..b9a27db40 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -9,7 +9,7 @@ dependencies: - networkx - cachetools - xmltodict - - python-constraint + - python-constraint2 - openmm >=7.6 - openff-forcefields >=2023.05.1 - openff-units diff --git a/devtools/conda-envs/test_env_no_openeye.yaml b/devtools/conda-envs/test_env_no_openeye.yaml index d9b0d068c..6a87ec25f 100644 --- a/devtools/conda-envs/test_env_no_openeye.yaml +++ b/devtools/conda-envs/test_env_no_openeye.yaml @@ -9,7 +9,7 @@ dependencies: - networkx - cachetools - xmltodict - - python-constraint + - python-constraint2 - openmm >=7.6 - openff-forcefields >=2023.05.1 - openff-units From 7912a5b1dc3c75ea289d0fc9da558410c8cc89d1 Mon Sep 17 00:00:00 2001 From: Jeffrey Wagner Date: Thu, 15 Oct 2026 12:37:14 -0700 Subject: [PATCH 5/9] revert to normal python-constraint --- devtools/conda-envs/examples.yaml | 2 +- devtools/conda-envs/test_env.yaml | 2 +- devtools/conda-envs/test_env_no_openeye.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/conda-envs/examples.yaml b/devtools/conda-envs/examples.yaml index e58fa7f53..089d5ea11 100644 --- a/devtools/conda-envs/examples.yaml +++ b/devtools/conda-envs/examples.yaml @@ -9,7 +9,7 @@ dependencies: - networkx - cachetools - xmltodict - - python-constraint2 + - python-constraint - openmm >=7.6 - openff-forcefields >=2025 - openff-amber-ff-ports >=0.0.3 diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index b9a27db40..7b951359a 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -9,7 +9,7 @@ dependencies: - networkx - cachetools - xmltodict - - python-constraint2 + - python-constraint - openmm >=7.6 - openff-forcefields >=2023.05.1 - openff-units diff --git a/devtools/conda-envs/test_env_no_openeye.yaml b/devtools/conda-envs/test_env_no_openeye.yaml index 6a87ec25f..d9b0d068c 100644 --- a/devtools/conda-envs/test_env_no_openeye.yaml +++ b/devtools/conda-envs/test_env_no_openeye.yaml @@ -9,7 +9,7 @@ dependencies: - networkx - cachetools - xmltodict - - python-constraint2 + - python-constraint - openmm >=7.6 - openff-forcefields >=2023.05.1 - openff-units From d952de9ed9291cd333dff7ccfef7ba7ca9a4c6e2 Mon Sep 17 00:00:00 2001 From: Jeffrey Wagner Date: Thu, 15 Oct 2026 13:29:58 -0700 Subject: [PATCH 6/9] ruff suggested fixes --- README.md | 8 +++++--- docs/api/toolkits.md | 5 +---- openff/toolkit/topology/molecule.py | 4 ++-- openff/toolkit/topology/topology.py | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a5c2d3b7b..6c031d884 100644 --- a/README.md +++ b/README.md @@ -56,16 +56,19 @@ SMIRNOFF force fields can be parsed by the `ForceField` class, which offers meth # Load a molecule into the OpenFF Molecule object from openff.toolkit import Molecule from openff.toolkit.utils import get_data_file_path -sdf_file_path = get_data_file_path('molecules/ethanol.sdf') + +sdf_file_path = get_data_file_path("molecules/ethanol.sdf") molecule = Molecule.from_file(sdf_file_path) # Create an OpenFF Topology object from the molecule from openff.toolkit import Topology + topology = Topology.from_molecules(molecule) # Load the latest OpenFF force field release: version 2.1.0, codename "Sage" from openff.toolkit import ForceField -forcefield = ForceField('openff-2.3.0.offxml') + +forcefield = ForceField("openff-2.3.0.offxml") # Create an Interchange object for representations in other formats @@ -73,7 +76,6 @@ interchange = forcefield.create_interchange(topology) # Create an OpenMM system representing the molecule with SMIRNOFF-applied parameters openmm_system = interchange.to_openmm(topology) - ``` Detailed examples of using SMIRNOFF with the toolkit can be found [in the documentation](https://open-forcefield-toolkit.readthedocs.io/en/stable/examples.html). diff --git a/docs/api/toolkits.md b/docs/api/toolkits.md index e69865304..7e418fe52 100644 --- a/docs/api/toolkits.md +++ b/docs/api/toolkits.md @@ -65,11 +65,8 @@ The [`toolkit_registry_manager`] context manager allows `GLOBAL_TOOLKIT_REGISTRY >>> from openff.toolkit.utils import toolkit_registry_manager >>> print(len(GLOBAL_TOOLKIT_REGISTRY.registered_toolkits)) 5 ->>> with toolkit_registry_manager( -... ToolkitRegistry([RDKitToolkitWrapper(), AmberToolsToolkitWrapper()]) -... ): +>>> with toolkit_registry_manager(ToolkitRegistry([RDKitToolkitWrapper(), AmberToolsToolkitWrapper()])): ... print(len(GLOBAL_TOOLKIT_REGISTRY.registered_toolkits)) -... 2 ``` diff --git a/openff/toolkit/topology/molecule.py b/openff/toolkit/topology/molecule.py index 862fbf30f..3d1f04851 100644 --- a/openff/toolkit/topology/molecule.py +++ b/openff/toolkit/topology/molecule.py @@ -298,7 +298,7 @@ def add_bond(self, bond: "Bond"): self._bonds.append(bond) - def to_dict(self) -> dict[str, None | str | int | bool | dict[Any, Any]]: + def to_dict(self) -> dict[str, str | int | bool | dict[Any, Any] | None]: """Return a dict representation of the :class:`Atom` class instance. Output dictionary keys and values align with parameters used to initialize @@ -1960,7 +1960,7 @@ def are_isomorphic( bond_stereochemistry_matching: bool = True, strip_pyrimidal_n_atom_stereo: bool = True, toolkit_registry: TKR = GLOBAL_TOOLKIT_REGISTRY, - ) -> tuple[bool, None | dict[int, int]]: + ) -> tuple[bool, dict[int, int] | None]: """ Determine if ``mol1`` is isomorphic to ``mol2``. diff --git a/openff/toolkit/topology/topology.py b/openff/toolkit/topology/topology.py index ea8e56bee..8a7eeaa4e 100644 --- a/openff/toolkit/topology/topology.py +++ b/openff/toolkit/topology/topology.py @@ -1329,7 +1329,7 @@ def from_openmm( cls, openmm_topology: "openmm.app.Topology", unique_molecules: Iterable[FrozenMolecule] | None = None, - positions: Union[None, Quantity, "OMMQuantity"] = None, + positions: Union[Quantity, "OMMQuantity", None] = None, ) -> "Topology": """ Construct an OpenFF Topology object from an OpenMM Topology object. @@ -2124,7 +2124,7 @@ def from_mdtraj( cls, mdtraj_topology: "mdtraj.Topology", unique_molecules: Iterable[MoleculeLike] | None = None, - positions: Union[None, "OMMQuantity", Quantity] = None, + positions: Union["OMMQuantity", Quantity, None] = None, ): """ Construct an OpenFF ``Topology`` from an MDTraj ``Topology`` From 928f648c1fba15bee172ae3fa09fecfacd8cba40 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 20:30:12 +0000 Subject: [PATCH 7/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/api/toolkits.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/api/toolkits.md b/docs/api/toolkits.md index 7e418fe52..e69865304 100644 --- a/docs/api/toolkits.md +++ b/docs/api/toolkits.md @@ -65,8 +65,11 @@ The [`toolkit_registry_manager`] context manager allows `GLOBAL_TOOLKIT_REGISTRY >>> from openff.toolkit.utils import toolkit_registry_manager >>> print(len(GLOBAL_TOOLKIT_REGISTRY.registered_toolkits)) 5 ->>> with toolkit_registry_manager(ToolkitRegistry([RDKitToolkitWrapper(), AmberToolsToolkitWrapper()])): +>>> with toolkit_registry_manager( +... ToolkitRegistry([RDKitToolkitWrapper(), AmberToolsToolkitWrapper()]) +... ): ... print(len(GLOBAL_TOOLKIT_REGISTRY.registered_toolkits)) +... 2 ``` From 3dab0064aa54a14d02b97103d5f07787997b3109 Mon Sep 17 00:00:00 2001 From: Jeffrey Wagner Date: Thu, 15 Oct 2026 14:07:56 -0700 Subject: [PATCH 8/9] remove blacken-docs --- .pre-commit-config.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 65b6163db..a484c63cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,11 +8,6 @@ repos: - id: ruff-format - id: ruff-check args: [--fix] -- repo: https://github.com/adamchainz/blacken-docs - rev: 1.20.0 - hooks: - - id: blacken-docs - files: ^docs/.*\.(rst|md)$ - repo: https://github.com/tox-dev/pyproject-fmt rev: v2.30.1 hooks: From 2c9bc2fb71ea5986c6eb24013080814a853f6517 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 21:08:19 +0000 Subject: [PATCH 9/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/api/toolkits.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/api/toolkits.md b/docs/api/toolkits.md index e69865304..7e418fe52 100644 --- a/docs/api/toolkits.md +++ b/docs/api/toolkits.md @@ -65,11 +65,8 @@ The [`toolkit_registry_manager`] context manager allows `GLOBAL_TOOLKIT_REGISTRY >>> from openff.toolkit.utils import toolkit_registry_manager >>> print(len(GLOBAL_TOOLKIT_REGISTRY.registered_toolkits)) 5 ->>> with toolkit_registry_manager( -... ToolkitRegistry([RDKitToolkitWrapper(), AmberToolsToolkitWrapper()]) -... ): +>>> with toolkit_registry_manager(ToolkitRegistry([RDKitToolkitWrapper(), AmberToolsToolkitWrapper()])): ... print(len(GLOBAL_TOOLKIT_REGISTRY.registered_toolkits)) -... 2 ```