Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic/static units #3

Open
anabiman opened this issue Sep 28, 2021 · 1 comment
Open

Dynamic/static units #3

anabiman opened this issue Sep 28, 2021 · 1 comment

Comments

@anabiman
Copy link
Collaborator

The mol and ff converters assume that any unit used for a particular variable in the OpenFF schema remains constant throughout. This assumption is made for the sake of code clarity and better performance. Also MMSchema does not support dynamic units for the same field. Should it?

Example:

>>> smirnoff_data["ProperTorsions"]["Proper"][0]["k1"]
    '0.1703506220295 * mole**-1 * kilocalorie'
>>> smirnoff_data["ProperTorsions"]["Proper"][-1]["k1"]
    '0.0 * mole**-1 * kilocalorie'

The converters extract the units for k1 in this case from smirnoff_data["ProperTorsions"]["Proper"][0] and assume it is the same for the [-1] entry.

@anabiman anabiman changed the title dynamic//static units Dynamic/static units Sep 28, 2021
@j-wags
Copy link
Collaborator

j-wags commented Sep 30, 2021

This isn't a safe assumption in the long run. While it will work for our current released FFs, the 0.3 SMIRNOFF spec explicitly requires units to be on each quantity to allow for this sort of flexibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants