Returns a symmetrized molecule

        The equivalent atoms obtained via
        :meth:`~Cartesian.get_equivalent_atoms`
        are rotated, mirrored... unto one position.
        Then the average position is calculated.
        The average position is rotated, mirrored... back with the inverse
        of the previous symmetry operations, which gives the
        symmetrized molecule.
        This operation is repeated iteratively ``max_n`` times at maximum
        until the difference between subsequently symmetrized structures is
        smaller than ``epsilon``.

        Args:
            max_n (int): Maximum number of iterations.
            tolerance (float): Tolerance for detecting symmetry.
                Gets passed as Argument into
                :class:`~pymatgen.analyzer.symmetry.PointGroupAnalyzer`.
            epsilon (float): If the elementwise absolute difference of two
                subsequently symmetrized structures is smaller epsilon,
                the iteration stops before ``max_n`` is reached.

        Returns:
            dict: The returned dictionary has three possible keys:

            ``sym_mol``:
            A symmetrized molecule :class:`~Cartesian`

            ``eq_sets``:
            A dictionary of indices mapping to sets of indices,
            each key maps to indices of all equivalent atoms.
            The keys are guaranteed to be not symmetry-equivalent.

            ``sym_ops``:
            Twofold nested dictionary.
            ``operations[i][j]`` gives the symmetry operation
            that maps atom ``i`` unto ``j``.

def symmetrize(self, max_n=10, tolerance=0.3, epsilon=1e-3):
        """Returns a symmetrized molecule

        The equivalent atoms obtained via
        :meth:`~Cartesian.get_equivalent_atoms`
        are rotated, mirrored... unto one position.
        Then the average position is calculated.
        The average position is rotated, mirrored... back with the inverse
        of the previous symmetry operations, which gives the
        symmetrized molecule.
        This operation is repeated iteratively ``max_n`` times at maximum
        until the difference between subsequently symmetrized structures is
        smaller than ``epsilon``.

        Args:
            max_n (int): Maximum number of iterations.
            tolerance (float): Tolerance for detecting symmetry.
                Gets passed as Argument into
                :class:`~pymatgen.analyzer.symmetry.PointGroupAnalyzer`.
            epsilon (float): If the elementwise absolute difference of two
                subsequently symmetrized structures is smaller epsilon,
                the iteration stops before ``max_n`` is reached.

        Returns:
            dict: The returned dictionary has three possible keys:

            ``sym_mol``:
            A symmetrized molecule :class:`~Cartesian`

            ``eq_sets``:
            A dictionary of indices mapping to sets of indices,
            each key maps to indices of all equivalent atoms.
            The keys are guaranteed to be not symmetry-equivalent.

            ``sym_ops``:
            Twofold nested dictionary.
            ``operations[i][j]`` gives the symmetry operation
            that maps atom ``i`` unto ``j``.
        """
        mg_mol = self.get_pymatgen_molecule()
        eq = iterative_symmetrize(mg_mol, max_n=max_n, tolerance=tolerance,
                                  epsilon=epsilon)
        self._convert_eq(eq)
        return eq