# -*- coding: utf-8 -*-
# Copyright (c) 2015-2022, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Exceptions
###############
"""
from exatomic.exa.core.error import ExaException
[docs]class AtomicException(ExaException):
"""
The exatomic exception.
"""
pass
[docs]class ClassificationError(AtomicException):
"""
Raised when a classifier for :func:`~exatomic.molecule.Molecule.add_classification`
used incorrectly.
"""
def __init__(self):
super().__init__(msg='Classifier must be a tuple of the form ("identifier", "label", exact).')
[docs]class PeriodicUniverseError(AtomicException):
"""
Raised when the code is asked to perform a periodic simulation specific
operation on a free boundary condition :class:`~exatomic.container.Universe`.
"""
def __init__(self):
super().__init__(msg='Not a periodic boundary condition Universe?')
[docs]class FreeBoundaryUniverseError(AtomicException):
def __init__(self):
super().__init__(msg='Not a free boundary condition Universe?')
[docs]class BasisSetNotFoundError(AtomicException):
def __init__(self):
super().__init__(msg='Not basis set table present in Universe?')