pytc.fno.make_fno_mo_coeff

pytc.fno.make_fno_mo_coeff(mf, *, n_keep=None, occ_threshold=None)[source]

Build MP2 natural orbitals and truncate the virtual space.

Parameters:
  • mf – PySCF restricted mean-field (scf.rhf.RHF); must have been converged. Used for the MP2 calculation, the reference Fock, and as the template for the returned truncated copy.

  • n_keep – number of virtual natural orbitals to retain. Ignored if occ_threshold is given. If both are None all virtuals are kept (the result is just a rotation to the MP2-NO / full semicanonical basis — useful as the n_keep all-virtuals limit for validation).

  • occ_threshold – retain every virtual whose MP2 natural-orbital occupation is >= occ_threshold (ke-liao’s threshold scan). Takes precedence over n_keep when set.

Returns:

FNOResult with the truncated mf and matching arrays.

Raises:

ValueError – if the mean-field is not restricted, if neither truncation argument is compatible, or if n_keep exceeds the virtual count.

Notes

Truncation is virtual-only: every occupied orbital (read from mf.mo_occ) is retained and kept first in the output; only the virtual space is rotated to natural orbitals and truncated. The MP2 step is all-electron (no frozen core) — consistent with the project’s all-electron convention; if a frozen-core FNO is wanted, pass an mf whose occupied space already reflects that choice.