Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test against Pint 0.24.4 #1990

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ jobs:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}

- name: Install Pint 0.24.4 and `openff-units` branch
run: |
pip install "pint==0.24.4" git+https://github.com/openforcefield/[email protected]

- name: Install package
run: |
# While Interchange is being installed with pip, there is no need to
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ jobs:
run: |
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}

- name: Install Pint 0.24.4 and `openff-units` branch
run: |
pip install "pint==0.24.4" git+https://github.com/openforcefield/[email protected]

- name: Install package
run: |
# Maybe remove the packaged openff-toolkit, installed as a dependency of openmmforcefields
Expand Down
2 changes: 2 additions & 0 deletions devtools/conda-envs/openeye-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ dependencies:
- pdbfixer
- openmmforcefields >=0.11.2
- gromacs >=2023.3
# shim
- libabseil=20240722.0=*_1
2 changes: 2 additions & 0 deletions devtools/conda-envs/openeye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ dependencies:
- types-xmltodict
- types-cachetools
- mongo-types
# shim
- libabseil=20240722.0=*_1
2 changes: 2 additions & 0 deletions devtools/conda-envs/rdkit-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ dependencies:
- pdbfixer
- openmmforcefields >=0.11.2
- gromacs >=2023.3
# shim
- libabseil=20240722.0=*_1
2 changes: 2 additions & 0 deletions devtools/conda-envs/rdkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ dependencies:
- qcportal >=0.50
- qcengine
- nglview
# shim
- libabseil=20240722.0=*_1
2 changes: 2 additions & 0 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ dependencies:
- types-xmltodict
- types-cachetools
- mongo-types
# shim
- libabseil=20240722.0=*_1
20 changes: 11 additions & 9 deletions openff/toolkit/utils/openeye_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@

import numpy as np
from cachetools import LRUCache, cached
from openff.units.elements import SYMBOLS
from typing_extensions import TypeAlias

from openff.toolkit import Quantity, unit

if TYPE_CHECKING:
from openff.toolkit.topology.molecule import Atom, Bond, FrozenMolecule, Molecule

from openff.units.elements import SYMBOLS

from openff.toolkit.utils.base_wrapper import (
ToolkitWrapper,
_ChargeSettings,
Expand Down Expand Up @@ -64,6 +59,13 @@
)
from openff.toolkit.utils.utils import inherit_docstrings

if TYPE_CHECKING:
import networkx
import openmm.app

from openff.toolkit.topology.molecule import Atom, Bond, FrozenMolecule, Molecule


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -332,8 +334,8 @@ def _polymer_openmm_topology_to_offmol(

def _polymer_openmm_topology_to_oemol(
self,
omm_top,
substructure_library,
omm_top: "openmm.app.Topology",
substructure_library: dict[str, dict],
):
"""
Parameters
Expand Down Expand Up @@ -840,7 +842,7 @@ def _read_oemolistream_molecules(

return mols

def _smarts_to_networkx(self, substructure_smarts):
def _smarts_to_networkx(self, substructure_smarts: str) -> "networkx.Graph":
import networkx as nx
from openeye import oechem

Expand Down
Loading