Esempio n. 1
0
if np.abs(eM2 - 7.914302) > 1e-3:
    raise ValueError(
        "Incorrect value for Diamond dielectric constant with ALDA Kernel %.4f"
        % (eM2))

# Dielectric function
df = DF(calc='C2.gpw',
        q=q,
        w=w,
        eta=0.40,
        nbands=nbands,
        xc='Bootstrap',
        ecut=100,
        hilbert_trans=False,
        optical_limit=True)
df.get_absorption_spectrum(filename='C2.dat')

spect = np.loadtxt('C2.dat.y')
eps2_max = spect[0][spect[6].argmax()]

if np.abs(eps2_max - 8.92972) > 1e-3:
    raise ValueError(
        "Incorrect position for Diamond dielectric function peak with Bootstrap Kernel %.4f"
        % (eps2_max))

# RPA:
# With kpts=(12,12,12) and bands=64, ecut=250eV, this script gives 5.56
# Value from PRB 73, 045112 with kpts=(12,12,12) and bands=64: 5.55
# ALDA:
# With kpts=(12,12,12) and bands=64, ecut=250eV, this script gives 5.82
# Value from PRB 73, 045112 with kpts=(12,12,12) and bands=64: 5.82
Esempio n. 2
0
        optical_limit=True)
eM1, eM2 = df.get_macroscopic_dielectric_constant(xc='ALDA')

if np.abs(eM2 - 7.914302) > 1e-3:
    raise ValueError("Incorrect value for Diamond dielectric constant with ALDA Kernel %.4f" % (eM2))

# Dielectric function
df = DF(calc='C2.gpw',
        q=q,
        w=w,
        eta=0.40,
        nbands=nbands,
        xc='Bootstrap',
        ecut=100,
        hilbert_trans=False,
        optical_limit=True)
df.get_absorption_spectrum(filename='C2.dat')

spect = np.loadtxt('C2.dat.y')
eps2_max = spect[0][spect[6].argmax()]

if np.abs(eps2_max - 8.92972)>1e-3:
    raise ValueError("Incorrect position for Diamond dielectric function peak with Bootstrap Kernel %.4f" % (eps2_max))

# RPA:
# With kpts=(12,12,12) and bands=64, ecut=250eV, this script gives 5.56
# Value from PRB 73, 045112 with kpts=(12,12,12) and bands=64: 5.55
# ALDA:
# With kpts=(12,12,12) and bands=64, ecut=250eV, this script gives 5.82 
# Value from PRB 73, 045112 with kpts=(12,12,12) and bands=64: 5.82
Esempio n. 3
0
            eta=0.001,
            hilbert_trans=False,
            ecut=150,
            optical_limit=True,
            txt='df_1.out')

    eM1, eM2 = df.get_macroscopic_dielectric_constant()

    df.write('df_1.pckl')

    if np.abs(eM1 - 13.991793) > 1e-3 or np.abs(eM2 - 12.589129) > 1e-3:
        print(eM1, eM2)
        raise ValueError('Please check dielectric constant !')

    #getting absorption spectrum
    df = DF(calc='si.gpw',
            q=q,
            w=w,
            eta=0.1,
            ecut=150,
            optical_limit=True,
            txt='df_2.out')

    df.get_absorption_spectrum(filename='si_abs')
    df.check_sum_rule()

    df.write('df_2.pckl')

    if rank == 0:
        os.remove('si.gpw')