3.7.8. horton.meanfield.libxc – Interface to LDA, GGA and hybrid functionals from LibXC

class horton.meanfield.libxc.LibXCEnergy(name)

Bases: horton.meanfield.gridgroup.GridObservable

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(cache, grid, *args)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(cache, grid)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
LibXCWrapper = None
df_level = None
prefix = None
class horton.meanfield.libxc.RLibXCLDA(name)

Bases: horton.meanfield.libxc.LibXCEnergy

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.RLibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(**kwargs)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
df_level = 0
prefix = 'lda'
class horton.meanfield.libxc.ULibXCLDA(name)

Bases: horton.meanfield.libxc.LibXCEnergy

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.ULibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
df_level = 0
prefix = 'lda'
class horton.meanfield.libxc.RLibXCGGA(name)

Bases: horton.meanfield.libxc.LibXCEnergy

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.RLibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(**kwargs)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
df_level = 1
prefix = 'gga'
class horton.meanfield.libxc.ULibXCGGA(name)

Bases: horton.meanfield.libxc.LibXCEnergy

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.ULibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
df_level = 1
prefix = 'gga'
class horton.meanfield.libxc.RLibXCHybridGGA(name)

Bases: horton.meanfield.libxc.RLibXCGGA

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.RLibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(**kwargs)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
get_exx_fraction()

Return the fraction of Hartree-Fock exchange for this functional.

df_level = 1
prefix = 'hyb_gga'
class horton.meanfield.libxc.ULibXCHybridGGA(name)

Bases: horton.meanfield.libxc.ULibXCGGA

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.ULibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
get_exx_fraction()

Return the fraction of Hartree-Fock exchange for this functional.

df_level = 1
prefix = 'hyb_gga'
class horton.meanfield.libxc.RLibXCMGGA(name)

Bases: horton.meanfield.libxc.LibXCEnergy

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.RLibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
df_level = 2
prefix = 'mgga'
class horton.meanfield.libxc.ULibXCMGGA(name)

Bases: horton.meanfield.libxc.LibXCEnergy

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.ULibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
df_level = 2
prefix = 'mgga'
class horton.meanfield.libxc.RLibXCHybridMGGA(name)

Bases: horton.meanfield.libxc.RLibXCMGGA

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.RLibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
get_exx_fraction()

Return the fraction of Hartree-Fock exchange for this functional.

df_level = 2
prefix = 'hyb_mgga'
class horton.meanfield.libxc.ULibXCHybridMGGA(name)

Bases: horton.meanfield.libxc.ULibXCMGGA

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
LibXCWrapper

alias of horton.meanfield.cext.ULibXCWrapper

__init__(name)

Initialize a LibXCEnergy instance.

Parameters:name (str) – The name of the functional in LibXC, without the lda_, gga_ or hyb_gga_ prefix. (The type of functional is determined by the subclass.)
add_dot(cache, grid, *args)

Add a dot product with the kernel to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) – The result of this method is added to these output arguments. They are a list of dot arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) To each array dot data will be added, e.g. the dot product of the density kernel with a change in density, the dot product of the gradient kernel with a change in gradient, etc.
add_pot(**kwargs)

Add the potential to the output arguments.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
  • args (list of [np.ndarray, shape=(npoint, npot), dtype=float]) –

    A list of potential arrays. (Only one array for the alpha density in case of restricted. Two arrays, one for alpha and one for beta electrons, in case of unrestricted.) Each array contains potential data, e.g. derivatives of a density functional toward:

    • column 0: the density
    • columns 1,2,3: gradient (x, y, z)
    • column 4: Laplacian
    • column 5: kinetic energy density

    Later columns may not be present if the functional does not need them. They could be present when other terms in the effective Hamiltonian need them.

compute_energy(**kwargs)

Compute the expectation value using numerical integration.

Parameters:
  • cache (Cache) – Used to share intermediate results between the compute and add_pot methods. This cache will also contain pre-computed functions evaluate on the grid. See RGridGroup and UGridGroup for more details.
  • grid (IntGrid) – A numerical integration grid.
get_exx_fraction()

Return the fraction of Hartree-Fock exchange for this functional.

df_level = 2
prefix = 'hyb_mgga'