localExactExchangeFraction

localExactExchangeFraction(configuration)
Parameters:

configuration (BulkConfiguration | MoleculeConfiguration) – The configuration of the system.

Returns:

The local exact exchange fraction as a GridValues object. This is primarily useful for calculations using hybrid functional and in particular when using HSE06LocalDDH or HSE06MetallicLocalDDH functionals, where the exact exchange fraction is a local property and varies over the unit cell. For HSE06 or HSE06DDH functionals a grid with a constant value will be returned. For non-hybrid functional a zero-valued grid is returned.

Return type:

GridValues

Usage Examples

In this example we perform a calculation for a Ag-Si interface using a small SZP basis set. The calculation is performed using the HSE06MetallicLocalDDH functional.

# Set minimal log verbosity
setVerbosity(MinimalLog)

# %% bulk_configuration

# Set up lattice
vector_a = [3.8400140859116654, 0.0, 0.0]*Angstrom
vector_b = [-2.3513304794962353e-16, 3.8400140859116654, 0.0]*Angstrom
vector_c = [0.0, 0.0, 29.888932833784352]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Silver, Silver, Silver, Silver, Silver, Silver, Silver, Silver,
            Silver, Silver, Silver, Silver, Silicon, Silicon, Silicon, Silicon,
            Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Silicon,
            Silicon, Silicon]

# Define coordinates
fractional_coordinates = [[ 0.25          ,  0.75          ,  0.033457199879],
                          [ 0.75          ,  0.25          ,  0.033457199879],
                          [ 0.25          ,  0.25          ,  0.101805240653],
                          [ 0.75          ,  0.75          ,  0.101805240653],
                          [ 0.25          ,  0.75          ,  0.170153281426],
                          [ 0.75          ,  0.25          ,  0.170153281426],
                          [ 0.25          ,  0.25          ,  0.2385013222  ],
                          [ 0.75          ,  0.75          ,  0.2385013222  ],
                          [ 0.25          ,  0.75          ,  0.306849362973],
                          [ 0.75          ,  0.25          ,  0.306849362973],
                          [ 0.25          ,  0.25          ,  0.375197403747],
                          [ 0.75          ,  0.75          ,  0.375197403747],
                          [ 0.25          ,  0.75          ,  0.421464791126],
                          [ 0.75          ,  0.75          ,  0.466887958543],
                          [ 0.75          ,  0.25          ,  0.512311125959],
                          [ 0.25          ,  0.25          ,  0.557734293375],
                          [ 0.25          ,  0.75          ,  0.603157460791],
                          [ 0.75          ,  0.75          ,  0.648580628207],
                          [ 0.75          ,  0.25          ,  0.694003795624],
                          [ 0.25          ,  0.25          ,  0.73942696304 ],
                          [ 0.25          ,  0.75          ,  0.784850130456],
                          [ 0.75          ,  0.75          ,  0.830273297872],
                          [ 0.75          ,  0.25          ,  0.875696465288],
                          [ 0.25          ,  0.25          ,  0.921119632704],
                          [ 0.25          ,  0.75          ,  0.966542800121]]

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )



# LCAOCalculator

#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = HybridGGA.HSE06MetallicLocalDDH

k_point_sampling = KpointDensity(
    density_a=4.0*Angstrom,
    density_b=4.0*Angstrom,
    density_c=4.0*Angstrom
)

numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=k_point_sampling
)

#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = [
    GGABasis.Silicon_SingleZetaPolarized,
    GGABasis.Silver_SingleZetaPolarized,
    ]

calculator = LCAOCalculator(
    basis_set=basis_set,
    exchange_correlation=exchange_correlation,
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    checkpoint_handler=NoCheckpointHandler
)


# Set Calculator
bulk_configuration.setCalculator(calculator)

bulk_configuration.update()
nlsave('Ag-Si-interface.hdf5', bulk_configuration)


# Calculate local exact exchange fraction
local_exchange_fraction = localExactExchangeFraction(bulk_configuration)
nlsave('Ag-Si-interface.hdf5', local_exchange_fraction)

Ag-Si-interface-HSE06MetallicLocalDDH.py

Results from similar scripts, but with different exchange correlation functionals are shown in the figure below

../../../_images/Ag-Si-interface-local-exchange-fractions-plot.png

The HSE06MetallicLocalDDH gives an exchange fraction around 0.257 in the center of the Si part, while it decays to zero in the center of the metallic Ag part. This means that the (central) Ag is calculated using the PBE functional. Using HSE06LocalDDH leads to an increased exchange fraction in the Ag region, while HSE06DDH results in a constant exchange fraction of 0.277, slightly larger than the normal HSE06 value of 0.25. For a GGA calculation the exact exchange fraction is zero.