3.2.1. horton.correlatedwfn.geminal
– Correlated wavefunction implementations¶
This is a general geminals class.
-
class
horton.correlatedwfn.geminal.
Geminal
(lf, occ_model, npairs=None, nvirt=None)¶ Bases:
object
Arguments:
- lf
- A LinalgFactory instance.
- occ_model
- Occupation model
Optional arguments:
- npairs
- Number of electron pairs, if not specified, npairs = number of occupied orbitals
- nvirt
- Number of virtual orbitals, if not specified, nvirt = (nbasis-npairs)
-
__call__
(one, two, core, orb, olp, scf, **kwargs)¶ Optimize geminal coefficients and—if required—find optimal set of orbitals.
Arguments:
- one, two
- One- and two-body integrals (some Hamiltonian matrix elements).
- core
- The core energy (not included in ‘one’ and ‘two’).
- orb
- An expansion instance. It contains the MO coefficients (orbitals).
- olp
- The AO overlap matrix. A TwoIndex instance.
- scf
- A boolean. If True: Initializes orbital optimization.
- Keywords:
- See
RAp1rog.solve()
andRAp1rog.solve_scf()
-
__init__
(lf, occ_model, npairs=None, nvirt=None)¶ Arguments:
- lf
- A LinalgFactory instance.
- occ_model
- Occupation model
Optional arguments:
- npairs
- Number of electron pairs, if not specified, npairs = number of occupied orbitals
- nvirt
- Number of virtual orbitals, if not specified, nvirt = (nbasis-npairs)
-
check_convergence
(e0, e1, gradient, thresh)¶ Check convergence.
Arguements:
- e0, e1
- Used to calculate energy difference e0-e1
- gradient
- The gradient, a OneIndex instance
- thresh
- Dictionary containing threshold parameters (‘energy’, ‘gradientmax’, ‘gradientnorm’)
- Returns:
- True if energy difference, norm of orbital gradient, largest element of orbital gradient are smaller than some threshold values.
-
check_stepsearch
(linesearch)¶ Check trustradius. Abort calculation if trustradius is smaller than 1e-8
-
clear
()¶ Clear all wavefunction information
-
clear_dm
()¶ Clear RDM information
-
clear_geminal
()¶ Clear geminal information
-
clear_lagrange
()¶ Clear lagrange information
-
compute_rotation_matrix
(coeff)¶ Compute orbital rotation matrix
-
generate_guess
(guess, dim=None)¶ Generate a guess of type ‘guess’.
Arguments:
- guess
- A dictionary, containing the type of guess.
Optional arguments:
- dim
- Length of guess.
-
get_auxmatrix
(select)¶ Get auxiliary matrices
-
get_four_dm
(select)¶ Get a density matrix (4-RDM). If not available, it will be created (if possible)
Arguments:
select
-
get_one_dm
(select)¶ Get a density matrix (1-RDM). If not available, it will be created (if possible)
Arguments:
- select
- ‘ps2’, or ‘response’.
-
get_three_dm
(select)¶ Get a density matrix (3-RDM). If not available, it will be created (if possible)
Arguments:
select
-
get_two_dm
(select)¶ Get a density matrix (2-RDM). If not available, it will be created (if possible)
Arguments:
- select
- ‘(r(esponse))ppqq’, or ‘(r(esponse))pqpq’.
-
init_four_dm
(select)¶ Initialize 4-RDM
Arguments
select
-
init_one_dm
(select)¶ Initialize 1-RDM as OneIndex object
The 1-RDM expressed in the natural orbital basis is diagonal and only the diagonal elements are stored.
Arguments
- select
- ‘ps2’ or ‘response’.
-
init_three_dm
(select)¶ Initialize 3-RDM
Arguments
select
-
init_two_dm
(select)¶ Initialize 2-RDM as TwoIndex object
Only the symmetry-unique elements of the (response) 2-RDM are stored. These are matrix elements of type
\[Gamma_{p\bar{q}p\bar{q}}\](spin-up and spin-down (bar-sign)) or
\[Gamma_{p\bar{p}q\bar{q}}\]and are stored as elements \({pq}\) of two_dm_pqpq, and two_dm_ppqq.
Arguments
- select
- ‘(r(esponse))ppqq’, or ‘(r(esponse))pqpq’.
-
perm
(a)¶ Calculate the permament of a matrix
Arguements
- a
- A np array
-
prod
(lst)¶
-
solve
(one, two, core, orb, olp, **kwargs)¶
-
solve_scf
(one, two, core, orb, olp, **kwargs)¶
-
update_auxmatrix
(select, two_mo, one_mo=None)¶ Update auxiliary matrices
-
update_ecore
(new)¶ Update core energy
-
update_four_dm
(four_dm=None)¶ Update 2-RDM
Optional arguments:
- four_dm
- When provided, this 4-RDM is stored.
-
update_geminal
(geminal=None)¶ Update geminal matrix
Optional arguments:
- geminal
- When provided, this geminal matrix is stored.
-
update_lagrange
(lagrange=None, dim1=None, dim2=None)¶ Update Lagragne multipliers
Optional arguments:
- lagrange
- When provided, this set of Lagrange multipliers is stored.
-
update_one_dm
(one_dm=None)¶ Update 1-RDM
Optional arguments:
- one_dm
- When provided, this 1-RDM is stored.
-
update_three_dm
(three_dm=None)¶ Update 3-RDM
Optional arguments:
- three_dm
- When provided, this 3-RDM is stored.
-
update_two_dm
(two_dm=None)¶ Update 2-RDM
Optional arguments:
- two_dm
- When provided, this 2-RDM is stored.
-
dimension
¶ The number of unknowns (i.e. the number of geminal coefficients)
-
ecore
¶ The core energy
-
geminal
¶ The geminal coefficients
-
lagrange
¶ The Lagrange multipliers
-
lf
¶ The LinalgFactory instance
-
nbasis
¶ The number of basis functions
-
nocc
¶ The number of occupied orbitals
-
npairs
¶ The number of electron pairs
-
nvirt
¶ The number of virtual orbitals
-
one_dm_ps2
¶ Alpha 1-RDM
-
one_dm_response
¶ Alpha 1-RDM
-
two_dm_ppqq
¶ Alpha-beta PS2 (ppqq) 2-RDM
-
two_dm_pqpq
¶ Alpha-beta PS2 (pqpq) 2-RDM
-
two_dm_rppqq
¶ Alpha-beta (ppqq) 2-RDM
-
two_dm_rpqpq
¶ Alpha-beta (pqpq) 2-RDM