def __init__(self, calc=None, nbands=None, w=None, q=None, eshift=None, ecut=10., density_cut=None, G_plus_q=False, eta=0.2, rpad=None, vcut=None, ftol=1e-7, txt=None, xc='ALDA', print_xc_scf=False, hilbert_trans=True, time_ordered=False, optical_limit=False, comm=None, kcommsize=None): CHI.__init__(self, calc=calc, nbands=nbands, w=w, q=q, eshift=eshift, ecut=ecut, density_cut=density_cut, G_plus_q=G_plus_q, eta=eta, rpad=rpad, vcut=vcut, ftol=ftol, txt=txt, xc=xc, hilbert_trans=hilbert_trans, time_ordered=time_ordered, optical_limit=optical_limit, comm=comm, kcommsize=kcommsize) self.df_flag = False self.print_bootstrap = print_xc_scf self.df1_w = None # NLF RPA self.df2_w = None # LF RPA self.df3_w = None # NLF ALDA self.df4_w = None # LF ALDA
def __init__(self, calc=None, nbands=None, w=None, q=None, ecut=10., eta=0.2, ftol=1e-7, txt=None, hilbert_trans=True, full_response=False, optical_limit=False, kcommsize=None): CHI.__init__(self, calc, nbands, w, q, ecut, eta, ftol, txt, hilbert_trans, full_response, optical_limit, kcommsize) self.df1_w = None self.df2_w = None
print(name) if 1: calc = a.calc = GPAW(kpts=kpts, eigensolver='rmm-diis', usesymm=sym, mode='pw', width=0.001, txt=name + '.txt') e = a.get_potential_energy() #calc.diagonalize_full_hamiltonian(nbands=100) calc.write(name, 'all') calc = GPAW(name, txt=None, communicator=serial_comm) chiold = CHI(calc, w=omega, q=q_c, ecut=100, hilbert_trans=False, xc='RPA', G_plus_q=True, txt=name + '.logold') chiold.initialize() chiold.calculate() chi0old_wGG = chiold.chi0_wGG chi = Chi0(calc, omega, hilbert=False, ecut=100, txt=name + '.log') pd, chi0_wGG, _, _ = chi.calculate(q_c) assert abs(chi0_wGG - chi0old_wGG).max() < 1e-15 if sym is None and not center: chi00_w = chi0_wGG[:, 0, 0] elif -1 not in calc.wfs.kd.bz2bz_ks: assert abs(chi0_wGG[:, 0, 0] - chi00_w).max() < 3e-5
calc = a.calc = GPAW(kpts=kpts, eigensolver='rmm-diis', symmetry={'point_group': sym}, mode='pw', width=0.001, txt=name + '.txt') e = a.get_potential_energy() #calc.diagonalize_full_hamiltonian(nbands=100) calc.write(name, 'all') calc = GPAW(name, txt=None, communicator=serial_comm) chiold = CHI(calc, w=omega, q=q_c, ecut=100, hilbert_trans=False, xc='RPA', G_plus_q=True, txt=name + '.logold') chiold.initialize() chiold.calculate() chi0old_wGG = chiold.chi0_wGG chi = Chi0(calc, omega, hilbert=False, ecut=100, txt=name + '.log') pd, chi0_wGG, _, _ = chi.calculate(q_c) assert abs(chi0_wGG - chi0old_wGG).max() < 1e-15