(git:4cf809f)
Loading...
Searching...
No Matches
hfx_ace_methods Module Reference

Adaptively Compressed Exchange (ACE) operator for HFX. Reference: Lin, J. Chem. Theory Comput. 2016, 12, 5, 2242-2249. More...

Functions/Subroutines

subroutine, public hfx_ace_ks_matrix (qs_env, ks_matrix, rho, energy, calculate_forces, just_energy, v_rspace_new, v_tau_rspace, ace_rebuild_frequency, ext_xc_section)
 Main ACE entry point, replacing hfx_ks_matrix in qs_ks_methods.
 
subroutine, public hfx_ace_release (iw_opt)
 Release all ACE storage and reset state flags.
 
subroutine, public hfx_ace_set_dynamic_mode (is_dynamic)
 Mark this run as dynamic (GEO_OPT/MD) so Bypass C fires for geo step 0. Call this once from the geo_opt or MD driver before the first SCF.
 

Detailed Description

Adaptively Compressed Exchange (ACE) operator for HFX. Reference: Lin, J. Chem. Theory Comput. 2016, 12, 5, 2242-2249.

Algorithm (per spin):

BUILD (first call, or every rebuild_frequency steps):

  1. Full HFX: ks_matrix = K_HFX + H_core, energyex = E_x(full)
  2. K_AO = ks_matrix - H_core (nao x nao, negative semidefinite)
  3. C_occ = first nocc columns of mo_coeff, redistributed to a layout compatible with K_AO so that PDGEMM works correctly
  4. xi = K_AO * C_occ (nao x nocc)
  5. M = C_occ^T * xi (nocc x nocc, negative definite)
  6. -M = U^T U via Cholesky (U upper triangular, stored in M_fm)
  7. W = xi * U^{-1} (nao x nocc, the ACE projector)
  8. Apply (see below) to update ks_matrix and energyex

APPLY (all other steps): ks_matrix = H_core - W * W^T E_x = -0.5 * Tr[W^T * P * W]

Diagnostics (controlled by DBG_STALE / DBG_EXACT_EX module flags):

DIAG A projector staleness (cheap, runs every APPLY step) Computes ||W^T C_occ^current||_F / ||W^T C_occ^BUILD||_F. Ratio = 1 → W still accurate. Ratio -> 0 → W is stale.

DIAG B exact vs ACE exchange energy (expensive: one full HFX per APPLY) Calls full HFX with just_energy=.TRUE. to get E_x^exact[P^k] and compares to E_x^ACE[P^k]. Growing |delta| confirms stale W. ACE ks_matrix and energyex are restored after the diagnostic.

Author
Ritama Kar

Function/Subroutine Documentation

◆ hfx_ace_ks_matrix()

subroutine, public hfx_ace_methods::hfx_ace_ks_matrix ( type(qs_environment_type), pointer  qs_env,
type(dbcsr_p_type), dimension(:, :), pointer  ks_matrix,
type(qs_rho_type), pointer  rho,
type(qs_energy_type), pointer  energy,
logical, intent(in)  calculate_forces,
logical, intent(in)  just_energy,
type(pw_r3d_rs_type), dimension(:), pointer  v_rspace_new,
type(pw_r3d_rs_type), dimension(:), pointer  v_tau_rspace,
integer, intent(in)  ace_rebuild_frequency,
type(section_vals_type), optional, pointer  ext_xc_section 
)

Main ACE entry point, replacing hfx_ks_matrix in qs_ks_methods.

Parameters
qs_env...
ks_matrix...
rho...
energy...
calculate_forces...
just_energy...
v_rspace_new...
v_tau_rspace...
ace_rebuild_frequency...
ext_xc_section...

Definition at line 147 of file hfx_ace_methods.F.

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

◆ hfx_ace_release()

subroutine, public hfx_ace_methods::hfx_ace_release ( integer, intent(in), optional  iw_opt)

Release all ACE storage and reset state flags.

Parameters
iw_opt...

Definition at line 834 of file hfx_ace_methods.F.

Here is the caller graph for this function:

◆ hfx_ace_set_dynamic_mode()

subroutine, public hfx_ace_methods::hfx_ace_set_dynamic_mode ( logical, intent(in)  is_dynamic)

Mark this run as dynamic (GEO_OPT/MD) so Bypass C fires for geo step 0. Call this once from the geo_opt or MD driver before the first SCF.

Parameters
is_dynamic.TRUE. for GEO_OPT/MD, .FALSE. to reset.

...

Parameters
is_dynamic...

Definition at line 871 of file hfx_ace_methods.F.

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