# Path: mpinterfaces/transformations.py
# def get_trans_matrices(n):
#     """
#     Returns a list of 2x2 transformation matrices for the
#     given supercell
# 
#     n: size of the supercell (area wise only)
#     """
# 
#     factors = []
#     for i in range(1, n + 1):
#         if n % i == 0:
#             factors.append(i)
# 
#     trans_matrices = []
#     for i in factors:
#         m = n // i
#         tm = [[[i, j], [0, m]] for j in range(m)]
#         trans_matrices.append(tm)
#     all_tm = []
#     for i in range(0, len(trans_matrices)):
#         each_set = trans_matrices[i]
#         for j in range(0,len(each_set)):
#             all_tm.append(each_set[j])
#     return all_tm


import unittest
from mpinterfaces.transformations import get_trans_matrices
""" tests for mpinterfaces.transformations """

from __future__ import unicode_literals


__author__ = "Seve G. Monahan"
__copyright__ = "Copyright 2017, Henniggroup"
__maintainer__ = "Joshua J. Gabriel"
__email__ = "joshgabriel92@gmail.com"
__status__ = "Production"
__date__ = "March 3, 2017"

# We're going to turn the generator into a list,
# because it really should be.

# Deprecated
def list_trans(number):
    """ Turn the get_trans_matrices of number into a list, with each pair
        of numbers being a single entry on that list. The is preceding a
        refactor where get_trans_matrices will output the output of this
        function """
    generated_list = list(get_trans_matrices(number))


# Path: mpinterfaces/transformations.py
# def get_trans_matrices(n):
#     """
#     Returns a list of 2x2 transformation matrices for the
#     given supercell
# 
#     n: size of the supercell (area wise only)
#     """
# 
#     factors = []
#     for i in range(1, n + 1):
#         if n % i == 0:
#             factors.append(i)
# 
#     trans_matrices = []
#     for i in factors:
#         m = n // i
#         tm = [[[i, j], [0, m]] for j in range(m)]
#         trans_matrices.append(tm)
#     all_tm = []
#     for i in range(0, len(trans_matrices)):
#         each_set = trans_matrices[i]
#         for j in range(0,len(each_set)):
#             all_tm.append(each_set[j])
#     return all_tm


# Path: mpinterfaces/tests/test_get_trans_matrices.py
import unittest
from mpinterfaces.transformations import get_trans_matrices

""" tests for mpinterfaces.transformations """

from __future__ import unicode_literals


__author__ = "Seve G. Monahan"
__copyright__ = "Copyright 2017, Henniggroup"
__maintainer__ = "Joshua J. Gabriel"
__email__ = "joshgabriel92@gmail.com"
__status__ = "Production"
__date__ = "March 3, 2017"

# We're going to turn the generator into a list,
# because it really should be.

# Deprecated
def list_trans(number):
    """ Turn the get_trans_matrices of number into a list, with each pair
        of numbers being a single entry on that list. The is preceding a
        refactor where get_trans_matrices will output the output of this
        function """
    generated_list = list(get_trans_matrices(number))


    generated_list_2 = []