mosdef-hub / foyer

A package for atom-typing as well as applying and disseminating forcefields
https://foyer.mosdef.org
MIT License
118 stars 77 forks source link

Reduce testing time for gmso implementation #437

Closed justinGilmer closed 3 years ago

justinGilmer commented 3 years ago

PR Summary:

At the moment, loading in large forcefield XML files so that GMSO can be used as the backend data structure has some performance issues.

This introduces a fixture called oplsaa which loads the oplsaa.xml forcefield once and can be used wherever needed in the test_gmso_forcefield.py. This currently reduces the entire testing time from 573 seconds to 348 seconds. I used: time python -m pytest -v foyer/tests

PR Checklist


codecov[bot] commented 3 years ago

Codecov Report

Merging #437 (5fc0f06) into master (fc44f80) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 5fc0f06 differs from pull request most recent head fadf4f0. Consider uploading reports for the commit fadf4f0 to get more accurate results

@@           Coverage Diff           @@
##           master     #437   +/-   ##
=======================================
  Coverage   73.58%   73.58%           
=======================================
  Files          17       17           
  Lines        1802     1802           
=======================================
  Hits         1326     1326           
  Misses        476      476