You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 2 A parameter is returned, but both parameters really ought to be returned. This example is a bit stripped-down and funky for the sake of complexity, but there are valid use cases for multiple virtual site parameters having the same SMIRKS and different distances/charges/other parameters. (Compare this to i.e. vdW or torsion interactions, which should only get "one" parameter at a time.)
I think having SMIRKS-only lookups is more of a hassle than it's worth and would be fine to get __getitem__ not implemented for this case. It could be looked up with a tuple of SMIRKS, name, and possibly match, but that's enough trouble to mitigate the benefit of syntactic sugar. There should be a well-defined set of behaviors in the proper API for this, something around .get_parameter.
There is some discussion in the SMIRNOFF spec but some important details are yet unresolved: openforcefield/standards#64
The text was updated successfully, but these errors were encountered:
mattwthompson
changed the title
Virtual site parameter lookups should return multiple parameters if multiple have the same SMIRKS
Virtual site parameter lookups should return multiple (or no?) parameters if multiple have the same SMIRKS
Apr 12, 2024
Describe the bug
This is a follow-on to #1847 because virtual site parameters are different.
To Reproduce
Output
The 2 A parameter is returned, but both parameters really ought to be returned. This example is a bit stripped-down and funky for the sake of complexity, but there are valid use cases for multiple virtual site parameters having the same SMIRKS and different distances/charges/other parameters. (Compare this to i.e. vdW or torsion interactions, which should only get "one" parameter at a time.)
Additional context
I am working around this downstream, looking up parameters by the criteria I believe define uniqueness: https://github.com/openforcefield/openff-interchange/blob/v0.3.25/openff/interchange/components/toolkit.py#L200-L206
I think having SMIRKS-only lookups is more of a hassle than it's worth and would be fine to get
__getitem__
not implemented for this case. It could be looked up with a tuple of SMIRKS, name, and possiblymatch
, but that's enough trouble to mitigate the benefit of syntactic sugar. There should be a well-defined set of behaviors in the proper API for this, something around.get_parameter
.There is some discussion in the SMIRNOFF spec but some important details are yet unresolved: openforcefield/standards#64
The text was updated successfully, but these errors were encountered: