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

6 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-11-27 15:21 +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""" 

6 

7from ase.calculators.calculator import CalculatorError 

8 

9 

10class KIMCalculatorError(CalculatorError): 

11 """ 

12 Indicates an error occurred in initializing an applicable 

13 calculator. This either results from incompatible combinations of 

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

15 incompatible in some way with this calculator 

16 """ 

17 

18 

19class KIMModelNotFound(CalculatorError): 

20 """ 

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

22 collections on the system 

23 """ 

24 

25 

26class KIMModelInitializationError(CalculatorError): 

27 """ 

28 KIM API Model object or ComputeArguments object could not be 

29 successfully created 

30 """ 

31 

32 

33class KimpyError(CalculatorError): 

34 """ 

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

36 """ 

37 

38 

39class KIMModelParameterError(CalculatorError): 

40 """ 

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

42 parameter was unsuccessful 

43 """