(git:e41e4ec)
Loading...
Searching...
No Matches
qs_ot_kp Module Reference

Complex k-point orbital transformations, response kernels and local batch execution. Shared real/spectral operations are provided by qs_ot. More...

Functions/Subroutines

real(kind=dp) function, public qs_ot_antihermitian_spectral_norm (rotation_generator)
 spectral norm of a dense anti-Hermitian rotation generator
pure real(kind=dp) function, public qs_ot_fixed_n_response_mu_shift (weighted_energy_response, local_curvature_sum, fixed_n_curvature_sum)
 chemical-potential response for one fixed-electron-number group
pure subroutine, public qs_ot_fixed_n_energy_gradient (rayleigh_energy, energy_coordinate, response_weight, fixed_n_weight_sum, fixed_n_weighted_residual, gradient)
 fixed-N Mermin gradient in auxiliary-energy coordinates
subroutine, public qs_ot_fixed_n_multigroup_schur_block (rotation_hessian, rayleigh_response, response_weight, response_group, rotation_gradient, energy_gradient, schur_block, coupling_matrix, schur_rhs)
 eliminate spin-resolved auxiliary energies while retaining every fixed-N constraint
subroutine, public qs_ot_symmetric_abs_solve (matrix, rhs, solution, valid, relative_floor)
 apply a positive spectral inverse of a real symmetric response matrix
subroutine, public qs_ot_projected_response_update (reference_hessian, response_correction, coefficients, valid, projected_gradient, relative_floor)
 update a baseline response direction in a small positive physical-response subspace
subroutine, public qs_ot_density_secant_projected_hessian (density_norm_sq, response_work, density_overlap, response_overlap, correction, valid, secant_mode, secant_position)
 form a projected self-adjoint Hxc response from distributed density-space overlaps
subroutine, public qs_ot_density_tangent (rotation_generator, occupation, kpoint_weight, rotation_step, weighted_occupation_step, density_tangent, difference_step)
 finite-chart density tangent for coupled complex rotations and fixed-N occupations
subroutine, public qs_ot_density_secant_orbital_overlaps (overlap_start_current, occupation_start, occupation_current, hamiltonian_step_start, hamiltonian_step_current, density_modes, kpoint_weight, density_norm_sq, response_work, density_overlap, response_overlap, valid)
 project a physical density/Hamiltonian secant between moving orbital subspaces
subroutine, public qs_ot_finite_rotation_response (chc, rotation_generator, occupation, kpoint_weight, rotation_gradient, rotation_hessian, rayleigh_response, difference_step)
 finite complex REF rotation Hessian and Rayleigh-energy response
pure complex(kind=dp) function, public qs_ot_complex_exp_frechet_kernel (e1, e2)
 Frechet divided-difference kernel for exp(-i*evals).
subroutine, public qs_ot_apply_complex_frechet_dbcsr (evals, inner_deriv_re, inner_deriv_im, outer_deriv_re, outer_deriv_im, adjoint)
 apply the complex exponential Frechet kernel to sparse DBCSR Re/Im matrices
subroutine, public qs_ot_get_orbitals_ref_complex (matrix_c, matrix_c_im, matrix_s, matrix_s_im, qs_ot_env, qs_ot_env1)
 update complex REF k-point orbitals and their S(k)C(k) images
subroutine, public qs_ot_get_derivative_ref_complex (matrix_hc, matrix_hc_im, qs_ot_env, matrix_hc_rotation, matrix_hc_rotation_im)
 complex k-point REF derivative dE/dX from H(k)C(k), S(k)C(k), and C(k)
subroutine, public qs_ot_generate_rotation_complex (qs_ot_env)
 computes U=exp(A) for the complex anti-Hermitian generator A=rot_mat_x+i*rot_mat_x_im
subroutine, public qs_ot_rot_mat_derivative_complex (qs_ot_env)
 pull the complex dE/dU covector back to the anti-Hermitian generator using the adjoint Frechet derivative of exp
subroutine, public qs_ot_get_p_complex (matrix_x, matrix_x_im, matrix_sx, matrix_sx_im, qs_ot_env, zero_coordinates)
 compute P=X^H*S*X and the STRICT matrix functions for a complex K-point channel
subroutine, public qs_ot_get_orbitals_complex (matrix_c, matrix_c_im, matrix_s, matrix_s_im, qs_ot_env)
 update complex K-point orbitals with the finite STRICT transformation
subroutine, public qs_ot_project_gradient (qs_ot_env, matrix_gx, matrix_gx_im, use_preconditioner)
 Project a complex STRICT gradient; real minimizer fallbacks use the shared real projection.
subroutine, public qs_ot_prepare_complex_tangent_metric (qs_ot_env, preconditioner_rejected, use_preconditioner)
 Prepare the inverse metric used to project a complex STRICT gradient. An unusable preconditioner is detached before any minimizer history is updated.
subroutine, public qs_ot_prepare_complex_tangent_metric_batch (qs_ot_env)
 Prepare uncached single-rank STRICT metrics in bounded OpenMP batches. Leave unsuccessful channels to the scalar path so preconditioner rejection and history invalidation retain their existing order. Workers use only private dense storage.
subroutine, public qs_ot_get_derivative_complex (matrix_hc, matrix_hc_im, qs_ot_env, matrix_hc_rotation, matrix_hc_rotation_im)
 finite complex STRICT derivative, projected onto C0^H*S*X=0
subroutine, public qs_ot_get_orbitals_local_batch (qs_ot_env, matrix_s, matrix_c, handled, initialize)
 Rebuild single-rank STRICT/IRAC orbitals in bounded batches using cached overlaps. DBCSR packing and writeback are outside OpenMP; workers only use dense data and private scratch.
subroutine, public qs_ot_get_derivative_local_batch (qs_ot_env, matrix_hc, matrix_hc_im, handled, matrix_hc_physical, matrix_hc_physical_im)
 Evaluate independent, single-rank STRICT/IRAC gradients in bounded OpenMP batches. DBCSR packing, filtering and metric preparation stay outside the worker region.

Detailed Description

Complex k-point orbital transformations, response kernels and local batch execution. Shared real/spectral operations are provided by qs_ot.

Function/Subroutine Documentation

◆ qs_ot_antihermitian_spectral_norm()

real(kind=dp) function, public qs_ot_kp::qs_ot_antihermitian_spectral_norm ( complex(kind=dp), dimension(:, :), intent(in) rotation_generator)

spectral norm of a dense anti-Hermitian rotation generator

Parameters
rotation_generatoranti-Hermitian generator
Returns
largest absolute eigenvalue of i times the generator

Definition at line 111 of file qs_ot_kp.F.

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

◆ qs_ot_fixed_n_response_mu_shift()

pure real(kind=dp) function, public qs_ot_kp::qs_ot_fixed_n_response_mu_shift ( real(kind=dp), intent(in) weighted_energy_response,
real(kind=dp), intent(in) local_curvature_sum,
real(kind=dp), intent(in) fixed_n_curvature_sum )

chemical-potential response for one fixed-electron-number group

Parameters
weighted_energy_responsesum_i chi_i de_i over the perturbed local channels
local_curvature_sumlocal sum_i chi_i, used as a serial fallback
fixed_n_curvature_sumglobal sum_i chi_i for the complete fixed-N group
Returns
first-order chemical-potential shift

Definition at line 138 of file qs_ot_kp.F.

◆ qs_ot_fixed_n_energy_gradient()

pure subroutine, public qs_ot_kp::qs_ot_fixed_n_energy_gradient ( real(kind=dp), dimension(:), intent(in) rayleigh_energy,
real(kind=dp), dimension(:), intent(in) energy_coordinate,
real(kind=dp), dimension(:), intent(in) response_weight,
real(kind=dp), intent(in) fixed_n_weight_sum,
real(kind=dp), intent(in) fixed_n_weighted_residual,
real(kind=dp), dimension(:), intent(out) gradient )

fixed-N Mermin gradient in auxiliary-energy coordinates

Parameters
rayleigh_energydiagonal expectation values of the current Hamiltonian
energy_coordinateauxiliary band energies controlling the occupations
response_weightsigned weighted occupation responses chi_i
fixed_n_weight_sumglobal sum_i chi_i for the fixed-N group
fixed_n_weighted_residualglobal sum_i chi_i (h_i-e_i)
gradientprojected fixed-N gradient

Definition at line 163 of file qs_ot_kp.F.

Here is the caller graph for this function:

◆ qs_ot_fixed_n_multigroup_schur_block()

subroutine, public qs_ot_kp::qs_ot_fixed_n_multigroup_schur_block ( real(kind=dp), dimension(:, :), intent(in) rotation_hessian,
real(kind=dp), dimension(:, :), intent(in) rayleigh_response,
real(kind=dp), dimension(:), intent(in) response_weight,
integer, dimension(:), intent(in) response_group,
real(kind=dp), dimension(:), intent(in) rotation_gradient,
real(kind=dp), dimension(:), intent(in) energy_gradient,
real(kind=dp), dimension(:, :), intent(out) schur_block,
real(kind=dp), dimension(:, :), intent(out) coupling_matrix,
real(kind=dp), dimension(:), intent(out) schur_rhs )

eliminate spin-resolved auxiliary energies while retaining every fixed-N constraint

  Each energy variable belongs to one particle-number group. The diagonal occupation
  response is eliminated locally, while one coupling column per group is retained for the
  subsequent global chemical-potential projection. A single group reduces exactly to
  the single-group Schur complement A - R^T (D - chi chi^T/sum(chi)) R.
Parameters
rotation_hessianfinite orbital-rotation Hessian
rayleigh_responsederivative of all spin-resolved Rayleigh energies
response_weightpositive occupation-response weights
response_groupfixed-N group of every energy variable
rotation_gradientorbital-rotation gradient
energy_gradientauxiliary-energy gradient
schur_blockenergy-eliminated rotation block
coupling_matrixretained chemical-potential coupling columns
schur_rhsenergy-eliminated rotation right-hand side

Definition at line 200 of file qs_ot_kp.F.

Here is the caller graph for this function:

◆ qs_ot_symmetric_abs_solve()

subroutine, public qs_ot_kp::qs_ot_symmetric_abs_solve ( real(kind=dp), dimension(:, :), intent(in) matrix,
real(kind=dp), dimension(:, :), intent(in) rhs,
real(kind=dp), dimension(:, :), intent(out) solution,
logical, intent(out) valid,
real(kind=dp), intent(in), optional relative_floor )

apply a positive spectral inverse of a real symmetric response matrix

  The magnitude of every resolved eigenmode is retained, including modes with negative
  physical curvature. Replacing lambda by abs(lambda) gives a descent metric without the
  loss of response information caused by discarding the negative subspace. Unresolved
  null modes are projected out instead of being amplified by an artificial eigenvalue floor.
Parameters
matrixreal symmetric response matrix
rhsone or more right-hand sides
solutionspectral-absolute inverse applied to rhs
validwhether finite input and output were obtained
relative_flooroptional relative eigenvalue floor

Definition at line 256 of file qs_ot_kp.F.

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

◆ qs_ot_projected_response_update()

subroutine, public qs_ot_kp::qs_ot_projected_response_update ( real(kind=dp), dimension(:, :), intent(in) reference_hessian,
real(kind=dp), dimension(:, :), intent(in) response_correction,
real(kind=dp), dimension(:), intent(out) coefficients,
logical, intent(out) valid,
real(kind=dp), dimension(:), intent(in), optional projected_gradient,
real(kind=dp), intent(in), optional relative_floor )

update a baseline response direction in a small positive physical-response subspace

  The first basis mode is the baseline response direction. With B0 the projected frozen-H
  Hessian and K the accepted physical correction, this routine solves

    (B0 + K) c = g_Q.

  The optional projected physical gradient supplies g_Q. Without it, g_Q=B0*e1, so c=e1
  exactly when K=0. An indefinite or unresolved total projected Hessian is rejected instead
  of turning its negative modes into an unrelated active direction.
Parameters
reference_hessianprojected frozen-H Hessian B0
response_correctionprojected physical response K
coefficientsresponse coefficients c in the supplied basis
validwhether a finite, positive, sufficiently resolved solve was obtained
projected_gradientoptional physical gradient projected onto the supplied basis
relative_flooroptional relative positive-eigenvalue floor

Definition at line 320 of file qs_ot_kp.F.

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

◆ qs_ot_density_secant_projected_hessian()

subroutine, public qs_ot_kp::qs_ot_density_secant_projected_hessian ( real(kind=dp), intent(in) density_norm_sq,
real(kind=dp), intent(in) response_work,
real(kind=dp), dimension(:), intent(in) density_overlap,
real(kind=dp), dimension(:), intent(in) response_overlap,
real(kind=dp), dimension(:, :), intent(out) correction,
logical, intent(out) valid,
integer, intent(in), optional secant_mode,
real(kind=dp), intent(in), optional secant_position )

form a projected self-adjoint Hxc response from distributed density-space overlaps

Parameters
density_norm_sq<S,S>
response_work<S,Y>
density_overlap<S,B_r>
response_overlap<Y,B_r>
correctionprojected symmetric Hxc response <B_q,K*B_r>
validwhether finite nonzero secant data were available
secant_modeoptional mode representing the accepted full density secant divided by its line-search position
secant_positionsigned line-search position of the accepted full density secant

Definition at line 396 of file qs_ot_kp.F.

Here is the caller graph for this function:

◆ qs_ot_density_tangent()

subroutine, public qs_ot_kp::qs_ot_density_tangent ( complex(kind=dp), dimension(:, :), intent(in) rotation_generator,
real(kind=dp), dimension(:), intent(in) occupation,
real(kind=dp), intent(in) kpoint_weight,
real(kind=dp), dimension(:), intent(in) rotation_step,
real(kind=dp), dimension(:), intent(in) weighted_occupation_step,
complex(kind=dp), dimension(:, :), intent(out) density_tangent,
real(kind=dp), intent(in), optional difference_step )

finite-chart density tangent for coupled complex rotations and fixed-N occupations

  The rotation contribution differentiates

    exp(X) diag(w_k f) exp(X)^H

  along an anti-Hermitian packed direction.  The supplied weighted occupation response is
  added in the same chart, and the result is returned in the current physical orbital basis.
Parameters
rotation_generatorcurrent anti-Hermitian REF generator X
occupationcurrent occupations f
kpoint_weightirreducible K-point weight w_k
rotation_stepinterleaved real/imaginary anti-Hermitian direction
weighted_occupation_stepderivative of w_k*f, including the fixed-N mu response
density_tangentHermitian tangent in the current physical orbital basis
difference_stepoptional finite-chart central-difference step

Definition at line 472 of file qs_ot_kp.F.

Here is the caller graph for this function:

◆ qs_ot_density_secant_orbital_overlaps()

subroutine, public qs_ot_kp::qs_ot_density_secant_orbital_overlaps ( complex(kind=dp), dimension(:, :), intent(in) overlap_start_current,
real(kind=dp), dimension(:), intent(in) occupation_start,
real(kind=dp), dimension(:), intent(in) occupation_current,
complex(kind=dp), dimension(:, :), intent(in) hamiltonian_step_start,
complex(kind=dp), dimension(:, :), intent(in) hamiltonian_step_current,
complex(kind=dp), dimension(:, :, :), intent(in) density_modes,
real(kind=dp), intent(in) kpoint_weight,
real(kind=dp), intent(out) density_norm_sq,
real(kind=dp), intent(out) response_work,
real(kind=dp), dimension(:), intent(out) density_overlap,
real(kind=dp), dimension(:), intent(out) response_overlap,
logical, intent(out) valid )

project a physical density/Hamiltonian secant between moving orbital subspaces

  For separately S-orthonormal endpoint orbitals C0 and C1, O=C0^H*S*C1 retains the
  component of the accepted density step that leaves the old subspace.  Density modes are
  represented in the current C1 basis and already contain the irreducible K-point weight.
Parameters
overlap_start_currentcross overlap O
occupation_startoccupations at the accepted start
occupation_currentoccupations at the accepted endpoint
hamiltonian_step_startC0^H*(H1-H0)*C0
hamiltonian_step_currentC1^H*(H1-H0)*C1
density_modescurrent-orbital density tangents
kpoint_weightirreducible K-point weight
density_norm_sqcontribution to <Delta P,Delta P>
response_workcontribution to <Delta P,Delta H>
density_overlapcontributions <Delta P,B_r>
response_overlapcontributions <Delta H,B_r>
validwhether a finite nonzero secant was available

Definition at line 571 of file qs_ot_kp.F.

Here is the caller graph for this function:

◆ qs_ot_finite_rotation_response()

subroutine, public qs_ot_kp::qs_ot_finite_rotation_response ( complex(kind=dp), dimension(:, :), intent(in) chc,
complex(kind=dp), dimension(:, :), intent(in) rotation_generator,
real(kind=dp), dimension(:), intent(in) occupation,
real(kind=dp), intent(in) kpoint_weight,
real(kind=dp), dimension(:), intent(out) rotation_gradient,
real(kind=dp), dimension(:, :), intent(out) rotation_hessian,
real(kind=dp), dimension(:, :), intent(out) rayleigh_response,
real(kind=dp), intent(in), optional difference_step )

finite complex REF rotation Hessian and Rayleigh-energy response

  The current projected Hamiltonian is pulled back through the finite rotation and then
  differentiated in the independent real-antisymmetric and imaginary-symmetric pair
  coordinates. This keeps the response consistent with the exponential chart used by REF
  OT instead of replacing it by an infinitesimal commutator away from the chart origin.
Parameters
chccurrent projected Hermitian Hamiltonian U^H H_ref U
rotation_generatorcurrent anti-Hermitian REF generator
occupationfixed occupations attached to the rotated columns
kpoint_weightirreducible-k-point weight
rotation_gradientgradient in interleaved real/imaginary pair coordinates
rotation_hessianderivative of rotation_gradient in the same coordinates
rayleigh_responsederivative of diag(U^H H_ref U) with respect to the pair coordinates
difference_stepoptional central finite-difference step for the Hessian action

Definition at line 677 of file qs_ot_kp.F.

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

◆ qs_ot_complex_exp_frechet_kernel()

pure complex(kind=dp) function, public qs_ot_kp::qs_ot_complex_exp_frechet_kernel ( real(kind=dp), intent(in) e1,
real(kind=dp), intent(in) e2 )

Frechet divided-difference kernel for exp(-i*evals).

Parameters
e1...
e2...
Returns
...

Definition at line 923 of file qs_ot_kp.F.

Here is the caller graph for this function:

◆ qs_ot_apply_complex_frechet_dbcsr()

subroutine, public qs_ot_kp::qs_ot_apply_complex_frechet_dbcsr ( real(kind=dp), dimension(:), intent(in) evals,
type(dbcsr_type) inner_deriv_re,
type(dbcsr_type) inner_deriv_im,
type(dbcsr_type) outer_deriv_re,
type(dbcsr_type) outer_deriv_im,
logical, intent(in), optional adjoint )

apply the complex exponential Frechet kernel to sparse DBCSR Re/Im matrices

Parameters
evalsgenerator eigenvalues
inner_deriv_rereal part of the matrix in the generator eigenbasis
inner_deriv_imimaginary part of the matrix in the generator eigenbasis
outer_deriv_rereal part of the mapped matrix
outer_deriv_imimaginary part of the mapped matrix
adjointuse the adjoint Frechet kernel for gradients

Definition at line 955 of file qs_ot_kp.F.

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

◆ qs_ot_get_orbitals_ref_complex()

subroutine, public qs_ot_kp::qs_ot_get_orbitals_ref_complex ( type(dbcsr_type), pointer matrix_c,
type(dbcsr_type), pointer matrix_c_im,
type(dbcsr_type), pointer matrix_s,
type(dbcsr_type), pointer matrix_s_im,
type(qs_ot_type) qs_ot_env,
type(qs_ot_type), optional qs_ot_env1 )

update complex REF k-point orbitals and their S(k)C(k) images

Parameters
matrix_c...
matrix_c_im...
matrix_s...
matrix_s_im...
qs_ot_env...
qs_ot_env1environment carrying the shared minimizer state

Definition at line 1086 of file qs_ot_kp.F.

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

◆ qs_ot_get_derivative_ref_complex()

subroutine, public qs_ot_kp::qs_ot_get_derivative_ref_complex ( type(dbcsr_type), pointer matrix_hc,
type(dbcsr_type), pointer matrix_hc_im,
type(qs_ot_type) qs_ot_env,
type(dbcsr_type), optional, pointer matrix_hc_rotation,
type(dbcsr_type), optional, pointer matrix_hc_rotation_im )

complex k-point REF derivative dE/dX from H(k)C(k), S(k)C(k), and C(k)

Parameters
matrix_hc...
matrix_hc_im...
qs_ot_env...
matrix_hc_rotationoccupation-weighted H(k)C(k) for the rotation channel
matrix_hc_rotation_imimaginary component of matrix_hc_rotation

Definition at line 1219 of file qs_ot_kp.F.

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

◆ qs_ot_generate_rotation_complex()

subroutine, public qs_ot_kp::qs_ot_generate_rotation_complex ( type(qs_ot_type) qs_ot_env)

computes U=exp(A) for the complex anti-Hermitian generator A=rot_mat_x+i*rot_mat_x_im

Parameters
qs_ot_enva complex k-point OT environment

Definition at line 1508 of file qs_ot_kp.F.

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

◆ qs_ot_rot_mat_derivative_complex()

subroutine, public qs_ot_kp::qs_ot_rot_mat_derivative_complex ( type(qs_ot_type) qs_ot_env)

pull the complex dE/dU covector back to the anti-Hermitian generator using the adjoint Frechet derivative of exp

Parameters
qs_ot_enva complex k-point OT environment with an up-to-date U

Definition at line 1588 of file qs_ot_kp.F.

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

◆ qs_ot_get_p_complex()

subroutine, public qs_ot_kp::qs_ot_get_p_complex ( type(dbcsr_type), pointer matrix_x,
type(dbcsr_type), pointer matrix_x_im,
type(dbcsr_type), pointer matrix_sx,
type(dbcsr_type), pointer matrix_sx_im,
type(qs_ot_type) qs_ot_env,
logical, intent(in), optional zero_coordinates )

compute P=X^H*S*X and the STRICT matrix functions for a complex K-point channel

Parameters
matrix_xreal part of X
matrix_x_imimaginary part of X
matrix_sxreal part of S*X
matrix_sx_imimaginary part of S*X
qs_ot_envOT channel state
zero_coordinatesinitialize the known X=0 state without diagonalization

Definition at line 1696 of file qs_ot_kp.F.

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

◆ qs_ot_get_orbitals_complex()

subroutine, public qs_ot_kp::qs_ot_get_orbitals_complex ( type(dbcsr_type), pointer matrix_c,
type(dbcsr_type), pointer matrix_c_im,
type(dbcsr_type), pointer matrix_s,
type(dbcsr_type), pointer matrix_s_im,
type(qs_ot_type) qs_ot_env )

update complex K-point orbitals with the finite STRICT transformation

Parameters
matrix_creal output orbitals
matrix_c_imimaginary output orbitals
matrix_sreal overlap matrix
matrix_s_imimaginary overlap matrix
qs_ot_envOT channel state

Definition at line 1751 of file qs_ot_kp.F.

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

◆ qs_ot_project_gradient()

subroutine, public qs_ot_kp::qs_ot_project_gradient ( type(qs_ot_type) qs_ot_env,
type(dbcsr_type), pointer matrix_gx,
type(dbcsr_type), optional, pointer matrix_gx_im,
logical, intent(in), optional use_preconditioner )

Project a complex STRICT gradient; real minimizer fallbacks use the shared real projection.

Parameters
qs_ot_envOT channel state
matrix_gxreal component to project in place
matrix_gx_imimaginary component for a complex channel
use_preconditioneruse the attached preconditioner, default true

Definition at line 1812 of file qs_ot_kp.F.

Here is the call graph for this function:

◆ qs_ot_prepare_complex_tangent_metric()

subroutine, public qs_ot_kp::qs_ot_prepare_complex_tangent_metric ( type(qs_ot_type) qs_ot_env,
logical, intent(out), optional preconditioner_rejected,
logical, intent(in), optional use_preconditioner )

Prepare the inverse metric used to project a complex STRICT gradient. An unusable preconditioner is detached before any minimizer history is updated.

Parameters
qs_ot_envOT channel state
preconditioner_rejectedtrue if the attached preconditioner was not positive definite
use_preconditioneruse the attached preconditioner, default true

Definition at line 1864 of file qs_ot_kp.F.

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

◆ qs_ot_prepare_complex_tangent_metric_batch()

subroutine, public qs_ot_kp::qs_ot_prepare_complex_tangent_metric_batch ( type(qs_ot_type), dimension(:), intent(inout) qs_ot_env)

Prepare uncached single-rank STRICT metrics in bounded OpenMP batches. Leave unsuccessful channels to the scalar path so preconditioner rejection and history invalidation retain their existing order. Workers use only private dense storage.

Parameters
qs_ot_envlocal OT channels

Definition at line 1941 of file qs_ot_kp.F.

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

◆ qs_ot_get_derivative_complex()

subroutine, public qs_ot_kp::qs_ot_get_derivative_complex ( type(dbcsr_type), pointer matrix_hc,
type(dbcsr_type), pointer matrix_hc_im,
type(qs_ot_type) qs_ot_env,
type(dbcsr_type), optional, pointer matrix_hc_rotation,
type(dbcsr_type), optional, pointer matrix_hc_rotation_im )

finite complex STRICT derivative, projected onto C0^H*S*X=0

Parameters
matrix_hcreal part of H(k)*C(k)
matrix_hc_imimaginary part of H(k)*C(k)
qs_ot_envOT channel state
matrix_hc_rotationoccupation-weighted H(k)C(k) for the rotation channel
matrix_hc_rotation_imimaginary component of matrix_hc_rotation

Definition at line 2050 of file qs_ot_kp.F.

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

◆ qs_ot_get_orbitals_local_batch()

subroutine, public qs_ot_kp::qs_ot_get_orbitals_local_batch ( type(qs_ot_type), dimension(:), intent(inout) qs_ot_env,
type(cp_fm_p_type), dimension(:, :), intent(in) matrix_s,
type(cp_cfm_p_type), dimension(:), intent(in) matrix_c,
logical, intent(out) handled,
logical, intent(in), optional initialize )

Rebuild single-rank STRICT/IRAC orbitals in bounded batches using cached overlaps. DBCSR packing and writeback are outside OpenMP; workers only use dense data and private scratch.

Parameters
qs_ot_envlocal OT channels
matrix_spointers to cached real/imaginary overlaps, indexed by component and channel
matrix_cpointers to physical orbitals; only their active columns are updated
handledfalse when the original distributed/rotation path is required
initializebuild C0/SC0 from physical orbitals without modifying the physical state

Definition at line 2220 of file qs_ot_kp.F.

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

◆ qs_ot_get_derivative_local_batch()

subroutine, public qs_ot_kp::qs_ot_get_derivative_local_batch ( type(qs_ot_type), dimension(:), intent(inout) qs_ot_env,
type(dbcsr_p_type), dimension(:), intent(in) matrix_hc,
type(dbcsr_p_type), dimension(:), intent(in) matrix_hc_im,
logical, intent(out) handled,
type(dbcsr_p_type), dimension(:), intent(in), optional matrix_hc_physical,
type(dbcsr_p_type), dimension(:), intent(in), optional matrix_hc_physical_im )

Evaluate independent, single-rank STRICT/IRAC gradients in bounded OpenMP batches. DBCSR packing, filtering and metric preparation stay outside the worker region.

Parameters
qs_ot_envlocal OT channels
matrix_hcreal orbital gradients
matrix_hc_imimaginary orbital gradients
handledfalse when the original distributed/rotation path is required
matrix_hc_physicaloptional physical gradients for occupation preconditioning
matrix_hc_physical_imimaginary physical gradients

Definition at line 2453 of file qs_ot_kp.F.

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