# Path: pytim/observables/basic_observables.py
# class Number(Observable):
#     """The number of atoms.
#     """
# 
#     def __init__(self, *arg, **kwarg):
#         Observable.__init__(self, None)
# 
#     def compute(self, inp, kargs=None):
#         """Compute the observable.
# 
#         :param AtomGroup inp:  the input atom group
#         :returns: one, for each atom in the group
# 
#         """
#         return np.ones(len(inp))
# 
# Path: pytim/observables/intrinsic_distance.py
# class IntrinsicDistance(Observable):
#     """Initialize the intrinsic distance calculation.
# 
#     :param PYTIM interface: compute the intrinsic distance with respect
#                             to this interface
#     :param str symmetry: force calculation using this symmetry, if
#                             availabe (e.g. 'generic', 'planar', 'spherical')
#                             If 'default', uses the symmetry selected in
#                             the PYTIM interface instance.
# 
#     Example:
# 
#     >>> import MDAnalysis as mda
#     >>> import pytim
#     >>> import numpy as np
#     >>> from pytim import observables
#     >>> from pytim.datafiles import MICELLE_PDB
#     >>> u = mda.Universe(MICELLE_PDB)
#     >>> micelle = u.select_atoms('resname DPC')
#     >>> waterox = u.select_atoms('type O and resname SOL')
#     >>> inter = pytim.GITIM(u,group=micelle, molecular=False, alpha=2.0)
#     >>> dist  = observables.IntrinsicDistance(interface=inter)
#     >>> d = dist.compute(waterox)
#     >>> np.set_printoptions(precision=3,threshold=10)
#     >>> print(d)
#     [25.733  8.579  8.852 ... 18.566 13.709  9.876]
# 
#     >>> np.set_printoptions(precision=None,threshold=None)
#     """
# 
#     def __init__(self, interface, symmetry='default', mode='default'):
#         Observable.__init__(self, interface.universe)
#         self.interface = interface
#         self.mode = mode
#         if symmetry == 'default':
#             self.symmetry = self.interface.symmetry
#         else:
#             self.symmetry = symmetry
# 
#     def compute(self, inp, kargs=None):
#         """Compute the intrinsic distance of a set of points from the first
#         layers.
# 
#         :param ndarray positions: compute the intrinsic distance for this set
#                                   of points
#         """
#         # see pytim/surface.py
#         return self.interface._surfaces[0].distance(inp, self.symmetry, mode=self.mode)


from .basic_observables import Number
from .intrinsic_distance import IntrinsicDistance
from scipy import stats
from MDAnalysis.core.groups import Atom, AtomGroup, Residue, ResidueGroup
import numpy as np
    phase.

    """

    def __init__(self,
                 direction=None,
                 observable=None,
                 interface=None,
                 symmetry='default',
                 mode='default',
                 MCnorm=True,
                 **kargs):

        _dir = {'x': 0, 'y': 1, 'z': 2}
        if direction is None:
            try:
                self._dir = interface.normal
            except:
                self._dir = 2
        else:
            self._dir = _dir[direction]
        self.mode = mode
        self.interface = interface
        self._MCnorm = MCnorm
        self.kargs = kargs
        if symmetry == 'default' and interface is not None:
            self.symmetry = self.interface.symmetry
        else:
            self.symmetry = symmetry
        if observable is None:

# Path: pytim/observables/basic_observables.py
# class Number(Observable):
#     """The number of atoms.
#     """
# 
#     def __init__(self, *arg, **kwarg):
#         Observable.__init__(self, None)
# 
#     def compute(self, inp, kargs=None):
#         """Compute the observable.
# 
#         :param AtomGroup inp:  the input atom group
#         :returns: one, for each atom in the group
# 
#         """
#         return np.ones(len(inp))
# 
# Path: pytim/observables/intrinsic_distance.py
# class IntrinsicDistance(Observable):
#     """Initialize the intrinsic distance calculation.
# 
#     :param PYTIM interface: compute the intrinsic distance with respect
#                             to this interface
#     :param str symmetry: force calculation using this symmetry, if
#                             availabe (e.g. 'generic', 'planar', 'spherical')
#                             If 'default', uses the symmetry selected in
#                             the PYTIM interface instance.
# 
#     Example:
# 
#     >>> import MDAnalysis as mda
#     >>> import pytim
#     >>> import numpy as np
#     >>> from pytim import observables
#     >>> from pytim.datafiles import MICELLE_PDB
#     >>> u = mda.Universe(MICELLE_PDB)
#     >>> micelle = u.select_atoms('resname DPC')
#     >>> waterox = u.select_atoms('type O and resname SOL')
#     >>> inter = pytim.GITIM(u,group=micelle, molecular=False, alpha=2.0)
#     >>> dist  = observables.IntrinsicDistance(interface=inter)
#     >>> d = dist.compute(waterox)
#     >>> np.set_printoptions(precision=3,threshold=10)
#     >>> print(d)
#     [25.733  8.579  8.852 ... 18.566 13.709  9.876]
# 
#     >>> np.set_printoptions(precision=None,threshold=None)
#     """
# 
#     def __init__(self, interface, symmetry='default', mode='default'):
#         Observable.__init__(self, interface.universe)
#         self.interface = interface
#         self.mode = mode
#         if symmetry == 'default':
#             self.symmetry = self.interface.symmetry
#         else:
#             self.symmetry = symmetry
# 
#     def compute(self, inp, kargs=None):
#         """Compute the intrinsic distance of a set of points from the first
#         layers.
# 
#         :param ndarray positions: compute the intrinsic distance for this set
#                                   of points
#         """
#         # see pytim/surface.py
#         return self.interface._surfaces[0].distance(inp, self.symmetry, mode=self.mode)


# Path: pytim/observables/profile.py
from .basic_observables import Number
from .intrinsic_distance import IntrinsicDistance
from scipy import stats
from MDAnalysis.core.groups import Atom, AtomGroup, Residue, ResidueGroup
import numpy as np

    phase.

    """

    def __init__(self,
                 direction=None,
                 observable=None,
                 interface=None,
                 symmetry='default',
                 mode='default',
                 MCnorm=True,
                 **kargs):

        _dir = {'x': 0, 'y': 1, 'z': 2}
        if direction is None:
            try:
                self._dir = interface.normal
            except:
                self._dir = 2
        else:
            self._dir = _dir[direction]
        self.mode = mode
        self.interface = interface
        self._MCnorm = MCnorm
        self.kargs = kargs
        if symmetry == 'default' and interface is not None:
            self.symmetry = self.interface.symmetry
        else:
            self.symmetry = symmetry
        if observable is None:

            self.observable = Number()