![]() |
(git:2d1258d)
|
orbital transformations 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 | |
| pure subroutine, public | qs_ot_fixed_n_energy_hessian (response_weight, fixed_n_weight_sum, hessian) |
| dense fixed-N occupation Hessian in auxiliary-energy coordinates | |
| subroutine, public | qs_ot_fixed_n_schur_block (rotation_hessian, rayleigh_response, response_weight, rotation_gradient, energy_gradient, schur_block, coupling_vector, schur_rhs) |
| local block of the fixed-N rotation/energy Schur complement | |
| 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 | |
| pure subroutine, public | qs_ot_symmetric_sr1_update (matrix, step, response, updated_matrix, valid, relative_tolerance) |
| add one accepted symmetric response secant to a reference Hessian | |
| subroutine, public | qs_ot_density_secant_hessian (density_step, hamiltonian_step, density_modes, correction, valid, density_norm_sq, response_work) |
| project a self-adjoint density/Hamiltonian secant onto density-response modes | |
| 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_fixed_n_projector_frechet (chc, dchc, occupation, kpoint_weight, response_weight, fixed_n_weight_sum, projector_derivative, density_factor) |
| fixed-N Frechet derivative of a smooth occupation projector | |
| 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_new_preconditioner (qs_ot_env, preconditioner) |
| gets ready to use the preconditioner/ or renew the preconditioner only keeps a pointer to the preconditioner. If you change the preconditioner, you have to call this routine you remain responsible of proper deallocate of your preconditioner (or you can reuse it on the next step of the computation) | |
| subroutine, public | qs_ot_get_orbitals_ref (matrix_c, matrix_s, matrix_x, matrix_sx, matrix_gx_old, matrix_dx, qs_ot_env, qs_ot_env1) |
| ... | |
| 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 (matrix_hc, matrix_x, matrix_sx, matrix_gx, qs_ot_env) |
| ... | |
| 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_get_p (matrix_x, matrix_sx, qs_ot_env) |
| computes p=x*S*x and the matrix functionals related matrices | |
| 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) |
| compute P=X^H*S*X and the STRICT matrix functions for a complex K-point channel | |
| subroutine, public | qs_ot_generate_rotation (qs_ot_env) |
| computes the rotation matrix rot_mat_u that is associated to a given rot_mat_x using rot_mat_u=exp(rot_mat_x) | |
| subroutine, public | qs_ot_rot_mat_derivative (qs_ot_env) |
| computes the derivative fields with respect to rot_mat_x | |
| subroutine, public | qs_ot_get_orbitals (matrix_c, matrix_x, qs_ot_env) |
| c=(c0*cos(p^0.5)+x*sin(p^0.5)*p^(-0.5)) x rot_mat_u this assumes that x is already ortho to S*C0, and that p is x*S*x rot_mat_u is an optional rotation matrix | |
| 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_get_derivative (matrix_hc, matrix_x, matrix_sx, matrix_gx, qs_ot_env) |
| this routines computes dE/dx=dx, with dx ortho to sc0 needs dE/dC=hc,C0,X,SX,p if preconditioned it will not be the derivative, but the lagrangian multiplier is changed so that P*dE/dx is the right derivative (i.e. in the allowed subspace) | |
| subroutine, public | qs_ot_prepare_complex_tangent_metric (qs_ot_env, preconditioner_rejected) |
| 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_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 | |
orbital transformations
| real(kind=dp) function, public qs_ot::qs_ot_antihermitian_spectral_norm | ( | complex(kind=dp), dimension(:, :), intent(in) | rotation_generator | ) |
| pure real(kind=dp) function, public qs_ot::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 127 of file qs_ot.F.
| pure subroutine, public qs_ot::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 152 of file qs_ot.F.
| pure subroutine, public qs_ot::qs_ot_fixed_n_energy_hessian | ( | real(kind=dp), dimension(:), intent(in) | response_weight, |
| real(kind=dp), intent(in) | fixed_n_weight_sum, | ||
| real(kind=dp), dimension(:, :), intent(out) | hessian | ||
| ) |
dense fixed-N occupation Hessian in auxiliary-energy coordinates
H = diag(chi) - chi chi^T / sum(chi) is symmetric and has the constant-energy gauge as an exact null vector. It can be indefinite for non-monotone smearing distributions.
| response_weight | signed weighted occupation responses chi_i |
| fixed_n_weight_sum | global sum_i chi_i for the fixed-N group |
| hessian | projected fixed-N Hessian |
Definition at line 181 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_fixed_n_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, | ||
| 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_vector, | ||
| real(kind=dp), dimension(:), intent(out) | schur_rhs | ||
| ) |
local block of the fixed-N rotation/energy Schur complement
For C = D - chi chi^T / sum(chi), elimination of the auxiliary-energy block gives
S = A - R^T C R
= (A - R^T D R) + v v^T / sum(chi), v = R^T chi.
This routine builds the channel-local terms. The final rank-one term is deliberately left
separate so spin/k-point channels can be coupled without assembling a global dense
rotation Hessian.
| rotation_hessian | fixed-occupation rotation Hessian A |
| rayleigh_response | derivative R of the Rayleigh energies with respect to rotations |
| response_weight | local signed occupation responses chi |
| rotation_gradient | physical rotation gradient |
| energy_gradient | physical auxiliary-energy gradient |
| schur_block | local block A - R^T D R |
| coupling_vector | local part of v = R^T chi |
| schur_rhs | local right-hand side g_x + R^T g_e |
Definition at line 225 of file qs_ot.F.
| subroutine, public qs_ot::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 274 of file qs_ot.F.
| subroutine, public qs_ot::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 338 of file qs_ot.F.
| pure subroutine, public qs_ot::qs_ot_symmetric_sr1_update | ( | real(kind=dp), dimension(:, :), intent(in) | matrix, |
| real(kind=dp), dimension(:), intent(in) | step, | ||
| real(kind=dp), dimension(:), intent(in) | response, | ||
| real(kind=dp), dimension(:, :), intent(out) | updated_matrix, | ||
| logical, intent(out) | valid, | ||
| real(kind=dp), intent(in), optional | relative_tolerance | ||
| ) |
add one accepted symmetric response secant to a reference Hessian
With r=y-B0*s, the symmetric-rank-one update B=B0+r*r^T/(r^T*s) satisfies B*s=y exactly. The signed denominator is retained because a self-consistent Hxc response can be indefinite. Nearly orthogonal residuals are rejected instead of manufacturing a large unresolved mode.
| matrix | reference symmetric Hessian B0 |
| step | accepted displacement s |
| response | measured gradient response y |
| updated_matrix | symmetric secant Hessian B |
| valid | whether a resolved finite update was constructed |
| relative_tolerance | optional SR1 denominator acceptance threshold |
Definition at line 416 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_density_secant_hessian | ( | complex(kind=dp), dimension(:, :), intent(in) | density_step, |
| complex(kind=dp), dimension(:, :), intent(in) | hamiltonian_step, | ||
| complex(kind=dp), dimension(:, :, :), intent(in) | density_modes, | ||
| real(kind=dp), dimension(:, :), intent(out) | correction, | ||
| logical, intent(out) | valid, | ||
| real(kind=dp), intent(out), optional | density_norm_sq, | ||
| real(kind=dp), intent(out), optional | response_work | ||
| ) |
project a self-adjoint density/Hamiltonian secant onto density-response modes
For an accepted Hermitian density change S and the corresponding self-consistent
Hamiltonian change Y, the minimum-Frobenius-norm self-adjoint response satisfying
K*S=Y is
K = (Y<S,.> + S<Y,.>)/<S,S> - <S,Y>S<S,.>/<S,S>**2.
The returned matrix is <B_q,K*B_r> for the supplied Hermitian density modes B_r. Its
density-space construction is invariant under a common complex similarity transform.
| density_step | accepted density-matrix change S |
| hamiltonian_step | accepted self-consistent Hamiltonian change Y |
| density_modes | density derivatives B_r of the coupled minimizer variables |
| correction | projected symmetric Hxc response |
| valid | whether a finite nonzero density secant was available |
| density_norm_sq | optional <S,S> |
| response_work | optional <S,Y> |
Definition at line 475 of file qs_ot.F.
| subroutine, public qs_ot::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 540 of file qs_ot.F.
| subroutine, public qs_ot::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 616 of file qs_ot.F.
| subroutine, public qs_ot::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 715 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_fixed_n_projector_frechet | ( | complex(kind=dp), dimension(:, :), intent(in) | chc, |
| complex(kind=dp), dimension(:, :), intent(in) | dchc, | ||
| real(kind=dp), dimension(:), intent(in) | occupation, | ||
| real(kind=dp), intent(in) | kpoint_weight, | ||
| real(kind=dp), dimension(:), intent(in) | response_weight, | ||
| real(kind=dp), intent(in) | fixed_n_weight_sum, | ||
| complex(kind=dp), dimension(:, :), intent(out) | projector_derivative, | ||
| real(kind=dp), intent(in), optional | density_factor | ||
| ) |
fixed-N Frechet derivative of a smooth occupation projector
The spectral divided-difference kernel is invariant under rotations inside a degenerate eigenspace. Its diagonal includes the chemical-potential response of the complete fixed-N group, while off-diagonal terms describe the physical change of the spectral projector.
| chc | projected Hermitian Hamiltonian |
| dchc | Hermitian Hamiltonian perturbation |
| occupation | canonical occupations associated with the eigenvalues of chc |
| kpoint_weight | irreducible-k-point weight |
| response_weight | signed weighted occupation responses for this channel |
| fixed_n_weight_sum | susceptibility summed over the complete fixed-N group |
| projector_derivative | derivative of the weighted occupation projector |
| density_factor | optional representation-dependent density prefactor |
Definition at line 820 of file qs_ot.F.
| subroutine, public qs_ot::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 912 of file qs_ot.F.
| pure complex(kind=dp) function, public qs_ot::qs_ot_complex_exp_frechet_kernel | ( | real(kind=dp), intent(in) | e1, |
| real(kind=dp), intent(in) | e2 | ||
| ) |
| subroutine, public qs_ot::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 1190 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_new_preconditioner | ( | type(qs_ot_type) | qs_ot_env, |
| type(preconditioner_type), pointer | preconditioner | ||
| ) |
gets ready to use the preconditioner/ or renew the preconditioner only keeps a pointer to the preconditioner. If you change the preconditioner, you have to call this routine you remain responsible of proper deallocate of your preconditioner (or you can reuse it on the next step of the computation)
| qs_ot_env | ... |
| preconditioner | ... |
Definition at line 1321 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_get_orbitals_ref | ( | type(dbcsr_type), pointer | matrix_c, |
| type(dbcsr_type), pointer | matrix_s, | ||
| type(dbcsr_type), pointer | matrix_x, | ||
| type(dbcsr_type), pointer | matrix_sx, | ||
| type(dbcsr_type), pointer | matrix_gx_old, | ||
| type(dbcsr_type), pointer | matrix_dx, | ||
| type(qs_ot_type) | qs_ot_env, | ||
| type(qs_ot_type) | qs_ot_env1 | ||
| ) |
| subroutine, public qs_ot::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 1935 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_get_derivative_ref | ( | type(dbcsr_type), pointer | matrix_hc, |
| type(dbcsr_type), pointer | matrix_x, | ||
| type(dbcsr_type), pointer | matrix_sx, | ||
| type(dbcsr_type), pointer | matrix_gx, | ||
| type(qs_ot_type) | qs_ot_env | ||
| ) |
| subroutine, public qs_ot::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 2243 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_get_p | ( | type(dbcsr_type), pointer | matrix_x, |
| type(dbcsr_type), pointer | matrix_sx, | ||
| type(qs_ot_type) | qs_ot_env | ||
| ) |
| subroutine, public qs_ot::qs_ot_generate_rotation_complex | ( | type(qs_ot_type) | qs_ot_env | ) |
| subroutine, public qs_ot::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 2720 of file qs_ot.F.
| subroutine, public qs_ot::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 | ||
| ) |
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 |
Definition at line 2842 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_generate_rotation | ( | type(qs_ot_type) | qs_ot_env | ) |
computes the rotation matrix rot_mat_u that is associated to a given rot_mat_x using rot_mat_u=exp(rot_mat_x)
| qs_ot_env | a valid qs_ot_env |
Definition at line 2873 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_rot_mat_derivative | ( | type(qs_ot_type) | qs_ot_env | ) |
computes the derivative fields with respect to rot_mat_x
| qs_ot_env | valid qs_ot_env. In particular qs_ot_generate_rotation has to be called before and the rot_mat_dedu matrix has to be up to date |
Definition at line 2938 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_get_orbitals | ( | type(dbcsr_type), pointer | matrix_c, |
| type(dbcsr_type), pointer | matrix_x, | ||
| type(qs_ot_type) | qs_ot_env | ||
| ) |
c=(c0*cos(p^0.5)+x*sin(p^0.5)*p^(-0.5)) x rot_mat_u this assumes that x is already ortho to S*C0, and that p is x*S*x rot_mat_u is an optional rotation matrix
| matrix_c | ... |
| matrix_x | ... |
| qs_ot_env | ... |
Definition at line 3157 of file qs_ot.F.
| subroutine, public qs_ot::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 3207 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_get_derivative | ( | type(dbcsr_type), pointer | matrix_hc, |
| type(dbcsr_type), pointer | matrix_x, | ||
| type(dbcsr_type), pointer | matrix_sx, | ||
| type(dbcsr_type), pointer | matrix_gx, | ||
| type(qs_ot_type) | qs_ot_env | ||
| ) |
this routines computes dE/dx=dx, with dx ortho to sc0 needs dE/dC=hc,C0,X,SX,p if preconditioned it will not be the derivative, but the lagrangian multiplier is changed so that P*dE/dx is the right derivative (i.e. in the allowed subspace)
| matrix_hc | ... |
| matrix_x | ... |
| matrix_sx | ... |
| matrix_gx | ... |
| qs_ot_env | ... |
Definition at line 3281 of file qs_ot.F.
| subroutine, public qs_ot::qs_ot_prepare_complex_tangent_metric | ( | type(qs_ot_type) | qs_ot_env, |
| logical, intent(out), optional | preconditioner_rejected | ||
| ) |
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 |
Definition at line 3369 of file qs_ot.F.
| subroutine, public qs_ot::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 3440 of file qs_ot.F.