(git:6344619)
Loading...
Searching...
No Matches
s_square_methods Module Reference

Methods related to (\cal S)^2 (i.e. spin). More...

Functions/Subroutines

subroutine, public compute_s_square (mos, matrix_s, s_square, s_square_ideal)
 Compute the expectation value <(\cal S)^2> of the single determinant defined by the spin up (alpha) and spin down (beta) orbitals.
subroutine, public compute_s_square_kp (mosin, kpoints, matrix_s, s_square, s_square_ideal)
 Compute the expectation value <(\cal S)^2> of the single determinant defined by the spin up (alpha) and spin down (beta) orbitals.
subroutine, public s2_restraint (mos, matrix_s, mo_derivs, energy, s2_restraint_control, just_energy)
 restrains/constrains the value of s2 in a calculation

Detailed Description

Methods related to (\cal S)^2 (i.e. spin).

History
03.2006 copied compute_s_square from qs_scf_post (Joost VandeVondele) 08.2021 revised (Matthias Krack, MK)
Author
Joost VandeVondele

Function/Subroutine Documentation

◆ compute_s_square()

subroutine, public s_square_methods::compute_s_square ( type(mo_set_type), dimension(:), intent(in) mos,
type(dbcsr_p_type), dimension(:), pointer matrix_s,
real(kind=dp), intent(out) s_square,
real(kind=dp), intent(out) s_square_ideal )

Compute the expectation value <(\cal S)^2> of the single determinant defined by the spin up (alpha) and spin down (beta) orbitals.

Parameters
mos[in] MO set with all MO information including the alpha and beta MO coefficients
matrix_s[in] AO overlap matrix S (do not mix with the spin operator (\cal S))
s_square[out] <(\cal S)^2> including potential spin contaminations
s_square_ideal[out] Ideal value for <(\cal S)^2> without any spin contaminations
History
07.2004 created (Joost VandeVondele) 08.2021 revised (Matthias Krack, MK) 10.2026 adapted and generalized to partial occupation and k-points
Note
See Eqs. 2.271 and 2.272 in Modern Quantum Chemistry by A. Szabo and N. S. Ostlund

Definition at line 97 of file s_square_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_s_square_kp()

subroutine, public s_square_methods::compute_s_square_kp ( type(mo_set_type), dimension(:), intent(in) mosin,
type(kpoint_type), intent(in), pointer kpoints,
type(dbcsr_p_type), dimension(:, :), pointer matrix_s,
real(kind=dp), intent(out) s_square,
real(kind=dp), intent(out) s_square_ideal )

Compute the expectation value <(\cal S)^2> of the single determinant defined by the spin up (alpha) and spin down (beta) orbitals.

Parameters
mosin...
kpoints...
matrix_s...
s_square[out] <(\cal S)^2> including potential spin contaminations
s_square_ideal[out] Ideal value for <(\cal S)^2> without any spin contaminations
History
10.2026 adapted and generalized to partial occupation and k-points

Definition at line 157 of file s_square_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s2_restraint()

subroutine, public s_square_methods::s2_restraint ( type(mo_set_type), dimension(:), intent(in) mos,
type(dbcsr_p_type), dimension(:), pointer matrix_s,
type(cp_fm_type), dimension(:), intent(inout) mo_derivs,
real(kind=dp) energy,
type(s2_restraint_type), pointer s2_restraint_control,
logical just_energy )

restrains/constrains the value of s2 in a calculation

Parameters
mosinput
matrix_sinput
mo_derivsinout if present, add the derivative of s_square wrt mos to mo_derivs
energy...
s2_restraint_control...
just_energy...
History
07.2004 created [ Joost VandeVondele ]

Definition at line 315 of file s_square_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function: