Skip to content

Commit

Permalink
Remove use of pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Aug 9, 2023
1 parent e3b4387 commit 424132f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions openforcefields/openforcefields.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
"""
openforcefields.py
A general small molecule forcefield descended from AMBER99 and parm@Frosst in the SMIRNOFF format.
This module only contains the function that will be the entry point that
will be used by the openforcefield toolkit to find the installed forcefield
files.
"""
from typing import List
from importlib.resources import files

from pkg_resources import resource_filename


def get_forcefield_dirs_paths() -> List[str]:
def get_forcefield_dirs_paths() -> list[str]:
"""
Return the paths to the directories including the forcefield files.
Expand All @@ -22,10 +19,8 @@ def get_forcefield_dirs_paths() -> List[str]:
Returns
-------
dir_paths : List[str]
dir_paths : list[str]
The list of directory paths containing the SMIRNOFF files.
"""
return [
resource_filename('openforcefields', 'offxml'),
]
return [(files("openforcefields") / "offxml").as_posix()]

0 comments on commit 424132f

Please sign in to comment.