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

Update `TopologyGraph.from_openff_topology` for new API #469

Closed mattwthompson closed 2 years ago

mattwthompson commented 3 years ago

PR Summary:

The Topology class in the OpenFF toolkit is undergoing a heavy refactor, including removing some API points that Foyer uses. The refactor will not be in a release for some months, but we are actively testing downstream packages by installing against a feature branch. The parts of the refactor that are relevant here are unlikely to change significantly, but that's not yet guaranteed.

This PR also makes an attempt to support both APIs.

PR Checklist


codecov[bot] commented 3 years ago

Codecov Report

Merging #469 (21de34d) into main (9721b23) will decrease coverage by 0.66%. The diff coverage is 48.78%.

@@            Coverage Diff             @@
##             main     #469      +/-   ##
==========================================
- Coverage   70.84%   70.17%   -0.67%     
==========================================
  Files          16       16              
  Lines        1650     1670      +20     
==========================================
+ Hits         1169     1172       +3     
- Misses        481      498      +17     
mattwthompson commented 2 years ago

Hey folks,

The new version of the OpenFF Toolkit has been released, so I'm able to run these tests without pulling in RC/beta builds. I'm not sure why CI isn't running - is it because I'm pushing to a fork?

mattwthompson commented 2 years ago

Tests appear to be fail-fast and failing because we (OpenFF) no longer package on Python 3.7. I opened #513 to possibly mitigate this.

daico007 commented 2 years ago

Agree with changing the element arg to symbol, gonna do a quick commit to change the var name

mattwthompson commented 2 years ago

Thanks!