Repository: openforcefield/openff-nagl

Issue:
Explicit exclusion of OpenEyeToolkitWrapper from global registry still leads to `to_openeye` attempt.
## Expected behavior ##

Assuming my understanding of  `toolkit_registry_manager` is correct, specifically excluding OpenEyeToolkitWrapper would be expected to default to using NAGLRDKitToolkitWrapper when generating charges.


## Actual behavior ##

Doing so instead still leads to the use of NAGLOpenEyeToolkitWrapper, causing a ValueError on https://github.com/openforcefield/openff-nagl/blob/main/openff/nagl/toolkits/openeye.py#L44.

## Code to reproduce the behavior ##


``` python
from openff.toolkit import Molecule, RDKitToolkitWrapper, AmberToolsToolkitWrapper
from openff.nagl.toolkits import NAGLRDKitToolkitWrapper
from openff.toolkit.utils.nagl_wrapper import NAGLToolkitWrapper
from openff.toolkit.utils.toolkit_registry import toolkit_registry_manager, ToolkitRegistry

# Note whether or not you explicitly pass NAGLRDKitToolkitWrapper this issue still occurs
amber_rdkit = ToolkitRegistry([RDKitToolkitWrapper(), AmberToolsToolkitWrapper(), NAGLRDKitToolkitWrapper()])

with toolkit_registry_manager(amber_rdkit):
    m = Molecule.from_smiles('CCC')
    m.assign_partial_charges(
        partial_charge_method="openff-gnn-am1bcc-0.1.0-rc.1.pt",
        toolkit_registry=NAGLToolkitWrapper(),
    )
```

Full error trace:

```
Traceback (most recent call last):
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/nn/_models.py", line 137, in compute_properties
    values = self._compute_properties_dgl(molecule)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/nn/_models.py", line 210, in _compute_properties_dgl
    raise TypeError(
TypeError: This model is not a DGL-based model and cannot be used to compute properties with the DGL backend

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bioc1523/tmp/test_nagl_noechem.py", line 10, in <module>
    m.assign_partial_charges(
  File "/home/bioc1523/github/openff-toolkit/openff/toolkit/topology/molecule.py", line 2631, in assign_partial_charges
    toolkit_wrapper.assign_partial_charges(  # type: ignore[attr-defined]
  File "/home/bioc1523/github/openff-toolkit/openff/toolkit/utils/nagl_wrapper.py", line 96, in assign_partial_charges
    charges = model.compute_property(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/nn/_models.py", line 179, in compute_property
    properties = self.compute_properties(
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/nn/_models.py", line 139, in compute_properties
    values = self._compute_properties_nagl(molecule)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/nn/_models.py", line 196, in _compute_properties_nagl
    nxmol = GraphMolecule.from_openff(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/molecule/_graph/molecule.py", line 49, in from_openff
    graphs = [
             ^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/molecule/_graph/molecule.py", line 50, in <listcomp>
    NXMolHeteroGraph.from_openff(
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/molecule/_graph/_graph.py", line 321, in from_openff
    atom_features = atom_featurizer.featurize(molecule)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/features/_featurizers.py", line 26, in featurize
    encoded = [feature.encode(molecule) for feature in self.features]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/features/_featurizers.py", line 26, in <listcomp>
    encoded = [feature.encode(molecule) for feature in self.features]
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/features/_base.py", line 85, in encode
    return self._encode(molecule).reshape(self.tensor_shape)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/features/atoms.py", line 279, in _encode
    molecule = normalize_molecule(molecule)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/toolkits/openff.py", line 383, in normalize_molecule
    normalized = call_toolkit_function(
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/toolkits/openff.py", line 49, in call_toolkit_function
    return toolkit_registry.call(function_name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/github/openff-toolkit/openff/toolkit/utils/toolkit_registry.py", line 356, in call
    raise e
  File "/home/bioc1523/github/openff-toolkit/openff/toolkit/utils/toolkit_registry.py", line 352, in call
    return method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/software/mambaforge/install/envs/openff-toolkit-dev/lib/python3.11/site-packages/openff/nagl/toolkits/openeye.py", line 44, in _run_normalization_reactions
    oemol = molecule.to_openeye()
            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/github/openff-toolkit/openff/toolkit/topology/molecule.py", line 5041, in to_openeye
    return toolkit_registry.call(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bioc1523/github/openff-toolkit/openff/toolkit/utils/toolkit_registry.py", line 370, in call
    raise ValueError(msg)
ValueError: No registered toolkits can provide the capability "to_openeye" for args "(Molecule with name '' and SMILES '[H][C]([H])([H])[C]([H])([H])[C]([H])([H])[H]',)" and kwargs "{'aromaticity_model': 'OEAroModel_MDL'}"
Available toolkits are: [ToolkitWrapper around The RDKit version 2023.09.2, ToolkitWrapper around AmberTools version 22.0, ToolkitWrapper around The RDKit version 2023.09.2]
```

## Current environment ##

- Which version are you using? (run `python -c "import openff.nagl; print(openff.nagl.__version__)"`) 0.3.2
- Which version of Python (`python -V`)? 3.11.6
- Which operating system? Ubuntu 22.04 LTS
- What is the output of `pip list`?

<details>
<summary>Expand pip list</summary>

```
Package                            Version                      Editable project location
---------------------------------- ---------------------------- ------------------------------------
AmberUtils                         21.0
asttokens                          2.4.1
astunparse                         1.6.3
attrs                              23.1.0
Brotli                             1.1.0
bson                               0.5.9
cached-property                    1.5.2
cachetools                         5.3.2
certifi                            2023.11.17
charset-normalizer                 3.3.2
click                              8.1.7
click-option-group                 0.5.6
colorama                           0.4.6
comm                               0.1.4
contourpy                          1.2.0
coverage                           7.3.2
cycler                             0.12.1
debugpy                            1.8.0
decorator                          5.1.1
edgembar                           0.2
exceptiongroup                     1.2.0
execnet                            2.0.2
executing                          2.0.1
fastjsonschema                     2.19.0
filelock                           3.13.1
fonttools                          4.45.1
freetype-py                        2.3.0
fsspec                             2023.10.0
gmpy2                              2.1.2
greenlet                           3.0.1
h5py                               3.10.0
idna                               3.6
importlib-metadata                 6.9.0
importlib-resources                6.1.1
iniconfig                          2.0.0
ipykernel                          6.26.0
ipython                            8.18.1
ipywidgets                         8.1.1
jedi                               0.19.1
Jinja2                             3.1.2
joblib                             1.3.2
jsonschema                         4.20.0
jsonschema-specifications          2023.11.2
jupyter_client                     8.6.0
jupyter_core                       5.5.0
jupyterlab-widgets                 3.0.9
kiwisolver                         1.4.5
lightning-utilities                0.10.0
markdown-it-py                     3.0.0
MarkupSafe                         2.1.3
matplotlib                         3.8.2
matplotlib-inline                  0.1.6
mdtraj                             1.9.9
mdurl                              0.1.0
MMPBSA.py                          16.0
mongo-types                        0.15.1
mpmath                             1.3.0
msgpack                            1.0.7
munkres                            1.1.4
mypy                               1.7.1
mypy-extensions                    1.0.0
nbformat                           5.9.2
nbval                              0.10.0
ndfes                              1.8
nest-asyncio                       1.5.8
networkx                           3.2.1
nglview                            3.0.8
numexpr                            2.8.7
numpy                              1.26.2
OpenEye-toolkits-python3-linux-x64 2023.1.1
openff-amber-ff-ports              0+untagged.32.g809f411.dirty
openff-interchange                 0.3.18
openff-models                      0.1.1
openff-nagl                        0.3.2
openff-nagl-models                 0.1.0
openff-toolkit                     0+untagged.4816.g9b23790     /home/bioc1523/github/openff-toolkit
openff-units                       0.2.0
openff-utilities                   0.1.11
openforcefields                    2023.11.0
OpenMM                             8.1.0
packaging                          23.2
packmol-memgen                     2023.2.24
pandas                             2.1.3
ParmEd                             4.2.2
parso                              0.8.3
pdb4amber                          22.0
pexpect                            4.8.0
pickleshare                        0.7.5
Pillow                             10.1.0
Pint                               0.21
pip                                23.3.1
pkgutil_resolve_name               1.3.10
platformdirs                       4.0.0
plotly                             5.18.0
pluggy                             1.3.0
prompt-toolkit                     3.0.41
psutil                             5.9.5
ptyprocess                         0.7.0
pure-eval                          0.2.2
py-cpuinfo                         9.0.0
pyarrow                            14.0.1
pycairo                            1.25.1
pydantic                           1.10.13
Pygments                           2.17.2
pyMSMT                             22.0
pyparsing                          3.1.1
PySocks                            1.7.1
pytest                             7.4.3
pytest-cov                         4.1.0
pytest-rerunfailures               13.0
pytest-xdist                       3.5.0
python-constraint                  1.4.0
python-dateutil                    2.8.2
pytorch-lightning                  2.1.1
pytraj                             2.0.6
pytz                               2023.3.post1
PyYAML                             6.0.1
pyzmq                              25.1.1
qcelemental                        0.27.1
qcengine                           0.29.0
qcportal                           0.15.8
referencing                        0.31.1
reportlab                          4.0.7
requests                           2.31.0
rich                               13.7.0
rlPyCairo                          0.2.0
rpds-py                            0.13.2
sander                             22.0
SciPy                              1.11.4
setuptools                         68.2.2
six                                1.16.0
smirnoff99frosst                   0+unknown
SQLAlchemy                         2.0.23
stack-data                         0.6.2
sympy                              1.12
tables                             3.9.2
tenacity                           8.2.3
toml                               0.10.2
tomli                              2.0.1
torch                              2.1.0.post301
torchmetrics                       1.2.1
tornado                            6.3.3
tqdm                               4.66.1
traitlets                          5.14.0
types-PyYAML                       6.0.12.12
types-setuptools                   69.0.0.0
types-toml                         0.10.8.7
typing_extensions                  4.8.0
tzdata                             2023.3
urllib3                            2.1.0
wcwidth                            0.2.12
wheel                              0.42.0
widgetsnbextension                 4.0.9
xmltodict                          0.13.0
zipp                               3.17.0
```

</details>

- If you use conda, what is the output of `conda list`?

<details>
<summary>Expand mamba list</summary>

```
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                  2_kmp_llvm    conda-forge
ambertools                23.3            py311h9fea076_6    conda-forge
amberutils                21.0                     pypi_0    pypi
arpack                    3.8.0           nompi_h0baa96a_101    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
aws-c-auth                0.7.8                h5c941e0_1    conda-forge
aws-c-cal                 0.6.9                h5d48c4d_2    conda-forge
aws-c-common              0.9.10               hd590300_0    conda-forge
aws-c-compression         0.2.17               h7f92143_7    conda-forge
aws-c-event-stream        0.3.2                h0bcb0bb_8    conda-forge
aws-c-http                0.7.14               hd268abd_3    conda-forge
aws-c-io                  0.13.36              he14a76f_1    conda-forge
aws-c-mqtt                0.9.10               h35285c7_2    conda-forge
aws-c-s3                  0.4.3                h0448019_0    conda-forge
aws-c-sdkutils            0.1.12               h7f92143_6    conda-forge
aws-checksums             0.1.17               h7f92143_6    conda-forge
aws-crt-cpp               0.24.9               h4a91382_1    conda-forge
aws-sdk-cpp               1.11.210             h6d06844_3    conda-forge
blosc                     1.21.5               h0f2a231_0    conda-forge
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.1.0           py311hb755f60_1    conda-forge
bson                      0.5.9                      py_0    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.23.0               hd590300_0    conda-forge
c-blosc2                  2.11.3               hb4ffafa_0    conda-forge
ca-certificates           2023.11.17           hbcca054_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cachetools                5.3.2              pyhd8ed1ab_0    conda-forge
cairo                     1.18.0               h3faef2a_0    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
click-option-group        0.5.6              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.1.4              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.0           py311h9547e67_0    conda-forge
coverage                  7.3.2           py311h459d7ec_0    conda-forge
cuda-cudart               12.0.107             h59595ed_6    conda-forge
cuda-cudart_linux-64      12.0.107             h59595ed_6    conda-forge
cuda-nvrtc                12.0.76              h59595ed_1    conda-forge
cuda-nvtx                 12.0.76              hcb278e6_1    conda-forge
cuda-version              12.0                 hffde075_2    conda-forge
cudnn                     8.8.0.121            h264754d_4    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
debugpy                   1.8.0           py311hb755f60_1    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
edgembar                  0.2                      pypi_0    pypi
exceptiongroup            1.2.0              pyhd8ed1ab_0    conda-forge
execnet                   2.0.2              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                hcb278e6_1    conda-forge
fftw                      3.3.10          nompi_hc118613_108    conda-forge
filelock                  3.13.1             pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_1    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.45.1          py311h459d7ec_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
freetype-py               2.3.0              pyhd8ed1ab_0    conda-forge
fsspec                    2023.10.0          pyhca7485f_0    conda-forge
gettext                   0.21.1               h27087fc_0    conda-forge
gflags                    2.2.2             he1b5a44_1004    conda-forge
glog                      0.6.0                h6f12383_0    conda-forge
gmp                       6.3.0                h59595ed_0    conda-forge
gmpy2                     2.1.2           py311h6a5fa03_1    conda-forge
greenlet                  3.0.1           py311hb755f60_0    conda-forge
h5py                      3.10.0          nompi_py311h3839ddf_100    conda-forge
hdf4                      4.2.15               h2a13503_7    conda-forge
hdf5                      1.14.2          nompi_h4f84152_100    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        6.9.0              pyha770c72_0    conda-forge
importlib_metadata        6.9.0                hd8ed1ab_0    conda-forge
importlib_resources       6.1.1              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.26.0             pyhf8b6a83_0    conda-forge
ipython                   8.18.1             pyh31011fe_1    conda-forge
ipywidgets                8.1.1              pyhd8ed1ab_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
joblib                    1.3.2              pyhd8ed1ab_0    conda-forge
jsonschema                4.20.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.11.2          pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.5.0           py311h38be061_0    conda-forge
jupyterlab_widgets        3.0.9              pyhd8ed1ab_0    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5           py311h9547e67_1    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
lcms2                     2.15                 hb7c19ff_3    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libabseil                 20230802.1      cxx17_h59595ed_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libarrow                  14.0.1           h422ced8_7_cpu    conda-forge
libarrow-acero            14.0.1           h59595ed_7_cpu    conda-forge
libarrow-dataset          14.0.1           h59595ed_7_cpu    conda-forge
libarrow-flight           14.0.1           h120cb0d_7_cpu    conda-forge
libarrow-flight-sql       14.0.1           h61ff412_7_cpu    conda-forge
libarrow-gandiva          14.0.1           hacb8726_7_cpu    conda-forge
libarrow-substrait        14.0.1           h61ff412_7_cpu    conda-forge
libblas                   3.9.0            16_linux64_mkl    conda-forge
libboost                  1.82.0               h6fcfa73_6    conda-forge
libboost-python           1.82.0          py311h92ebd52_6    conda-forge
libbrotlicommon           1.1.0                hd590300_1    conda-forge
libbrotlidec              1.1.0                hd590300_1    conda-forge
libbrotlienc              1.1.0                hd590300_1    conda-forge
libcblas                  3.9.0            16_linux64_mkl    conda-forge
libcrc32c                 1.1.2                h9c3ff4c_0    conda-forge
libcublas                 12.0.1.189           hcb278e6_2    conda-forge
libcufft                  11.0.0.21            hcb278e6_1    conda-forge
libcurand                 10.3.1.50            hcb278e6_0    conda-forge
libcurl                   8.4.0                hca28451_0    conda-forge
libcusolver               11.4.2.57            hcb278e6_1    conda-forge
libcusparse               12.0.0.76            hcb278e6_1    conda-forge
libdeflate                1.19                 hd590300_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_3    conda-forge
libgfortran-ng            13.2.0               h69a702a_3    conda-forge
libgfortran5              13.2.0               ha4646dd_3    conda-forge
libglib                   2.78.1               h783c2da_1    conda-forge
libgomp                   13.2.0               h807b86a_3    conda-forge
libgoogle-cloud           2.12.0               h5206363_4    conda-forge
libgrpc                   1.59.3               hd6c4280_0    conda-forge
libhwloc                  2.9.3           default_h554bfaf_1009    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0            16_linux64_mkl    conda-forge
libllvm15                 15.0.7               h5cf9203_3    conda-forge
libmagma                  2.7.2                h173bb3b_1    conda-forge
libmagma_sparse           2.7.2                h173bb3b_1    conda-forge
libnetcdf                 4.9.2           nompi_h80fb2b6_112    conda-forge
libnghttp2                1.58.0               h47da74e_0    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libnuma                   2.0.16               h0b41bf4_1    conda-forge
libnvjitlink              12.0.76              hcb278e6_1    conda-forge
libparquet                14.0.1           h352af49_7_cpu    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libprotobuf               4.24.4               hf27288f_0    conda-forge
libre2-11                 2023.06.02           h7a70373_0    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libsqlite                 3.44.2               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_3    conda-forge
libthrift                 0.19.0               hb90f79a_1    conda-forge
libtiff                   4.6.0                ha9c0a0a_2    conda-forge
libutf8proc               2.8.0                h166bdaf_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libuv                     1.46.0               hd590300_0    conda-forge
libwebp-base              1.3.2                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxml2                   2.11.6               h232c23b_0    conda-forge
libzip                    1.10.1               h2629f0a_3    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
lightning-utilities       0.10.0             pyhd8ed1ab_0    conda-forge
llvm-openmp               17.0.6               h4dfa4b3_0    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
magma                     2.7.2                h51420fd_1    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.3           py311h459d7ec_1    conda-forge
matplotlib-base           3.8.2           py311h54ef318_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mdtraj                    1.9.9           py311h90fe790_1    conda-forge
mdurl                     0.1.0              pyhd8ed1ab_0    conda-forge
mkl                       2022.2.1         h84fe81f_16997    conda-forge
mmpbsa-py                 16.0                     pypi_0    pypi
mongo-types               0.15.1                   pypi_0    pypi
mpc                       1.3.1                hfe3b2da_0    conda-forge
mpfr                      4.2.1                h9458935_0    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.7           py311h9547e67_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy                      1.7.1           py311h459d7ec_0    conda-forge
mypy_extensions           1.0.0              pyha770c72_0    conda-forge
nbformat                  5.9.2              pyhd8ed1ab_0    conda-forge
nbval                     0.10.0             pyhd8ed1ab_0    conda-forge
nccl                      2.19.4.1             h3a97aeb_0    conda-forge
ncurses                   6.4                  h59595ed_2    conda-forge
nest-asyncio              1.5.8              pyhd8ed1ab_0    conda-forge
netcdf-fortran            4.6.1           nompi_hacb5139_103    conda-forge
networkx                  3.2.1              pyhd8ed1ab_0    conda-forge
nglview                   3.0.8              pyh1da8cd4_0    conda-forge
numexpr                   2.8.7           mkl_py311hbaa3ca7_4    conda-forge
numpy                     1.26.2          py311h64a7726_0    conda-forge
ocl-icd                   2.3.1                h7f98852_0    conda-forge
ocl-icd-system            1.0.0                         1    conda-forge
openeye-toolkits          2023.1.1                py311_0    openeye
openff-amber-ff-ports     0.0.4              pyhca7485f_0    conda-forge
openff-forcefields        2023.11.0          pyhca7485f_0    conda-forge
openff-interchange-base   0.3.18             pyhd8ed1ab_0    conda-forge
openff-models             0.1.1              pyhca7485f_0    conda-forge
openff-nagl-base          0.3.2              pyhd8ed1ab_0    conda-forge
openff-nagl-models        0.1.0              pyhd8ed1ab_0    conda-forge
openff-toolkit            0+untagged.4816.g9b23790           dev_0    <develop>
openff-units              0.2.0              pyh1a96a4e_2    conda-forge
openff-utilities          0.1.11             pyhd8ed1ab_0    conda-forge
openjpeg                  2.5.0                h488ebb8_3    conda-forge
openmm                    8.1.0           py311h11a6390_1    conda-forge
openssl                   3.2.0                hd590300_1    conda-forge
orc                       1.9.2                h4b38347_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
packmol                   20.010               h86c2bf4_0    conda-forge
packmol-memgen            2023.2.24                pypi_0    pypi
pandas                    2.1.3           py311h320fe9a_0    conda-forge
parmed                    4.2.2           py311hb755f60_1    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pcre2                     10.42                hcad00b1_0    conda-forge
pdb4amber                 22.0                     pypi_0    pypi
perl                      5.32.1          4_hd590300_perl5    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.1.0          py311ha6c5da5_0    conda-forge
pint                      0.21               pyhd8ed1ab_0    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
pixman                    0.42.2               h59595ed_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.0.0              pyhd8ed1ab_0    conda-forge
plotly                    5.18.0             pyhd8ed1ab_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.41             pyha770c72_0    conda-forge
psutil                    5.9.5           py311h459d7ec_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
py-cpuinfo                9.0.0              pyhd8ed1ab_0    conda-forge
pyarrow                   14.0.1          py311h39c9aba_7_cpu    conda-forge
pycairo                   1.25.1          py311h8feb60e_0    conda-forge
pydantic                  1.10.13         py311h459d7ec_1    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
pymsmt                    22.0                     pypi_0    pypi
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
pytables                  3.9.2           py311h10c7f7f_0    conda-forge
pytest                    7.4.3              pyhd8ed1ab_0    conda-forge
pytest-cov                4.1.0              pyhd8ed1ab_0    conda-forge
pytest-rerunfailures      13.0               pyhd8ed1ab_0    conda-forge
pytest-xdist              3.5.0              pyhd8ed1ab_0    conda-forge
python                    3.11.6          hab00c5b_0_cpython    conda-forge
python-constraint         1.4.0                      py_0    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.19.0             pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.11                    4_cp311    conda-forge
pytorch                   2.1.0           cuda120py311h513d03c_301    conda-forge
pytorch-lightning         2.1.1              pyhd8ed1ab_0    conda-forge
pytraj                    2.0.6                    pypi_0    pypi
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py311h459d7ec_1    conda-forge
pyzmq                     25.1.1          py311h34ded2d_2    conda-forge
qcelemental               0.27.1             pyhd8ed1ab_0    conda-forge
qcengine                  0.29.0             pyhd8ed1ab_0    conda-forge
qcportal                  0.15.8             pyhd8ed1ab_0    conda-forge
rdkit                     2023.09.2       py311h4c2f14b_0    conda-forge
rdma-core                 49.0                 hd3aeb46_1    conda-forge
re2                       2023.06.02           h2873b5e_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
referencing               0.31.1             pyhd8ed1ab_0    conda-forge
reportlab                 4.0.7           py311h459d7ec_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rich                      13.7.0             pyhd8ed1ab_0    conda-forge
rlpycairo                 0.2.0              pyhd8ed1ab_0    conda-forge
rpds-py                   0.13.2          py311h46250e7_0    conda-forge
s2n                       1.3.56               h06160fa_0    conda-forge
sander                    22.0                     pypi_0    pypi
scipy                     1.11.4          py311h64a7726_0    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sleef                     3.5.1                h9b69904_2    conda-forge
smirnoff99frosst          1.1.0              pyh44b312d_0    conda-forge
snappy                    1.1.10               h9fff704_0    conda-forge
sqlalchemy                2.0.23          py311h459d7ec_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
sympy                     1.12            pypyh9d50eac_103    conda-forge
tbb                       2021.10.0            h00ab1b0_2    conda-forge
tenacity                  8.2.3              pyhd8ed1ab_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
torchmetrics              1.2.1              pyhd8ed1ab_0    conda-forge
tornado                   6.3.3           py311h459d7ec_1    conda-forge
tqdm                      4.66.1             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.0             pyhd8ed1ab_0    conda-forge
types-pyyaml              6.0.12.12                pypi_0    pypi
types-setuptools          69.0.0.0                 pypi_0    pypi
types-toml                0.10.8.7                 pypi_0    pypi
typing-extensions         4.8.0                hd8ed1ab_0    conda-forge
typing_extensions         4.8.0              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucx                       1.15.0               h115f88d_1    conda-forge
urllib3                   2.1.0              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.12             pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.9              pyhd8ed1ab_0    conda-forge
xmltodict                 0.13.0             pyhd8ed1ab_0    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.7                h8ee46fc_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-libxt                1.3.0                hd590300_1    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zeromq                    4.3.5                h59595ed_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zlib-ng                   2.0.7                h0b41bf4_0    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge
```

</details>

Discussion:
codecov-commenter: ## [Codecov](https://app.codecov.io/gh/openforcefield/openff-nagl/pull/71?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openforcefield) Report
> Merging [#71](https://app.codecov.io/gh/openforcefield/openff-nagl/pull/71?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openforcefield) (7e111f8) into [main](https://app.codecov.io/gh/openforcefield/openff-nagl/commit/64f9c251c552641a29e8c3be3629621230b6e1dd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openforcefield) (64f9c25) will **decrease** coverage by `0.29%`.
> Report is 1 commits behind head on main.
> The diff coverage is `62.50%`.

<details><summary>Additional details and impacted files</summary>


</details>

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 08053bf..5b48d87 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,25 @@ The rules for this file:
   * accompany each entry with github issue/PR number (Issue #xyz)
 -->
 
+## [Unreleased]
+
+### Authors
+<!-- GitHub usernames of contributors to this release -->
+- @lilyminium
+
+### Reviewers
+
+### Added
+
+### Fixed
+<!-- Bug fixes -->
+- Fixed OpenFF molecule conversion with toolkit wrappers (Issue #69, PR #71)
+
+### Changed
+<!-- Changes in existing functionality -->
+
+### Removed
+
 ## v0.3.2
 
 ### Authors
diff --git a/docs/installation.md b/docs/installation.md
index 24da1ab..9a16e20 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -32,6 +32,31 @@ In environments with this configuration, the `-c conda-forge` switch is unnecess
 
 More information on installing OpenFF packages can be found in the [OpenFF installation documentation](openff.docs:install).
 
+## Installation from source
+
+You may want to install NAGL from source, either because you are after an unreleased feature or to manage your own dependencies. To do so, first download the GitHub repository:
+
+```shell
+git clone https://github.com/openforcefield/openff-nagl.git
+cd openff-nagl
+```
+
+Install the dependencies:
+
+```shell
+mamba env create --name nagl --file devtools/conda-envs/test_env.yaml
+conda activate nagl
+```
+
+And then install the package itself:
+
+```shell
+python -m pip install . --no-deps
+```
+
+
+
+
 [Conda Forge]: https://conda-forge.org/
 [MambaForge]: https://github.com/conda-forge/miniforge#mambaforge
 
diff --git a/openff/nagl/toolkits/openeye.py b/openff/nagl/toolkits/openeye.py
index c35421d..26a4924 100644
--- a/openff/nagl/toolkits/openeye.py
+++ b/openff/nagl/toolkits/openeye.py
@@ -41,13 +41,17 @@ class NAGLOpenEyeToolkitWrapper(NAGLToolkitWrapperBase, OpenEyeToolkitWrapper):
 
         from openeye import oechem
 
-        oemol = molecule.to_openeye()
+        oemol = self.to_openeye(molecule=molecule)
 
         for reaction_smarts in normalization_reactions:
             reaction = oechem.OEUniMolecularRxn(reaction_smarts)
             reaction(oemol)
 
-        molecule = type(molecule).from_openeye(oemol, allow_undefined_stereo=True)
+        molecule = self.from_openeye(
+            oemol,
+            allow_undefined_stereo=True,
+            _cls=molecule.__class__,
+        )
 
         return molecule
 
@@ -80,7 +84,7 @@ class NAGLOpenEyeToolkitWrapper(NAGLToolkitWrapperBase, OpenEyeToolkitWrapper):
         }
 
         hybridizations = []
-        oemol = molecule.to_openeye()
+        oemol = self.to_openeye(molecule=molecule)
         oechem.OEAssignHybridization(oemol)
 
         for atom in oemol.GetAtoms():
@@ -119,7 +123,11 @@ class NAGLOpenEyeToolkitWrapper(NAGLToolkitWrapperBase, OpenEyeToolkitWrapper):
         has_charges = (
             OpenEyeToolkitWrapper._turn_oemolbase_sd_charges_into_partial_charges(oemol)
         )
-        offmol = Molecule.from_openeye(oemol, allow_undefined_stereo=True)
+        offmol = self.from_openeye(
+            oemol,
+            allow_undefined_stereo=True,
+            _cls=Molecule,
+        )
         if not has_charges:
             offmol.partial_charges = None
         if as_smiles:
diff --git a/openff/nagl/toolkits/rdkit.py b/openff/nagl/toolkits/rdkit.py
index 621737e..d73ee34 100644
--- a/openff/nagl/toolkits/rdkit.py
+++ b/openff/nagl/toolkits/rdkit.py
@@ -18,8 +18,8 @@ if TYPE_CHECKING:
 class NAGLRDKitToolkitWrapper(NAGLToolkitWrapperBase, RDKitToolkitWrapper):
     name = "rdkit"
 
-    @staticmethod
     def _run_normalization_reactions(
+        self,
         molecule,
         normalization_reactions: Tuple[str, ...] = tuple(),
         max_iter: int = 200,
@@ -45,7 +45,7 @@ class NAGLRDKitToolkitWrapper(NAGLToolkitWrapperBase, RDKitToolkitWrapper):
         from rdkit import Chem
         from rdkit.Chem import rdChemReactions
 
-        rdmol = molecule.to_rdkit()
+        rdmol = self.to_rdkit(molecule=molecule)
         original_smiles = new_smiles = Chem.MolToSmiles(rdmol)
 
         # track atoms
@@ -85,7 +85,11 @@ class NAGLRDKitToolkitWrapper(NAGLToolkitWrapperBase, RDKitToolkitWrapper):
                     f"{max_iter} iterations for molecule {original_smiles}"
                 )
 
-        new_mol = type(molecule).from_rdkit(rdmol, allow_undefined_stereo=True)
+        new_mol = self.from_rdkit(
+            rdmol,
+            allow_undefined_stereo=True,
+            _cls=molecule.__class__,
+        )
         mapping = new_mol.properties.pop("atom_map")
         adjusted_mapping = dict((current, new - 1) for current, new in mapping.items())
 
@@ -223,6 +227,8 @@ class NAGLRDKitToolkitWrapper(NAGLToolkitWrapperBase, RDKitToolkitWrapper):
         """
         from rdkit import Chem
 
+        wrapper = cls()
+
         if as_smiles:
             if mapped_smiles:
                 converter = cls.smiles_to_mapped_smiles
@@ -232,7 +238,9 @@ class NAGLRDKitToolkitWrapper(NAGLToolkitWrapperBase, RDKitToolkitWrapper):
                 )
         else:
             converter = functools.partial(
-                Molecule.from_rdkit, allow_undefined_stereo=True
+                wrapper.from_rdkit,
+                allow_undefined_stereo=True,
+                _cls=Molecule
             )
 
         if file.endswith(".gz"):
@@ -455,7 +463,7 @@ class NAGLRDKitToolkitWrapper(NAGLToolkitWrapperBase, RDKitToolkitWrapper):
                 _cls=_cls,
             )
 
-        rdkit_molecule = molecule.to_rdkit()
+        rdkit_molecule = self.to_rdkit(molecule)
         AllChem.ComputeGasteigerCharges(rdkit_molecule)
         charges = [
             float(rdatom.GetProp("_GasteigerCharge"))


Test patch:
diff --git a/openff/nagl/tests/utils/test_openff.py b/openff/nagl/tests/utils/test_openff.py
index c40d678..064a325 100644
--- a/openff/nagl/tests/utils/test_openff.py
+++ b/openff/nagl/tests/utils/test_openff.py
@@ -3,6 +3,9 @@ import warnings
 import numpy as np
 import pytest
 from numpy.testing import assert_allclose
+from openff.nagl.toolkits import NAGLRDKitToolkitWrapper
+from openff.toolkit import RDKitToolkitWrapper
+from openff.toolkit.utils.toolkit_registry import toolkit_registry_manager, ToolkitRegistry
 from openff.toolkit.utils.toolkits import RDKIT_AVAILABLE
 from openff.units import unit
 
@@ -218,3 +221,10 @@ def test_capture_toolkit_warnings(caplog):
     with warnings.catch_warnings(record=True) as records:
         warnings.warn("test")
         assert len(records)
+
+@pytest.mark.skipif(not RDKIT_AVAILABLE, reason="requires rdkit")
+def test_openff_toolkit_registry(openff_methane_uncharged):
+
+    rdkit_registry = ToolkitRegistry([NAGLRDKitToolkitWrapper()])
+    with toolkit_registry_manager(rdkit_registry):
+        normalize_molecule(openff_methane_uncharged)