Coverage for /builds/kinetik161/ase/ase/calculators/kim/exceptions.py: 100.00%

6 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-12-10 11:04 +0000

1""" 

2Exceptions for the general error types that can occur either while 

3setting up the calculator, which requires constructing KIM API C++ 

4objects, or while running a simulation 

5""" 

6from ase.calculators.calculator import CalculatorError 

7 

8 

9class KIMCalculatorError(CalculatorError): 

10 """ 

11 Indicates an error occurred in initializing an applicable 

12 calculator. This either results from incompatible combinations of 

13 argument values passed to kim.KIM(), or from models that are 

14 incompatible in some way with this calculator 

15 """ 

16 

17 

18class KIMModelNotFound(CalculatorError): 

19 """ 

20 Requested model cannot be found in any of the KIM API model 

21 collections on the system 

22 """ 

23 

24 

25class KIMModelInitializationError(CalculatorError): 

26 """ 

27 KIM API Model object or ComputeArguments object could not be 

28 successfully created 

29 """ 

30 

31 

32class KimpyError(CalculatorError): 

33 """ 

34 A call to a kimpy function resulted in a RuntimeError being raised 

35 """ 

36 

37 

38class KIMModelParameterError(CalculatorError): 

39 """ 

40 An attempt to either access or mutate a KIM portable model 

41 parameter was unsuccessful 

42 """