Skip to content

Commit

Permalink
Inverted import order to cause OpenFF installation error to raise pri…
Browse files Browse the repository at this point in the history
…or to direct openff.toolkit imports
  • Loading branch information
timbernat committed Dec 3, 2024
1 parent 9f4b82c commit 00f5f97
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

import pytest

from openff.toolkit import Molecule
from openff.toolkit.utils.toolkits import OPENEYE_AVAILABLE

# NOTE: inverted custom imports here to get polymerist.openfftools import first,
# Done so that if OpenFF is not found, a helpful installation error with be raised prior to attempting direct openff.toolkit imports below
from polymerist.genutils.importutils.dependencies import modules_installed
from polymerist.mdtools.openfftools.partialcharge.molchargers import MolCharger, ABE10Charger, EspalomaCharger, NAGLCharger
from polymerist.mdtools.openfftools.partialcharge.rescharge.interface import LibraryCharger

from openff.toolkit import Molecule
from openff.toolkit.utils.toolkits import OPENEYE_AVAILABLE


# Test MolCharger subclass registration
def test_molcharger_registers_subclasses() -> None:
Expand Down

0 comments on commit 00f5f97

Please sign in to comment.