3.9.9. horton.meanfield.observable – Base classes for energy terms and other observables of the wavefunction

class horton.meanfield.observable.Observable(label)

Bases: object

__init__(label)
add_fock(cache, *focks)

Add contributions to the Fock matrices.

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
fock1, fock2, …
A list of output fock operators. The caller is responsible for setting these operators initially to zero (if desired).
compute_energy(cache)

Compute the expectation value of the observable

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
class horton.meanfield.observable.RTwoIndexTerm(op_alpha, label)

Bases: horton.meanfield.observable.Observable

Class for all observables that are linear in the density matrix of a restricted wavefunction.

__init__(op_alpha, label)
add_fock(cache, fock_alpha)

Add contributions to the Fock matrices.

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
fock1, fock2, …
A list of output fock operators. The caller is responsible for setting these operators initially to zero (if desired).
compute_energy(cache)

Compute the expectation value of the observable

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
class horton.meanfield.observable.UTwoIndexTerm(op_alpha, label, op_beta=None)

Bases: horton.meanfield.observable.Observable

Class for all observables that are linear in the density matrix of an unrestricted wavefunction.

__init__(op_alpha, label, op_beta=None)
add_fock(cache, fock_alpha, fock_beta)

Add contributions to the Fock matrices.

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
fock1, fock2, …
A list of output fock operators. The caller is responsible for setting these operators initially to zero (if desired).
compute_energy(cache)

Compute the expectation value of the observable

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
class horton.meanfield.observable.RDirectTerm(op_alpha, label)

Bases: horton.meanfield.observable.Observable

__init__(op_alpha, label)
add_fock(cache, fock_alpha)

Add contributions to the Fock matrices.

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
fock1, fock2, …
A list of output fock operators. The caller is responsible for setting these operators initially to zero (if desired).
compute_energy(cache)

Compute the expectation value of the observable

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
class horton.meanfield.observable.UDirectTerm(op_alpha, label, op_beta=None)

Bases: horton.meanfield.observable.Observable

__init__(op_alpha, label, op_beta=None)
add_fock(cache, fock_alpha, fock_beta)

Add contributions to the Fock matrices.

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
fock1, fock2, …
A list of output fock operators. The caller is responsible for setting these operators initially to zero (if desired).
compute_energy(cache)

Compute the expectation value of the observable

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
class horton.meanfield.observable.RExchangeTerm(op_alpha, label, fraction=1.0)

Bases: horton.meanfield.observable.Observable

__init__(op_alpha, label, fraction=1.0)
add_fock(cache, fock_alpha)

Add contributions to the Fock matrices.

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
fock1, fock2, …
A list of output fock operators. The caller is responsible for setting these operators initially to zero (if desired).
compute_energy(cache)

Compute the expectation value of the observable

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
class horton.meanfield.observable.UExchangeTerm(op_alpha, label, fraction=1.0, op_beta=None)

Bases: horton.meanfield.observable.Observable

__init__(op_alpha, label, fraction=1.0, op_beta=None)
add_fock(cache, fock_alpha, fock_beta)

Add contributions to the Fock matrices.

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
fock1, fock2, …
A list of output fock operators. The caller is responsible for setting these operators initially to zero (if desired).
compute_energy(cache)

Compute the expectation value of the observable

Arguments:

cache
A cache object used to store intermediate results that can be reused or inspected later.
horton.meanfield.observable.compute_dm_full(cache)

Add the spin-summed density matrix to the cache unless it is already present.