diff --git a/devtools/conda-envs/beta_rc_env.yaml b/devtools/conda-envs/beta_rc_env.yaml index 84d235a7f..e391e89c2 100644 --- a/devtools/conda-envs/beta_rc_env.yaml +++ b/devtools/conda-envs/beta_rc_env.yaml @@ -16,7 +16,7 @@ dependencies: - xmltodict - python-constraint - openmm >=7.6 - - openff-forcefields + - openff-forcefields >=2023.05.1 - smirnoff99Frosst - openff-units >=0.2 - openff-utilities >=0.1.5 diff --git a/devtools/conda-envs/openeye-examples.yaml b/devtools/conda-envs/openeye-examples.yaml index 7d1dd792d..aaccedbc6 100644 --- a/devtools/conda-envs/openeye-examples.yaml +++ b/devtools/conda-envs/openeye-examples.yaml @@ -14,7 +14,7 @@ dependencies: - xmltodict - python-constraint - openmm >=7.6 - - openff-forcefields + - openff-forcefields >=2023.05.1 - smirnoff99Frosst - openff-amber-ff-ports >=0.0.3 - openff-units >=0.2 diff --git a/devtools/conda-envs/openeye.yaml b/devtools/conda-envs/openeye.yaml index 10b925c0c..5ac0190a8 100644 --- a/devtools/conda-envs/openeye.yaml +++ b/devtools/conda-envs/openeye.yaml @@ -14,7 +14,7 @@ dependencies: - xmltodict - python-constraint - openmm >=7.6 - - openff-forcefields + - openff-forcefields >=2023.05.1 - smirnoff99Frosst - openff-units >=0.2 - openff-utilities >=0.1.5 diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index 30b3bcd9e..108fbab89 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -13,7 +13,7 @@ dependencies: - xmltodict - python-constraint - openmm >=7.6 - - openff-forcefields + - openff-forcefields >=2023.05.1 - smirnoff99Frosst - openff-amber-ff-ports >=0.0.3 - openff-units >=0.2 diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml index bdd71be11..e1bb69332 100644 --- a/devtools/conda-envs/rdkit.yaml +++ b/devtools/conda-envs/rdkit.yaml @@ -13,7 +13,7 @@ dependencies: - xmltodict - python-constraint - openmm >=7.6 - - openff-forcefields + - openff-forcefields >=2023.05.1 - smirnoff99Frosst - openff-units >=0.2 - openff-utilities >=0.1.5 diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 2301af417..40b39c82c 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -14,7 +14,7 @@ dependencies: - xmltodict - python-constraint - openmm >=7.6 - - openff-forcefields + - openff-forcefields >=2023.05.1 - smirnoff99Frosst - openff-units >=0.2 - openff-utilities >=0.1.5 diff --git a/docs/releasehistory.md b/docs/releasehistory.md index 5cec99881..68427e608 100644 --- a/docs/releasehistory.md +++ b/docs/releasehistory.md @@ -12,6 +12,8 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w ### Bugfixes +- [PR #1640](https://github.com/openforcefield/openff-toolkit/pull/1640): Fixes issue [#1633](https://github.com/openforcefield/openff-toolkit/issues/1633) in which some force field attributes were erroneously parsed as `Quantity` objects and issue [#1635](https://github.com/openforcefield/openff-toolkit/issues/1635) in which OpenFF 2.1.0 ("Sage") could not be loaded with Pint 0.22. + ### New features ### Improved documentation and warnings diff --git a/openff/toolkit/tests/test_forcefield.py b/openff/toolkit/tests/test_forcefield.py index 7eab9b8d0..3f4a3680c 100644 --- a/openff/toolkit/tests/test_forcefield.py +++ b/openff/toolkit/tests/test_forcefield.py @@ -892,6 +892,7 @@ def test_get_available_force_fields(self): "openff_unconstrained-1.0.0.offxml", "openff-1.3.0.offxml", "openff-2.0.0.offxml", + "openff-2.1.0.offxml", "ff14sb_off_impropers_0.0.3.offxml", ] @@ -1065,6 +1066,11 @@ def test_load_do_not_convert_non_quantity_strings(self): assert isinstance(parameter.name, str) assert not isinstance(parameter.name, unit.Quantity) + def test_load_do_not_convert_id_to_quantities(self): + ff = ForceField("openff-2.1.0.offxml") + handler = ff.get_parameter_handler("LibraryCharges") + assert handler.parameters[2].id == "K+" + def test_pickle(self): """ Test pickling and unpickling a force field diff --git a/openff/toolkit/typing/engines/smirnoff/forcefield.py b/openff/toolkit/typing/engines/smirnoff/forcefield.py index 9775a7ba2..901688b9a 100644 --- a/openff/toolkit/typing/engines/smirnoff/forcefield.py +++ b/openff/toolkit/typing/engines/smirnoff/forcefield.py @@ -907,7 +907,7 @@ def _load_smirnoff_data(self, smirnoff_data: dict, allow_cosmetic_attributes=Fal # Go through the whole SMIRNOFF data structure, trying to convert all strings to Quantity smirnoff_data = convert_all_strings_to_quantity( smirnoff_data, - ignore_keys=["smirks", "name"], + ignore_keys=["smirks", "name", "id", "parent_id"], ) # Go through the subsections, delegating each to the proper ParameterHandler