createLocalDFTUBasisSet

createLocalDFTUBasisSet(configuration, basis_set, shell_indices, atom_u_values)

Create a new configuration with tags for the atoms with U values and a new basis set with the U values for the tagged atoms.

Parameters:
  • configuration (BulkConfiguration) – The configuration.

  • basis_set (list of BasisSet objects) – The basis set.

  • shell_indices (dict of PeriodicTableElement to list of int) – The map of elements to shell indices the U values refer to.

  • atom_u_values (list of tuples of int and PhysicalQuantity) – The U values for the atoms: a list of tuples with the atom index and the U values for the selected shells for that atom.

Returns:

The new configuration with tagged atoms and the new basis set list with basis sets for the tagged atoms.

Return type:

BulkConfiguration and list of BasisSet

Usage Examples

The following example sets up a small iron slab, provides different U values for the different atom sites, and uses createLocalDFTUBasisSet() to create a configuration with tags and different basis sets for the different sites with the provided U values. It then calculates the Mulliken population for the system with the provided U’s:

setVerbosity(MinimalLog)

# Set up a simple slab of iron.
iron_slab = BulkConfiguration(
    bravais_lattice=UnitCell(
        [2.8665, 0.0, 0.0] * Angstrom,
        [0.0, 2.8665, 0.0] * Angstrom,
        [0.0, 0.0, 30.0] * Angstrom
    ),
    elements=[Iron, Iron, Iron, Iron, Iron, Iron],
    fractional_coordinates=[
        [ 0.25     ,  0.25     ,  0.3805625],
        [ 0.25     ,  0.25     ,  0.4761125],
        [ 0.25     ,  0.25     ,  0.5716625],
        [ 0.75     ,  0.75     ,  0.4283375],
        [ 0.75     ,  0.75     ,  0.5238875],
        [ 0.75     ,  0.75     ,  0.6194375]
    ]
)

# For this example, we choose a simple Double Zeta Polarized basis set.
basis_set = [GGABasis.Iron_DoubleZetaPolarized]

# The indices of the basis set orbitals that the U values should be applied to.
# Here: For the (FHI) GGA Double Zeta Polarized basis set, the first orbital
# corresponds to the 3d orbital.
shell_indices = {Iron: [0]}

# Provide different 3d U values for the different atom sites.
u_list = [
    (0, [2.44869703] * eV),
    (1, [1.29706963] * eV),
    (2, [1.31089013] * eV),
    (3, [1.31088757] * eV),
    (4, [1.29707183] * eV),
    (5, [2.44867516] * eV),
]

# Create a new configuration and basis set with the above U values:
iron_slab_with_us, basis_set_with_us = createLocalDFTUBasisSet(
    configuration=iron_slab,
    basis_set=basis_set,
    shell_indices=shell_indices,
    atom_u_values=u_list
)

# Set up an PBE functional with +U using the 'Dual' projection method.
xc_dftu = ExchangeCorrelation(
    exchange=PerdewBurkeErnzerhofExchange,
    correlation=PerdewBurkeErnzerhofCorrelation,
    hubbard_term=Dual,
    number_of_spins=2
)

# Set up the calculator with the U basis set.
calculator = LCAOCalculator(
    basis_set=basis_set_with_us,
    exchange_correlation=xc_dftu,
    numerical_accuracy_parameters=NumericalAccuracyParameters(
        k_point_sampling=KpointDensity(4.0 * Angstrom),
    ),
    checkpoint_handler=NoCheckpointHandler,
)

# Calculate Mulliken population
iron_slab_with_us.setCalculator(calculator)
iron_slab_with_us.update()

nlsave('Fe-slab-Hubbard-U.hdf5', iron_slab_with_us)

mulliken = MullikenPopulation(iron_slab_with_us)
nlsave('Fe-slab-Hubbard-U.hdf5', mulliken)

nlprint(mulliken)