Repository: mosdef-hub/foyer (language: python)

Issue:
The definition of `opls_154` (oxygen in an alcohol) is not specific enough and will also match oxygen in water
I noted another ambiguous SMARTS string while trying to combine `oplsaa.xml` with a water forcefield. The definition of `opls_154` (oxygen in an alcohol) is not specific enough and will also match oxygen in water:

https://github.com/mosdef-hub/foyer/blob/3b9108247025f11b5614f4c48c0c5418b1e9c7ae/foyer/forcefields/xml/oplsaa.xml#L159

Without being able to specify `H<n>` in the SMARTS string, I think the following would work:
```
[O;X2](H)([!H])
```

_Originally posted by @mphoward in https://github.com/mosdef-hub/foyer/issues/427#issuecomment-870921169_


Discussion / hints:

Fix patch:
diff --git a/foyer/forcefields/xml/CHANGELOG.md b/foyer/forcefields/xml/CHANGELOG.md
index 6b819a4e..66c5626d 100644
--- a/foyer/forcefields/xml/CHANGELOG.md
+++ b/foyer/forcefields/xml/CHANGELOG.md
@@ -24,6 +24,9 @@ v0.0.2 - June 24, 2021
     - opls_468 (from `"10.1021/ja9539195"` to `"10.1002/jcc.1092"`)
     - opls_469 (from `"10.1021/ja9539195"` to `"10.1002/jcc.1092"`)
 
+v0.0.3 - August 7, 2021
+ - update SMARTS string for opls_154 (from `[O;X2]H` to `[O;X2](H)([!H])`)
+
 ----
 ## Trappe-UA
 
diff --git a/foyer/forcefields/xml/oplsaa.xml b/foyer/forcefields/xml/oplsaa.xml
index 90980d00..b05d8527 100644
--- a/foyer/forcefields/xml/oplsaa.xml
+++ b/foyer/forcefields/xml/oplsaa.xml
@@ -3,7 +3,7 @@
      are imported from the gromacs atomtypes file at
      https://github.com/gromacs/gromacs/blob/aa66efd3179a671aace62b827c54aadc3d89c1ee/share/top/oplsaa.ff/atomtypes.atp
 -->
-<ForceField name="OPLS-AA" version="0.0.2" combining_rule="geometric">
+<ForceField name="OPLS-AA" version="0.0.3" combining_rule="geometric">
 
  <AtomTypes>
   <Type name="opls_001" class="opls_001" element="C" mass="12.011"/>
@@ -157,7 +157,7 @@
   <Type name="opls_151" class="Cl" element="Cl" mass="35.453" def="[Cl][C;X4]" overrides="opls_401" desc="Cl in alkyl chlorides" doi="10.1021/jp0484579"/>
   <Type name="opls_152" class="CT" element="C" mass="12.011" def="[C;X4](Cl)([Cl,C,H])([Cl,C,H])([Cl,C,H])" desc="RCH2Cl in alkyl chlorides" doi="10.1021/jp0484579"/>
   <Type name="opls_153" class="HC" element="H" mass="1.008" def="[H][C;X4](Cl)([Cl,C,H])([Cl,C,H])" overrides="opls_140" desc="H in alkyl chlorides" doi="10.1021/jp0484579"/>
-  <Type name="opls_154" class="OH" element="O" mass="15.9994"   def="[O;X2]H" desc="all-atom O: mono alcohols" doi="10.1021/ja9621760"/>
+  <Type name="opls_154" class="OH" element="O" mass="15.9994"   def="[O;X2](H)([!H])" desc="all-atom O: mono alcohols" doi="10.1021/ja9621760"/>
   <Type name="opls_155" class="HO" element="H" mass="1.00800"   def="H[O;%opls_154]" desc="all-atom H(O): mono alcohols, OP(=O)2" doi="10.1021/ja9621760"/>
   <Type name="opls_156" class="HC" element="H" mass="1.008" def="HC(H)(H)OH" desc="all-atom H(C): methanol" overrides="opls_140" doi="10.1021/ja9621760"/>
   <Type name="opls_157" class="CT" element="C" mass="12.01100"   def="[C;X4]([H])([H])([*])[O;%opls_154]" desc="all-atom C: CH3 and CH2, alcohols" overrides="opls_136, opls_159, opls_158" doi="10.1021/ja9621760"/>


Test patch:
diff --git a/foyer/tests/test_forcefield.py b/foyer/tests/test_forcefield.py
index 9adcd88a..24ad8855 100644
--- a/foyer/tests/test_forcefield.py
+++ b/foyer/tests/test_forcefield.py
@@ -651,13 +651,13 @@ def test_load_metadata_list_xml(self):
 
     def test_load_metadata_from_internal_forcefield_plugin_loader(self):
         from_xml_ff = forcefields.load_OPLSAA()
-        assert from_xml_ff.version == "0.0.2"
+        assert from_xml_ff.version == "0.0.3"
         assert from_xml_ff.name == "OPLS-AA"
         assert from_xml_ff.combining_rule == "geometric"
 
     def test_load_metadata_from_internal_name(self):
         from_xml_ff = Forcefield(name="oplsaa")
-        assert from_xml_ff.version == "0.0.2"
+        assert from_xml_ff.version == "0.0.3"
         assert from_xml_ff.name == "OPLS-AA"
         assert from_xml_ff.combining_rule == "geometric"
 
diff --git a/foyer/tests/test_opls.py b/foyer/tests/test_opls.py
index b80f27c6..2769d6ea 100755
--- a/foyer/tests/test_opls.py
+++ b/foyer/tests/test_opls.py
@@ -46,7 +46,7 @@ def find_correctly_implemented(self):
 
     def test_opls_metadata(self, oplsaa):
         assert oplsaa.name == "OPLS-AA"
-        assert oplsaa.version == "0.0.2"
+        assert oplsaa.version == "0.0.3"
         assert oplsaa.combining_rule == "geometric"
 
     @pytest.mark.parametrize("mol_name", correctly_implemented)