3.9.7. horton.meanfield.hamiltonian – Mean-field DFT/HF Hamiltonian data structures

class horton.meanfield.hamiltonian.REffHam(terms, external=None)

Bases: horton.meanfield.hamiltonian.EffHam

Arguments:

terms
The terms in the Hamiltonian.

Optional arguments:

external
A dictionary with external energy contributions that do not depend on the wavefunction, e.g. nuclear-nuclear interactions or QM/MM mechanical embedding terms. Use nn as key for the nuclear-nuclear term.
__init__(terms, external=None)

Arguments:

terms
The terms in the Hamiltonian.

Optional arguments:

external
A dictionary with external energy contributions that do not depend on the wavefunction, e.g. nuclear-nuclear interactions or QM/MM mechanical embedding terms. Use nn as key for the nuclear-nuclear term.
compute_energy()

Compute the expectation value.

The input for this method must be provided through the reset method.

Returns: The expectation value, including the constant terms defined through the external argument of the constructor

compute_fock(fock_alpha)

Compute the fock matrices, defined is derivatives of the expectation value toward the components of the input density matrices.

Arguments:

fock1, fock2, ….
A list of output fock operators. Old content is discarded.

The input for this method must be provided through the reset method.

log()

Write an overview of the last computation on screen

reset(in_dm_alpha)

Clear intermediate results from the cache and specify new input density matrices.

Arguments:

dm1, dm2, …
The input density matrices. Their interpretation is fixed in derived classes.
deriv_scale = 2.0
ndm = 1
class horton.meanfield.hamiltonian.UEffHam(terms, external=None)

Bases: horton.meanfield.hamiltonian.EffHam

Arguments:

terms
The terms in the Hamiltonian.

Optional arguments:

external
A dictionary with external energy contributions that do not depend on the wavefunction, e.g. nuclear-nuclear interactions or QM/MM mechanical embedding terms. Use nn as key for the nuclear-nuclear term.
__init__(terms, external=None)

Arguments:

terms
The terms in the Hamiltonian.

Optional arguments:

external
A dictionary with external energy contributions that do not depend on the wavefunction, e.g. nuclear-nuclear interactions or QM/MM mechanical embedding terms. Use nn as key for the nuclear-nuclear term.
compute_energy()

Compute the expectation value.

The input for this method must be provided through the reset method.

Returns: The expectation value, including the constant terms defined through the external argument of the constructor

compute_fock(fock_alpha, fock_beta)

Compute the fock matrices, defined is derivatives of the expectation value toward the components of the input density matrices.

Arguments:

fock1, fock2, ….
A list of output fock operators. Old content is discarded.

The input for this method must be provided through the reset method.

log()

Write an overview of the last computation on screen

reset(in_dm_alpha, in_dm_beta)

Clear intermediate results from the cache and specify new input density matrices.

Arguments:

dm1, dm2, …
The input density matrices. Their interpretation is fixed in derived classes.
deriv_scale = 1.0
ndm = 2