j["x"] = e[1][0] j["label"] = e[1][1] dict["header"]["x_ticks"].append(j) dict["bands"] = [] for ik in range(ks.num_kpoints()): bnd_k = {} bnd_k["kpoint"] = [0.0, 0.0, 0.0] for x in range(3): bnd_k["kpoint"][x] = ks(ik).vk()(x) if ik == 32: print(bnd_k["kpoint"][x]) bnd_e = [] for ispn in range(ctx.num_spin_dims()): for j in range(ctx.num_bands()): bnd_e.append(ks(ik).band_energy(j, ispn)) bnd_k["values"] = bnd_e dict["bands"].append(bnd_k) dict2 = dict #plotter(dict) #if I only want to plot plotter(dict, dict2, True) #plotter(dict2) dft = None ctx = None
param_pp["parameters"]["electronic_structure_method"] = "pseudopotential" param_pp["iterative_solver"] = { "energy_tolerance": 1e-2, "residual_tolerance": 1e-6, "num_steps": 20, "subspace_size": 4, "type": "davidson", "converge_by_energy": 1 } param_pp["unit_cell"]["atom_files"] = { "Cu": "Cu.pz-dn-rrkjus_psl.0.2.UPF.json" } param_fp = copy.deepcopy(baseparameters) param_fp["parameters"]["electronic_structure_method"] = "full_potential_lapwlo" param_fp["unit_cell"]["atom_files"] = { "Cu": "Cu.json", } ctx, ks, x_ticks, x_axis = calculate_bands(param_pp) ctx2, ks2, x_ticks2, x_axis2 = calculate_bands(param_fp) dict1 = make_dict(ctx, ks, x_ticks, x_axis) dict2 = make_dict(ctx2, ks2, x_ticks2, x_axis2) plotter(dict1, "pseudopotential", dict2, "full_potential", True) #plotter(dict2, "full_potential") dft = None ctx = None ctx2 = None