Skip to content

Commit

Permalink
Update rascal driver with upstream changes (lab-cosmo/librascal#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-veit committed Mar 29, 2021
1 parent 7ca0b3d commit 08fde53
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/py/pes/rascal.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ipi.utils.units import unit_to_internal, unit_to_user

try:
from rascal.models.IP_generic_md import GenericMDCalculator as RascalCalc
from rascal.models.genericmd import GenericMDCalculator as RascalCalc
except:
RascalCalc = None

Expand Down Expand Up @@ -40,7 +40,10 @@ def check_arguments(self):
else:
sys.exit(self.error_msg)

self.rascal_calc = RascalCalc(self.model, self.template)
try:
self.rascal_calc = RascalCalc(self.model, True, self.template)
except ValueError:
sys.exit(self.error_msg)

def __call__(self, cell, pos):
"""Get energies, forces, and stresses from the librascal model"""
Expand Down

0 comments on commit 08fde53

Please sign in to comment.