(git:db3ef62)
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, mo_derivs, strength)
 Compute the expectation value <(\cal S)^2> of the single determinant defined by the spin up (alpha) and spin down (beta) orbitals. More...
 
subroutine, public s2_restraint (mos, matrix_s, mo_derivs, energy, s2_restraint_control, just_energy)
 restrains/constrains the value of s2 in a calculation More...
 

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,
type(cp_fm_type), dimension(:), intent(inout), optional  mo_derivs,
real(kind=dp), intent(in), optional  strength 
)

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
mo_derivs[inout] If present, add the derivative of s_square wrt the MOs to mo_derivs
strength[in] Strength for constraining or restraining (\cal S)^2
History
07.2004 created (Joost VandeVondele) 08.2021 revised (Matthias Krack, MK)
Note
See Eqs. 2.271 and 2.272 in Modern Quantum Chemistry by A. Szabo and N. S. Ostlund

Definition at line 65 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 189 of file s_square_methods.F.

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