Skip to content

Commit

Permalink
Use an environment variable to determine where to load the lightning …
Browse files Browse the repository at this point in the history
…driver from
  • Loading branch information
ceriottm committed Sep 14, 2023
1 parent 7693941 commit fceee83
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/py/pes/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
import sys
import os

LIGHNING_CALCULATOR_PATH = "/Users/matthiaskellner/Documents/PhD/H2O/driver/"

sys.path.append(LIGHNING_CALCULATOR_PATH)
# Get the driver path from an environment variable
LIGHTNING_CALCULATOR_PATH = os.environ.get('LIGHTNING_CALCULATOR_PATH')
if LIGHTNING_CALCULATOR_PATH is not None:
sys.path.append(LIGHTNING_CALCULATOR_PATH)

from .dummy import Dummy_driver

from ipi.utils.mathtools import det_ut3x3
from ipi.utils.units import unit_to_internal, unit_to_user

sys.path.append(LIGHNING_CALCULATOR_PATH)

from ipi_calculator import PytorchLightningCalculator

class Lightning_driver(Dummy_driver):
def __init__(self, args=None):
self.error_msg = """Rascal driver requires specification of a .json model file fitted with librascal,
self.error_msg = """Lightning driver requires specification of a .json model file fitted with librascal,
and a template file that describes the chemical makeup of the structure.
Example: python driver.py -m rascal -u -o example.chk,template.xyz"""

Expand Down

0 comments on commit fceee83

Please sign in to comment.