File: exceptions.py

package info (click to toggle)
python-ase 3.26.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (44 lines) | stat: -rw-r--r-- 1,153 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# fmt: off

"""
Exceptions for the general error types that can occur either while
setting up the calculator, which requires constructing KIM API C++
objects, or while running a simulation
"""
from ase.calculators.calculator import CalculatorError


class KIMCalculatorError(CalculatorError):
    """
    Indicates an error occurred in initializing an applicable
    calculator.  This either results from incompatible combinations of
    argument values passed to kim.KIM(), or from models that are
    incompatible in some way with this calculator
    """


class KIMModelNotFound(CalculatorError):
    """
    Requested model cannot be found in any of the KIM API model
    collections on the system
    """


class KIMModelInitializationError(CalculatorError):
    """
    KIM API Model object or ComputeArguments object could not be
    successfully created
    """


class KimpyError(CalculatorError):
    """
    A call to a kimpy function resulted in a RuntimeError being raised
    """


class KIMModelParameterError(CalculatorError):
    """
    An attempt to either access or mutate a KIM portable model
    parameter was unsuccessful
    """