mosdef-hub / foyer

A package for atom-typing as well as applying and disseminating forcefields
https://foyer.mosdef.org
MIT License
119 stars 78 forks source link

The definition of `opls_154` (oxygen in an alcohol) is not specific enough and will also match oxygen in water #438

Closed justinGilmer closed 3 years ago

justinGilmer commented 3 years ago

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

justinGilmer commented 3 years ago

@mphoward This has now been fixed, and is available on conda-forge in the foyer 0.9.3 release!