File: exceptions.py

package info (click to toggle)
python-ase 3.21.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,936 kB
  • sloc: python: 122,428; xml: 946; makefile: 111; javascript: 47
file content (43 lines) | stat: -rw-r--r-- 1,013 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
"""
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
    """

    pass


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

    pass


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

    pass


class KimpyError(CalculatorError):
    """
    A call to a kimpy function returned a non-zero error code
    """

    pass