# Path: paratemp/exceptions.py
# class UnknownEnergyError(Exception):
#     """
#     Exception raised when an object does not know it's energy, but it's queried
# 
#     """
# 
#     def __init__(self, msg=None):
#         self.msg = msg
# 
#     def __str__(self):
#         standard_response = (
#             "The energy is unknown either because it wasn't "
#             "in the original file or the coordinates have "
#             "changed.\nCould try XYZ.original_energy"
#         )
#         if self.msg is None:
#             return repr(standard_response)
#         else:
#             return repr(self.msg)
# 
# class InputError(Exception):
#     """Exception raised for errors in the input.
# 
#     Attributes:
#         expr -- input expression in which the error occurred
#         msg  -- explanation of the error
#     """
# 
#     def __init__(self, expr, msg):
#         self.expr = expr
#         self.msg = msg
# 
#     def __str__(self):
#         output = 'Incorrect input "{}". {}'.format(self.expr, self.msg)
#         return repr(output)


import re
import numpy as np
from numpy.linalg import norm
from .exceptions import UnknownEnergyError, InputError
        vec_x = Vector(1, 0, 0)
        angle = self.coords[index].diff_angle(vec_x)
        axis = self.coords[index].cross(vec_x)
        self.coords = [coord.rotate(angle, axis) for coord in self.coords]

    def center_and_rotate_on(self, index1, index2):
        self.center_on(index1)
        self.rotate_to_x_axis_on(index2)

    def __str__(self):
        f_string = "   {0: <10s} {1.x: > 10.5f} {1.y: > 10.5f} " "{1.z: > 10.5f}\n"
        output_list = list(self._header)
        output_list += [
            f_string.format(self.atoms[i], self.coords[i])
            for i in range(len(self.atoms))
        ]
        return "".join(output_list)

    @property
    def n_atoms(self):
        _n_atoms = len(self.atoms)
        _n_coords = len(self.coords)
        if _n_atoms != _n_coords:
            print("!!n atoms != n coords!! ({} != {})".format(_n_atoms, _n_coords))
        else:
            return _n_atoms

    @property
    def energy(self):
        if self._energy is None:

# Path: paratemp/exceptions.py
# class UnknownEnergyError(Exception):
#     """
#     Exception raised when an object does not know it's energy, but it's queried
# 
#     """
# 
#     def __init__(self, msg=None):
#         self.msg = msg
# 
#     def __str__(self):
#         standard_response = (
#             "The energy is unknown either because it wasn't "
#             "in the original file or the coordinates have "
#             "changed.\nCould try XYZ.original_energy"
#         )
#         if self.msg is None:
#             return repr(standard_response)
#         else:
#             return repr(self.msg)
# 
# class InputError(Exception):
#     """Exception raised for errors in the input.
# 
#     Attributes:
#         expr -- input expression in which the error occurred
#         msg  -- explanation of the error
#     """
# 
#     def __init__(self, expr, msg):
#         self.expr = expr
#         self.msg = msg
# 
#     def __str__(self):
#         output = 'Incorrect input "{}". {}'.format(self.expr, self.msg)
#         return repr(output)


# Path: paratemp/geometries.py
import re
import numpy as np
from numpy.linalg import norm
from .exceptions import UnknownEnergyError, InputError

        vec_x = Vector(1, 0, 0)
        angle = self.coords[index].diff_angle(vec_x)
        axis = self.coords[index].cross(vec_x)
        self.coords = [coord.rotate(angle, axis) for coord in self.coords]

    def center_and_rotate_on(self, index1, index2):
        self.center_on(index1)
        self.rotate_to_x_axis_on(index2)

    def __str__(self):
        f_string = "   {0: <10s} {1.x: > 10.5f} {1.y: > 10.5f} " "{1.z: > 10.5f}\n"
        output_list = list(self._header)
        output_list += [
            f_string.format(self.atoms[i], self.coords[i])
            for i in range(len(self.atoms))
        ]
        return "".join(output_list)

    @property
    def n_atoms(self):
        _n_atoms = len(self.atoms)
        _n_coords = len(self.coords)
        if _n_atoms != _n_coords:
            print("!!n atoms != n coords!! ({} != {})".format(_n_atoms, _n_coords))
        else:
            return _n_atoms

    @property
    def energy(self):
        if self._energy is None:

            raise UnknownEnergyError()