def create_supercell(system, supercell=[[-<NUM_LIT:1>, <NUM_LIT:1>], [-<NUM_LIT:1>, <NUM_LIT:1>], [-<NUM_LIT:1>, <NUM_LIT:1>]]):
if '<STR_LIT>' not in system.keys():<EOL><INDENT>matrix = unit_cell_to_lattice_array(system['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>matrix = system['<STR_LIT>']<EOL><DEDENT>coordinates = deepcopy(system['<STR_LIT>'])<EOL>multiplication_matrices = []<EOL>for a_ in range(supercell[<NUM_LIT:0>][<NUM_LIT:0>], supercell[<NUM_LIT:0>][<NUM_LIT:1>] + <NUM_LIT:1>):<EOL><INDENT>for b_ in range(supercell[<NUM_LIT:1>][<NUM_LIT:0>], supercell[<NUM_LIT:1>][<NUM_LIT:1>] + <NUM_LIT:1>):<EOL><INDENT>for c_ in range(supercell[<NUM_LIT:2>][<NUM_LIT:0>], supercell[<NUM_LIT:2>][<NUM_LIT:1>] + <NUM_LIT:1>):<EOL><INDENT>mult_matrix = np.array([[a_, b_, c_]])<EOL>mult_matrix = np.repeat(<EOL>mult_matrix, coordinates.shape[<NUM_LIT:0>], axis=<NUM_LIT:0>)<EOL>multiplication_matrices.append(mult_matrix)<EOL><DEDENT><DEDENT><DEDENT>frac_coordinates = cart2frac_all(coordinates, matrix)<EOL>updated_coordinates = []<EOL>for mat in multiplication_matrices:<EOL><INDENT>updated_coor = frac_coordinates + mat<EOL>updated_coordinates.append(updated_coor)<EOL><DEDENT>supercell_frac_coordinates = np.concatenate(updated_coordinates, axis=<NUM_LIT:0>)<EOL>supercell_coordinates = frac2cart_all(supercell_frac_coordinates, matrix)<EOL>new_elements = deepcopy(system['<STR_LIT>'])<EOL>new_ids = deepcopy(system['<STR_LIT>'])<EOL>for i in range(len(updated_coordinates) - <NUM_LIT:1>):<EOL><INDENT>new_elements = np.concatenate((new_elements, system['<STR_LIT>']))<EOL>new_ids = np.concatenate((new_ids, system['<STR_LIT>']))<EOL><DEDENT>cryst = lattice_array_to_unit_cell(matrix)<EOL>supercell_system = {<EOL>'<STR_LIT>': new_elements,<EOL>'<STR_LIT>': new_ids,<EOL>'<STR_LIT>': supercell_coordinates,<EOL>'<STR_LIT>': cryst,<EOL>'<STR_LIT>': matrix,<EOL>}<EOL>return supercell_system<EOL>
Create a supercell.