3.9.5. horton.meanfield.gridgroup – Container for observables involving numerical integration

class horton.meanfield.gridgroup.GridGroup(obasis, grid, grid_terms, label='grid_group')

Bases: horton.meanfield.observable.Observable

Arguments:

obasis
The orbital basis.
grid
A numerical integration grid. (must have points attribute and integrate method.)
grid_terms
The contributions to the effective Hamiltonian. This must be a list of instances of subclasses of GridObservable.

Optional arguments:

label
A label for the group.
add_fock(cache, *focks)

Add contributions to the Fock matrix

Arguments:

cache
An instance of Cache, used to store intermediate results.

This method basically dispatches the work to all GridObservable instances in self.grid_terms.

compute_energy(cache)

Compute the sum of the expectation values.

Arguments:

cache
An instance of Cache, used to store intermediate results.

This method basically dispatches the work to all GridObservable instances in self.grid_terms.

gga

Flag indicating that density gradients are used

class horton.meanfield.gridgroup.RGridGroup(obasis, grid, grid_terms, label='grid_group')

Bases: horton.meanfield.gridgroup.GridGroup

Arguments:

obasis
The orbital basis.
grid
A numerical integration grid. (must have points attribute and integrate method.)
grid_terms
The contributions to the effective Hamiltonian. This must be a list of instances of subclasses of GridObservable.

Optional arguments:

label
A label for the group.
add_fock(cache, *focks)

Add contributions to the Fock matrix

Arguments:

cache
An instance of Cache, used to store intermediate results.

This method basically dispatches the work to all GridObservable instances in self.grid_terms.

compute_energy(cache)

Compute the sum of the expectation values.

Arguments:

cache
An instance of Cache, used to store intermediate results.

This method basically dispatches the work to all GridObservable instances in self.grid_terms.

gga

Flag indicating that density gradients are used

class horton.meanfield.gridgroup.UGridGroup(obasis, grid, grid_terms, label='grid_group')

Bases: horton.meanfield.gridgroup.GridGroup

Arguments:

obasis
The orbital basis.
grid
A numerical integration grid. (must have points attribute and integrate method.)
grid_terms
The contributions to the effective Hamiltonian. This must be a list of instances of subclasses of GridObservable.

Optional arguments:

label
A label for the group.
add_fock(cache, *focks)

Add contributions to the Fock matrix

Arguments:

cache
An instance of Cache, used to store intermediate results.

This method basically dispatches the work to all GridObservable instances in self.grid_terms.

compute_energy(cache)

Compute the sum of the expectation values.

Arguments:

cache
An instance of Cache, used to store intermediate results.

This method basically dispatches the work to all GridObservable instances in self.grid_terms.

gga

Flag indicating that density gradients are used

class horton.meanfield.gridgroup.GridObservable(label)

Bases: object

Arguments:

label
A unique label for this contribution
add_pot(cache, grid, *args)

Add the potential to the output arguments

Arguments:

cache
A Cache instance 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
A numerical integration grid

Possible arguments: depending on the subclass some of these may not be applicable.

dpot_alpha
The functional derivative of the expectation value toward the density of the alpha electron density. Shape = (grid.size,)
dpot_beta
The functional derivative of the expectation value toward the density of the beta electron density. Shape = (grid.size,)
gpot_alpha
The functional derivative of the expectation value toward the gradient of the alpha electron density. Shape = (grid.size, 3)
gpot_beta
The functional derivative of the expectation value toward the gradient of the beta electron density. Shape = (grid.size, 3)
compute_energy(cache, grid)

Compute the expectation value using numerical integration

Arguments:

cache
A Cache instance 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
A numerical integration grid
gga = False