@brief A module to evaluate the Slater-Condon Rules.
@details Heavily relies on the excitation_types module to represent different excitations.
The main functions are sltcnd_excit and dyn_sltcnd_excit. Because sltcnd_excit dispatches statically at compile time, depending on the excitation type, it is the preferred function, if the excitation level is known at compile time.
If the excitation level is not known at compile time, use dyn_sltcnd_excit which accepts a polymorphic excitation_t class.
The procedures create_excitation, get_excitation, and get_bit_excitation from the excitation_types module can be used, to create excitations from nIs, or iluts at runtime.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(sltcnd_0_t), | private, | pointer | :: | sltcnd_0 | => | null() | |
procedure(sltcnd_0_t), | private, | pointer | :: | nonadjoint_sltcnd_0 | => | null() | |
procedure(sltcnd_1_t), | private, | pointer | :: | sltcnd_1 | => | null() | |
procedure(sltcnd_1_t), | private, | pointer | :: | nonadjoint_sltcnd_1 | => | null() | |
procedure(sltcnd_2_t), | private, | pointer | :: | sltcnd_2 | => | null() | |
procedure(sltcnd_2_t), | private, | pointer | :: | nonadjoint_sltcnd_2 | => | null() | |
procedure(sltcnd_3_t), | private, | pointer | :: | sltcnd_3 | => | null() | |
procedure(sltcnd_3_t), | private, | pointer | :: | nonadjoint_sltcnd_3 | => | null() | |
procedure(nI_invariant_sltcnd_2_t), | private, | pointer | :: | nI_invariant_sltcnd_2 | => | null() | |
procedure(nI_invariant_sltcnd_3_t), | private, | pointer | :: | nI_invariant_sltcnd_3 | => | null() | |
procedure(diagH_after_exc_1_t), | private, | pointer | :: | diagH_after_exc_1 | => | null() | |
procedure(diagH_after_exc_2_t), | private, | pointer | :: | diagH_after_exc_2 | => | null() | |
procedure(diagH_after_exc_3_t), | private, | pointer | :: | diagH_after_exc_3 | => | null() |
@brief Evaluate Matrix Element for different excitations using the Slater-Condon rules.
@details This generic function uses compile time dispatch. This means that exc cannot be just of class(Excitation_t) but has to be a proper non-polymorphic type. For run time dispatch use dyn_sltcnd_excit.
@param[in] exc, An excitation of a subtype of Excitation_t.
@brief Excitations further than max_excit_rank should return 0
@param[in] exc
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
type(Excite_Further_t), | intent(in) | :: | exc |
@brief Evaluate Matrix Element for Excite_1_t.
@param[in] ref, The occupied spin orbitals of the reference. @param[in] exc, An excitation of type Excite_1_t. @param[in] tParity, The parity of the excitation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(SpinOrbIdx_t), | intent(in) | :: | ref | |||
type(Excite_1_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity |
@brief Evaluate Matrix Element for Excite_2_t.
@param[in] ref, The occupied spin orbitals of the reference. @param[in] exc, An excitation of type Excite_2_t. @param[in] tParity, The parity of the excitation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(SpinOrbIdx_t), | intent(in) | :: | ref | |||
type(Excite_2_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity |
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
procedure(sltcnd_0_t), | pointer | :: | sltcnd_0 | => | null() | |
procedure(sltcnd_1_t), | pointer | :: | sltcnd_1 | => | null() | |
procedure(sltcnd_2_t), | pointer | :: | sltcnd_2 | => | null() | |
procedure(sltcnd_3_t), | pointer | :: | sltcnd_3 | => | null() |
Evaluate the energy of a new determinant quickly.
The calculation of a diagonal term of the hamiltonian, scales quadratically with the number of particles . Often we start from a determinant , where we know the diagonal term, and excite to a new determinant . Under this circumstance we can calculate the diagonal element of in time.
In the following we will derive the necessary equations. We assume the notations and conventions of the “purple book” (Helgaker et al). The diagonal term for a determinant is given as
We want to calculate . Which we do by separately calculating the difference for the one- and two-electron term.
We can rewrite the one-electron term as: Which gives
For the two electron term we define and note the two properties
We write In the last equality we used .
For the difference we get:
In total we obtain
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
procedure(diagH_after_exc_1_t), | pointer | :: | diagH_after_exc_1 | => | null() | |
procedure(diagH_after_exc_2_t), | pointer | :: | diagH_after_exc_2 | => | null() | |
procedure(diagH_after_exc_3_t), | pointer | :: | diagH_after_exc_3 | => | null() |
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
procedure(nI_invariant_sltcnd_2_t), | pointer | :: | nI_invariant_sltcnd_2 | => | null() | |
procedure(nI_invariant_sltcnd_3_t), | pointer | :: | nI_invariant_sltcnd_3 | => | null() |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity | |||
logical, | intent(in), | optional | :: | assert_occupation |
This argument is only used in debug mode. It ensures that src_i are indeed occupied and tgt_i are unoccupied. It is on by default. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_2_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity | |||
logical, | intent(in), | optional | :: | assert_occupation |
This argument is only used in debug mode. It ensures that src_i are indeed occupied and tgt_i are unoccupied. It is on by default. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_3_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity | |||
logical, | intent(in), | optional | :: | assert_occupation |
This argument is only used in debug mode. It ensures that src_i are indeed occupied and tgt_i are unoccupied. It is on by default. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
real(kind=dp), | intent(in) | :: | E_0 | |||
type(Excite_1_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
real(kind=dp), | intent(in) | :: | E_0 | |||
type(Excite_2_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
real(kind=dp), | intent(in) | :: | E_0 | |||
type(Excite_3_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Excite_2_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Excite_3_t), | intent(in) | :: | exc |
Return the two-electron integral.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | src1 |
The index conventions can be seen here |
||
integer, | intent(in) | :: | tgt1 |
The index conventions can be seen here |
||
integer, | intent(in) | :: | src2 |
The index conventions can be seen here |
||
integer, | intent(in) | :: | tgt2 |
The index conventions can be seen here |
returns the adjoint sltcnd of the given rank: 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
returns the adjoint sltcnd of the given rank: 2
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_2_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
returns the adjoint sltcnd of the given rank: 3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_3_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Returns the adjoint for the diagonal element
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | ex |
@brief Evaluate Matrix Element for different excitations using the Slater-Condon rules.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ref(nel) | |||
class(Excitation_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
integer, | intent(in) | :: | IC | |||
integer, | intent(in), | optional | :: | ex(2,ic) | ||
logical, | intent(in), | optional | :: | tParity |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
integer, | intent(in) | :: | nJ(nel) | |||
integer, | intent(in) | :: | IC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
integer(kind=n_int), | intent(in) | :: | iLutI(0:NIfTot) | |||
integer(kind=n_int), | intent(in) | :: | iLutJ(0:NIfTot) | |||
integer, | intent(in) | :: | IC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
integer(kind=n_int), | intent(in) | :: | iLutI(0:NIfTot) | |||
integer(kind=n_int), | intent(in) | :: | iLutJ(0:NIfTot) | |||
integer, | intent(out), | optional | :: | ICret |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | Orb | |||
integer, | intent(in) | :: | HFDet(nel) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
integer, | intent(in) | :: | HFDet(nel) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t), | intent(in) | :: | ex |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Excite_2_t), | intent(in) | :: | ex |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Excite_2_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_2_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_3_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Excite_3_t), | intent(in) | :: | ex |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_2_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_3_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_2_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Excite_2_t), | intent(in) | :: | ex |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_2_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_1_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_2_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
type(Excite_3_t), | intent(in) | :: | ex | |||
logical, | intent(in) | :: | tSign | |||
logical, | intent(in), | optional | :: | assert_occupation |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nel) | |||
type(Excite_0_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Excite_2_t), | intent(in) | :: | exc |
@brief Evaluate Matrix Element for Excite_1_t.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(SpinOrbIdx_t), | intent(in) | :: | ref | |||
type(Excite_1_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity |
@brief Evaluate Matrix Element for Excite_2_t.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(SpinOrbIdx_t), | intent(in) | :: | ref | |||
type(Excite_2_t), | intent(in) | :: | exc | |||
logical, | intent(in) | :: | tParity |
@brief Excitations further than max_excit_rank should return 0
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
type(Excite_Further_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
real(kind=dp), | intent(in) | :: | E_0 | |||
type(Excite_1_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
real(kind=dp), | intent(in) | :: | E_0 | |||
type(Excite_2_t), | intent(in) | :: | exc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nI(nEl) | |||
real(kind=dp), | intent(in) | :: | E_0 | |||
type(Excite_3_t), | intent(in) | :: | exc |