pytc.df.isdf_decompose

pytc.df.isdf_decompose(phi, grad_phi, n_rank_phi, n_rank_grad, weights=None, grid_batch_size=4096, rcond=1e-14, is_incore=False, save_path=None, fixed_pivots=None)[source]

Perform ISDF decomposition of orbitals and their gradients.

Memory-efficient implementation using SVD-based solver to avoid materializing large C matrices (n_orb² × n_fused).

Parameters:
  • phi – Orbitals on grid (n_orb, n_grid)

  • grad_phi – Orbital gradients on grid (n_orb, n_grid, 3)

  • n_rank_phi – Rank for phi decomposition

  • n_rank_grad – Rank for gradient decomposition

  • weights – Optional (n_grid,) array of integration weights. If provided, pivot selection is weighted by these weights.

  • grid_batch_size – Number of grid points to process in each batch

  • rcond – Relative condition number cutoff for SVD pseudoinverse (default 1e-14). Smaller values retain more singular values (more accurate but less stable).

Returns:

(N_orb, N_fused) xi_phi: (N_fused, N_grid) grad_phi_piv: (N_orb, N_fused, 3) xi_grad: (N_fused, N_grid, 3) pivots: (N_fused,)

Return type:

phi_piv