![]() |
(git:e41e4ec)
|
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. | |
Complex k-point orbital transformations, response kernels and local batch execution. Shared real/spectral operations are provided by qs_ot.
| 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
| rotation_generator | anti-Hermitian generator |
Definition at line 111 of file qs_ot_kp.F.
| 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
| weighted_energy_response | sum_i chi_i de_i over the perturbed local channels |
| local_curvature_sum | local sum_i chi_i, used as a serial fallback |
| fixed_n_curvature_sum | global sum_i chi_i for the complete fixed-N group |
Definition at line 138 of file qs_ot_kp.F.
| 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
| rayleigh_energy | diagonal expectation values of the current Hamiltonian |
| energy_coordinate | auxiliary band energies controlling the occupations |
| response_weight | signed weighted occupation responses chi_i |
| fixed_n_weight_sum | global sum_i chi_i for the fixed-N group |
| fixed_n_weighted_residual | global sum_i chi_i (h_i-e_i) |
| gradient | projected fixed-N gradient |
Definition at line 163 of file qs_ot_kp.F.
| 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.
| rotation_hessian | finite orbital-rotation Hessian |
| rayleigh_response | derivative of all spin-resolved Rayleigh energies |
| response_weight | positive occupation-response weights |
| response_group | fixed-N group of every energy variable |
| rotation_gradient | orbital-rotation gradient |
| energy_gradient | auxiliary-energy gradient |
| schur_block | energy-eliminated rotation block |
| coupling_matrix | retained chemical-potential coupling columns |
| schur_rhs | energy-eliminated rotation right-hand side |
Definition at line 200 of file qs_ot_kp.F.
| 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.
| matrix | real symmetric response matrix |
| rhs | one or more right-hand sides |
| solution | spectral-absolute inverse applied to rhs |
| valid | whether finite input and output were obtained |
| relative_floor | optional relative eigenvalue floor |
Definition at line 256 of file qs_ot_kp.F.
| 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.
| reference_hessian | projected frozen-H Hessian B0 |
| response_correction | projected physical response K |
| coefficients | response coefficients c in the supplied basis |
| valid | whether a finite, positive, sufficiently resolved solve was obtained |
| projected_gradient | optional physical gradient projected onto the supplied basis |
| relative_floor | optional relative positive-eigenvalue floor |
Definition at line 320 of file qs_ot_kp.F.
| 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
| density_norm_sq | <S,S> |
| response_work | <S,Y> |
| density_overlap | <S,B_r> |
| response_overlap | <Y,B_r> |
| correction | projected symmetric Hxc response <B_q,K*B_r> |
| valid | whether finite nonzero secant data were available |
| secant_mode | optional mode representing the accepted full density secant divided by its line-search position |
| secant_position | signed line-search position of the accepted full density secant |
Definition at line 396 of file qs_ot_kp.F.
| 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.
| rotation_generator | current anti-Hermitian REF generator X |
| occupation | current occupations f |
| kpoint_weight | irreducible K-point weight w_k |
| rotation_step | interleaved real/imaginary anti-Hermitian direction |
| weighted_occupation_step | derivative of w_k*f, including the fixed-N mu response |
| density_tangent | Hermitian tangent in the current physical orbital basis |
| difference_step | optional finite-chart central-difference step |
Definition at line 472 of file qs_ot_kp.F.
| 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.
| overlap_start_current | cross overlap O |
| occupation_start | occupations at the accepted start |
| occupation_current | occupations at the accepted endpoint |
| hamiltonian_step_start | C0^H*(H1-H0)*C0 |
| hamiltonian_step_current | C1^H*(H1-H0)*C1 |
| density_modes | current-orbital density tangents |
| kpoint_weight | irreducible K-point weight |
| density_norm_sq | contribution to <Delta P,Delta P> |
| response_work | contribution to <Delta P,Delta H> |
| density_overlap | contributions <Delta P,B_r> |
| response_overlap | contributions <Delta H,B_r> |
| valid | whether a finite nonzero secant was available |
Definition at line 571 of file qs_ot_kp.F.
| 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.
| chc | current projected Hermitian Hamiltonian U^H H_ref U |
| rotation_generator | current anti-Hermitian REF generator |
| occupation | fixed occupations attached to the rotated columns |
| kpoint_weight | irreducible-k-point weight |
| rotation_gradient | gradient in interleaved real/imaginary pair coordinates |
| rotation_hessian | derivative of rotation_gradient in the same coordinates |
| rayleigh_response | derivative of diag(U^H H_ref U) with respect to the pair coordinates |
| difference_step | optional central finite-difference step for the Hessian action |
Definition at line 677 of file qs_ot_kp.F.
| 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).
| e1 | ... |
| e2 | ... |
Definition at line 923 of file qs_ot_kp.F.
| 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
| evals | generator eigenvalues |
| inner_deriv_re | real part of the matrix in the generator eigenbasis |
| inner_deriv_im | imaginary part of the matrix in the generator eigenbasis |
| outer_deriv_re | real part of the mapped matrix |
| outer_deriv_im | imaginary part of the mapped matrix |
| adjoint | use the adjoint Frechet kernel for gradients |
Definition at line 955 of file qs_ot_kp.F.
| 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
| matrix_c | ... |
| matrix_c_im | ... |
| matrix_s | ... |
| matrix_s_im | ... |
| qs_ot_env | ... |
| qs_ot_env1 | environment carrying the shared minimizer state |
Definition at line 1086 of file qs_ot_kp.F.
| 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)
| matrix_hc | ... |
| matrix_hc_im | ... |
| qs_ot_env | ... |
| matrix_hc_rotation | occupation-weighted H(k)C(k) for the rotation channel |
| matrix_hc_rotation_im | imaginary component of matrix_hc_rotation |
Definition at line 1219 of file qs_ot_kp.F.
| 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
| qs_ot_env | a complex k-point OT environment |
Definition at line 1508 of file qs_ot_kp.F.
| 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
| qs_ot_env | a complex k-point OT environment with an up-to-date U |
Definition at line 1588 of file qs_ot_kp.F.
| 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
| matrix_x | real part of X |
| matrix_x_im | imaginary part of X |
| matrix_sx | real part of S*X |
| matrix_sx_im | imaginary part of S*X |
| qs_ot_env | OT channel state |
| zero_coordinates | initialize the known X=0 state without diagonalization |
Definition at line 1696 of file qs_ot_kp.F.
| 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
| matrix_c | real output orbitals |
| matrix_c_im | imaginary output orbitals |
| matrix_s | real overlap matrix |
| matrix_s_im | imaginary overlap matrix |
| qs_ot_env | OT channel state |
Definition at line 1751 of file qs_ot_kp.F.
| 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.
| qs_ot_env | OT channel state |
| matrix_gx | real component to project in place |
| matrix_gx_im | imaginary component for a complex channel |
| use_preconditioner | use the attached preconditioner, default true |
Definition at line 1812 of file qs_ot_kp.F.
| 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.
| qs_ot_env | OT channel state |
| preconditioner_rejected | true if the attached preconditioner was not positive definite |
| use_preconditioner | use the attached preconditioner, default true |
Definition at line 1864 of file qs_ot_kp.F.
| 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.
| qs_ot_env | local OT channels |
Definition at line 1941 of file qs_ot_kp.F.
| 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
| matrix_hc | real part of H(k)*C(k) |
| matrix_hc_im | imaginary part of H(k)*C(k) |
| qs_ot_env | OT channel state |
| matrix_hc_rotation | occupation-weighted H(k)C(k) for the rotation channel |
| matrix_hc_rotation_im | imaginary component of matrix_hc_rotation |
Definition at line 2050 of file qs_ot_kp.F.
| 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.
| qs_ot_env | local OT channels |
| matrix_s | pointers to cached real/imaginary overlaps, indexed by component and channel |
| matrix_c | pointers to physical orbitals; only their active columns are updated |
| handled | false when the original distributed/rotation path is required |
| initialize | build C0/SC0 from physical orbitals without modifying the physical state |
Definition at line 2220 of file qs_ot_kp.F.
| 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.
| qs_ot_env | local OT channels |
| matrix_hc | real orbital gradients |
| matrix_hc_im | imaginary orbital gradients |
| handled | false when the original distributed/rotation path is required |
| matrix_hc_physical | optional physical gradients for occupation preconditioning |
| matrix_hc_physical_im | imaginary physical gradients |
Definition at line 2453 of file qs_ot_kp.F.