Source code for calphy.errors

"""
calphy: a Python library and command line interface for automated free
energy calculations.

Copyright 2021  (c) Sarath Menon^1, Yury Lysogorskiy^2, Ralf Drautz^2
^1: Max Planck Institut für Eisenforschung, Dusseldorf, Germany 
^2: Ruhr-University Bochum, Bochum, Germany

calphy is published and distributed under the Academic Software License v1.0 (ASL). 
calphy is distributed in the hope that it will be useful for non-commercial academic research, 
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
calphy API is published and distributed under the BSD 3-Clause "New" or "Revised" License
See the LICENSE FILE for more details. 

More information about the program can be found in:
Menon, Sarath, Yury Lysogorskiy, Jutta Rogal, and Ralf Drautz.
“Automated Free Energy Calculation from Atomistic Simulations.” Physical Review Materials 5(10), 2021
DOI: 10.1103/PhysRevMaterials.5.103801

For more information contact:
sarath.menon@ruhr-uni-bochum.de/yury.lysogorskiy@icams.rub.de
"""

[docs]class CustomError(Exception): """ Base class for raising calphy specific exceptions """ pass
[docs]class MeltedError(CustomError): pass
[docs]class SolidifiedError(CustomError): pass
[docs]class PhaseTransitionError(CustomError): """Raised when the pre-flight temperature-range scan flags a phase transition.""" pass
[docs]class LammpsExecutionError(RuntimeError): """LAMMPS binary exited abnormally. Carries the segment script path, the segment log path, and a short excerpt of the log (or stderr) so the failure can be diagnosed without re-running. """ pass
[docs]class RunnerStateError(RuntimeError): """Invalid command sequence for segmented execution. Raised for an unknown command, a dump left live across a segment boundary, an immediate-evaluation variable crossing a boundary, or a ``fix print`` being replayed -- anything the ExecutableRunner cannot faithfully reproduce. """ pass