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

6 statements  

« prev     ^ index     » next       coverage.py v7.5.3, created at 2025-08-02 00:12 +0000

1# fmt: off 

2 

3""" 

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

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

6objects, or while running a simulation 

7""" 

8from ase.calculators.calculator import CalculatorError 

9 

10 

11class KIMCalculatorError(CalculatorError): 

12 """ 

13 Indicates an error occurred in initializing an applicable 

14 calculator. This either results from incompatible combinations of 

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

16 incompatible in some way with this calculator 

17 """ 

18 

19 

20class KIMModelNotFound(CalculatorError): 

21 """ 

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

23 collections on the system 

24 """ 

25 

26 

27class KIMModelInitializationError(CalculatorError): 

28 """ 

29 KIM API Model object or ComputeArguments object could not be 

30 successfully created 

31 """ 

32 

33 

34class KimpyError(CalculatorError): 

35 """ 

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

37 """ 

38 

39 

40class KIMModelParameterError(CalculatorError): 

41 """ 

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

43 parameter was unsuccessful 

44 """