choderalab / espaloma

Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm 🍹https://arxiv.org/abs/2010.01196
https://docs.espaloma.org/en/latest/
MIT License
203 stars 23 forks source link

Fix loading molecules serialized with older openff-toolkit versions (<=0.11) #166

Closed ijpulidos closed 11 months ago

ijpulidos commented 11 months ago

A KeyError: 'hierarchy_schemes' is raised when reading json molecules that were serialized using older versions of the openff-toolkit (<=0.11).

These changes aim to catch this error and add the missing key when espaloma is being used in environments that use the newer openff-toolkit versions (>=0.11) which is what we now officially support since the changes in #155

TODOs

codecov-commenter commented 11 months ago

Codecov Report

Merging #166 (2ee4f8c) into master (0b15808) will not change coverage. The diff coverage is 0.00%.

ijpulidos commented 11 months ago

I'm fixing a previous test that was incorrect as well in this same set of changes.

@yuanqing-wang @kntkb If the CI tests pass this one should be ready to go, can you please take a look when you have the chance? Thanks!