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_thresholdis given. If both areNoneall virtuals are kept (the result is just a rotation to the MP2-NO / full semicanonical basis — useful as then_keep → all-virtualslimit for validation).occ_threshold – retain every virtual whose MP2 natural-orbital occupation is
>= occ_threshold(ke-liao’s threshold scan). Takes precedence overn_keepwhen set.
- Returns:
FNOResultwith the truncatedmfand matching arrays.- Raises:
ValueError – if the mean-field is not restricted, if neither truncation argument is compatible, or if
n_keepexceeds 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 anmfwhose occupied space already reflects that choice.