def show_num_triplets(primitive, mesh, mesh_divs, grid_points, coarse_mesh_shifts, is_kappa_star, symprec, log_level): print("-" * 76) ir_grid_points, _, grid_address, _ = get_coarse_ir_grid_points( primitive, mesh, mesh_divs, coarse_mesh_shifts, is_kappa_star=is_kappa_star, symprec=symprec) if grid_points: _grid_points = grid_points else: _grid_points = ir_grid_points print("Grid point q-point No. of triplets") for gp in _grid_points: num_triplets = get_number_of_triplets(primitive, mesh, gp, symprec=symprec) q = grid_address[gp] / np.array(mesh, dtype='double') print(" %5d (%5.2f %5.2f %5.2f) %8d" % (gp, q[0], q[1], q[2], num_triplets))
def show_num_triplets(primitive, mesh, mesh_divs=None, band_indices=None, grid_points=None, coarse_mesh_shifts=None, is_kappa_star=True, symprec=1e-5): print("-" * 76) ir_grid_points, _, grid_address, _ = get_coarse_ir_grid_points( primitive, mesh, mesh_divs, coarse_mesh_shifts, is_kappa_star=is_kappa_star, symprec=symprec) if grid_points: _grid_points = grid_points else: _grid_points = ir_grid_points num_band = primitive.get_number_of_atoms() * 3 if band_indices is None: num_band0 = num_band else: num_band0 = len(band_indices) print("Grid point q-point No. of triplets Memory size") for gp in _grid_points: num_triplets = get_number_of_triplets(primitive, mesh, gp, swappable=True, symprec=symprec) q = grid_address[gp] / np.array(mesh, dtype='double') size = num_triplets * num_band0 * num_band ** 2 * 8 / 1e6 print(" %5d (%5.2f %5.2f %5.2f) %8d %d Mb" % (gp, q[0], q[1], q[2], num_triplets, size))