pytc.solver.bug_core.extract_df_factors

pytc.solver.bug_core.extract_df_factors(mf, nocc, blocks=('oo', 'ov', 'vv'), mo_coeff=None)[source]

PySCF DF 3-index MO factors B[p,q,Q] for the oo, ov and vv blocks.

Returns (B_oo (o,o,naux), B_ov (o,v,naux), B_vv (v,v,naux)); blocks not listed in blocks come back as None (B_vv is by far the largest, so a caller that needs only ov should say so). With PYTC_HOST_SCRATCH set, every block is built and returned in disk-backed bug_helper.host_empty() buffers, contiguous as (p, q, naux).