Init data module & send matrices to proper devices - #421
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
chrisiacovella
left a comment
There was a problem hiding this comment.
Trying to figure out what was changed to address the nvalchemi import issue.
| """ | ||
|
|
||
| """ | ||
| r""" |
There was a problem hiding this comment.
Is this just a stray character?
There was a problem hiding this comment.
The 'r' indicates that the doc string is a raw string since there are backward slashes in it and this might confuse the Python interpreter.
|
|
||
| def __iter__(self) -> Iterator[Dict[str, float]]: | ||
| """Iterate over the energies dictionary.""" | ||
| from modelforge.utils.units import chem_context |
There was a problem hiding this comment.
This needs to be imported somewhere in the file, otherwise we can't use the appropriate conversions of energy (well energy to energy/mol).
this imports the context required for openff units that is called, e.g., on line 166
.to(GlobalUnitSystem.get_units("energy"), "chem")
|
Ah, I missed that you added in the init_.py file. |
…mi-ops)
Pull Request Summary
Init modelforge/data as a module so that import can be done despite the running directory. Fix a typo of not copying a matrix to devices.
Key changes
Associated Issue(s)
Pull Request Checklist