YAML Input#
Choose the economical MPPT route before filling YAML fields. For large systems, start from selected-orbital/block storage and density fitting, then define the reference and required states. Keep only required inputs and deliberate overrides; YAML defaults is the complete omission reference, not a template to paste into a calculation.
Always declare scf.spin and, when selecting determinants,
mppt.cipsixx.selection_growth explicitly. Electronic state and selection
strategy stay visible even when their values match software defaults.
The Main Choices#
Choice |
Why it matters |
|---|---|
Selected orbital window |
Restricts the integral problem used by CIPSIXX and stores only the MPPT block families needed outside it, instead of a dense full-space ERI table. |
Density fitting |
First choice for routine SCF/CASSCF and integral work, including native automatic auxiliary selection. Usually reduces time and memory through three-index factors. Consider exact treatment for small tasks or to investigate unexpected results. |
Potential representation |
An ECP can already encode the intended GRECP/GRPP approximation. A separate |
Reference and correlation spaces |
The optimized CASSCF CAS, later selected orbital window and selected determinant list are different objects. Define their roles before choosing counts. |
Excitation permissions |
Set |
Selected and DF are complementary, not alternatives. Selected blocks avoid full-space quartic ERI storage; with fixed small core/selected dimensions, their storage can grow quadratically with the external orbital count. CIPSIXX still has its own selected-space integral and determinant costs. DF replaces a dense four-index transformation by three-index factors; memory also depends on the auxiliary rank and the required downstream blocks. Neither statement makes the entire calculation universally quadratic. DF fitting error depends on the basis, not an assumption of exact numerical identity.
Current software defaults do not automatically enable these recommended large-system choices. In particular, enable DF on each applicable source stage; the SCF and active-space flags/bases are independent. Later export inherits the selected reference’s actual provider.
Before downstream export, set mppt.downstream_nocc explicitly for the
intended pseudo-restricted doubly occupied spatial prefix. It is a representation
choice for DIAGPT/HEFFSO, not the physical CASSCF populations; see
the downstream reference.
Prepare The Reference First#
Define the molecular model, orbital basis, potential and embedding below.
Read SCF decisions; choose the reference state, DF and resources.
Read CASCI/CASSCF decisions only if an active reference is needed. Its review may require no extra solver settings.
Check convergence and reference character before continuing to orbital preparation and integral export.
An existing reference is not a reason to rerun it. See saved-reference preparation/export for completed CASCI/CASSCF checkpoints and workflow-only input for existing integrals. Imported references retain their original scientific input; only permitted explicit resource overrides may replace inherited settings.
Minimal Reference Input#
Save this small, neutral closed-shell H2 reference as reference.yaml.
Angstrom units, RHF and ordinary convergence are sufficient here, so they are
not repeated. The singlet multiplicity is explicit. DF is the chosen
approximation and one thread is the small example’s explicit resource bound.
molecule:
atoms:
- [H, 0.0, 0.0, 0.0]
- [H, 0.0, 0.0, 0.74]
basis:
H: [library, sto-3g]
scf:
spin: 1
density_fit: true
omp_num_threads: 1
This command prepares only the SCF reference, before integral export:
pyscf2mppt reference.yaml --output-dir runs/reference --stop-after scf
The active-space guide gives a separate compact CASCI/CASSCF example ending at its reference checkpoint. These inputs are not complete downstream recipes. Do not drop the stop flag before configuring the intended selected export: an omitted selected window requests full ERIs. Add scientific settings before starting a run; changed input requires a fresh output directory, not a modified-input resume.
Molecular Model And Potentials#
Geometry, Charge And Units#
Fresh input requires nonempty molecule.atoms and basis. Atom rows are
[Element, x, y, z]; choose the coordinate units deliberately. Set charge and
SCF multiplicity for the explicit electrons left by the chosen potential.
Only C1/no symmetry is supported; its default need not be written.
Use unambiguous angstrom/A or bohr/B. The current normalizer accepts
prefix spellings too, but counterintuitively maps a.u. to Angstrom. Do not
use that spelling for atomic units. molecule.so controls later SO-integral
export, not a spin-orbit SCF calculation or HEFFSO activation; an explicit
mppt.spin_orbit takes precedence.
molecule.max_memory is a global PySCF hint, not a hard process cap. Prefer
numeric decimal MB: 50000 corresponds to 50,000,000,000 planner bytes, not
MiB. Legacy strings such as "32GB" are accepted but resolve to 32768 PySCF MB.
Stage-specific budgets belong to the appropriate stage; export’s buffer cap is
a separate control.
Orbital Basis#
Map each element/atom label to [library, name] or [file, path]. The orbital
basis represents the MOs; it is not the DF auxiliary or AVAS projector basis.
Only the case-insensitive token file selects file loading. Other first tokens,
including a misspelling of library, are currently treated as library requests:
write the documented tokens exactly. Managed CLI resources resolve from the
source YAML directory and are captured with the run.
ECP Or Full GRECP/GRPP#
GRECP and GRPP refer here to the same generalized relativistic pseudopotential approach, not two independent Hamiltonian contributions to add. The input representation must match the operator actually chosen for the system.
An ordinary semilocal ECP can already encode the intended GRECP/GRPP
approximation. In that case use ecp and do not add a separate grpp section:
ecp:
Ce: [file, resources/Ce.ecp]
This is a resource fragment with a user-supplied file, not a bundled standalone example. ECP library pairs are accepted too. Confirm the removed-electron count, scalar channels and any required SO channels of the actual potential.
When A Separate GRPP Resource Is Needed#
Use the full native representation when the chosen model needs the full GRPP operator, including nonlocal outer-core terms that the semilocal approximation does not retain:
grpp:
Ce: resources/Ce.grpp
With automatic source selection, this uses the native GRPP molecule/context.
The normal installation supplies libgrpp and libgrpppy; set LIBGRPP_ROOT
only for a deliberate custom shared installation. Do not duplicate the same
center under ECP and GRPP merely because of terminology. ECP embedding centers
alongside a full-GRPP active atom are a separate, valid model choice.
An approximate ECP and a full GRPP file are not interchangeable merely because they share a name or scalar channels. Their outer-core scalar and SO terms can differ. Changing representation can change the physical model and needs an explicit decision, not an automatic syntax correction.
Point-Charge Embedding#
Add point_charges only when the model has external charges. Rows are
[x, y, z, charge], in the same coordinate units as the molecule. Pseudopotential
embedding centers and point charges play different roles; retain the intended
combination rather than replacing one automatically with the other.
Syntax And Defaults#
Keys are case-sensitive. Use actual YAML booleans and numbers, not quoted
numeric/Boolean strings. Strict floating fields require a floating value such
as 8000.0; several downstream thresholds currently coerce values, but new
inputs should not rely on that exception. Use canonical keys, not duplicate
aliases alongside them.
Full-calculation parsing rejects unknown top-level and nested keys. Existing-HDF5
workflow parsing is different: unrelated top-level and direct mppt keys can be
ignored, while nested stage settings are checked. See the
workflow-only contract.
Do not remove null/empty settings without checking their meaning or rewrite old
inputs to shorten them: fresh-run behavior and saved-run identity are distinct.
Upstream Reference Links#
The following stable entry anchors lead to the owning stage explanations.
For a single bounded PySCF worker, set parallelism: {threads: 32}. This controls
both OpenMP and BLAS; optional phase overrides and legacy omission behavior are
described in the SCF guide’s resources section.
Section: scf (optional)#
Use the SCF stage guide for the method, reference state, DF, resources and justified convergence changes. Ordinary defaults need no extra fields.
Restricted DFT Orbitals#
See explicit RKS choices and physical-Hamiltonian semantics.
Auxiliary Basis For Density Fitting#
See stage-independent auxiliary choices and portable resources.
SCF Initial Guess#
SAP Fit Sources#
Native Checkpoint Guess#
See new-SCF checkpoint guesses, projection and collision checks.
Density And Hamiltonian Semantics#
See actual-family density validation and the final Hamiltonian.
Sections: casscf Or casci (optional)#
Use the active-space stage guide for CAS counts, target states, DF, charge/spin changes, diagnostics and optional DMRG. Do not copy an optimizer’s entire default parameter list into the input.
AVAS Initial Guess For CASSCF#
See initial ordering and independent projector-basis choices.
How The Starting Orbitals Are Built#
Requested CAS Size, Diagnostics And Errors#
See count mismatches, fallback errors and completed-stage checkpoints.
Section: mppt (optional)#
Prepare chemically useful MOs, select the correlation window, then export integrals in that final basis. Orbital generation is a central MPPT capability: it collects chosen atomic-shell character from delocalized occupied/virtual spaces, preserves the CASSCF active block and places useful directions beside it. The rest of the MOs remain available for perturbation theory.
Use orbital generation and analysis for the algorithms, per-label placement, joint threshold/count selection and inspection commands. Then configure CIPSIXX in the resulting selected window. Orbital generation and determinant selection are separate operations.
Export inherits the selected reference’s exact/DF approximation. Omit delete_from
to retain all reference MOs, and use N_select > 0 for a selected window inside that
full space. N_select: 0 is the full-ERI route, including int2e_full; it is
not required just to keep every MO. Memory controls do not automatically
truncate orbitals or change the inherited integral approximation.
For avas_labels_*, occupied/virtual construction, reference bases and orbital
ordering, go to orbital generation and analysis.
The CASSCF starting-orbital settings are in
CASSCF AVAS initial guess.
|
|
Output and applicable controls |
|---|---|---|
|
Positive |
Ordinary selected families; optional |
|
|
Full ERIs including |
|
Positive |
Ordinary selected families from one DF approximation; automatic RAM/HDF5 MO factors, no force-storage flag or exact slabs |
|
|
Full DF ERIs including |
Both approximations retain the ordinary float64 integral payload and HDF5 contract. DF factors are internal, not a new consumer format. See DF-expanded export for supported sources and short reference fragments; this section is not a standalone calculation recipe.
Keep only task choices in an export fragment. For a prepared ordering where the intended window contains five MOs starting at MO 1 and the downstream vacuum has two doubly occupied spatial MOs:
mppt:
N_select: 5
downstream_nocc: 2
Those counts are choices for this fragment, not general defaults. N_start: 1
and delete_from: 0 would repeat omission behavior; leave them out when that is
the intent. Do not copy N_select: 0 into a selected workflow: it requests full
ERIs. YAML defaults owns the complete omission reference.
Notes:
orbitalschooses the reference used for projection and dump:autouses the configured CASCI/CASSCF stage, otherwise SCF;scfalways uses SCF, even after an active-space stage.casciis accepted with acascisection and normalized to the sharedcasscfcheckpoint label.output_hdf5chooses the integral-dump name below the CLI run’sdata/directory. Alreadydata/-qualified paths are not prefixed twice.Omit
integral_modeto inherit the selected reference’s actual exact/DF mode and auxiliary provider. Legacy explicitexact/dfvalues only assert a match; a conflict is rejected. Explicit null also inherits. Both YAML and Python use the sharedExportConfigmodel and inherit DF for a DF source. See DF-expanded export for storage and resource limits.prefixandoutput_hdf5must remain nonempty after surrounding whitespace is removed when the downstream workflow configuration is built.so_sourceacceptsauto,scalar, orrelativistic.autoconstructs the GRPP molecule when a nonemptygrppsection exists;scalarsuppresses that construction even when GRPP paths are present;relativisticrequires a nonemptygrppsection. This is separate frommolecule.so: settingmolecule.so: falsestill writesintso, but fills it with zeros.no_dump: trueruns through calculation/orbital preparation but skips finalpyscf_dump.h5generation. Because automatic downstream continuation occurs only afterdump, it also prevents enabled cipsixx, DIAGPT, and HEFFSO stages from running in that command.N_select > 0chooses that many consecutive MOs, starting exactly atN_startin the prepared orbital ordering. Full-space compact J/K and required ERI families still use every retained MO; only the selected window is passed to CIPSIXX.0requests full-space ERIs. Both YAML and Python reject negative values; use0for the full route.N_startis a positive one-based first selected MO; it defaults to1. For example,N_start: 1, N_select: 25selects MO 1–25, andN_start: 4, N_select: 25selects MO 4–28. The window must contain a downstream occupied orbital and fit inside the retained MO space. Nonpositive starts and out-of-range endpoints are rejected before integral transformation.delete_fromis a one-based inclusive trim point applied before integral transformation. For example,delete_from: 320keeps orbitals 1 through 319.0disables trimming. Negative values and1are rejected. Any value above the available MO count, including count plus one, is ignored with a[WARN]message and behaves asdelete_from: 0: orbital analysis and export retain every available MO. The YAML runtime checks the AO count immediately after building the molecule, before SCF, and disables an oversized cutoff for all later stages. Export and checkpoint orbital inspection also check the actual MO count, which can be smaller than the AO count. A cutoff equal to the MO count still removes the last MO.N_selectandN_startkeep their usual meanings when deletion is disabled.max_mem_bytesdefaults tonull(automatic); omission andnullpass through the runtime and public exporter without an injected 2-GiB cap. An explicit positive integer byte count or unit string (GB,MB,KB) retains its temporary-buffer meaning, not total RSS. Historical parsing is unchanged: these legacy suffixes use powers of 1024, so"2GB"is 2,147,483,648 bytes. To make more RAM available, set a generous but feasiblemolecule.max_memorywithin the worker allocation. A larger explicit cap can relieve an existing small cap, but cannot exceed automatic uncapped workspace or the total budget.exact_half_block_sizeis an optional strict positive integer, not a boolean or fractional value. It limits the first MO side of the exact half-transform for selected blocks. Omitted ornullkeeps the monolithic strategy and existing numerical output. Setting it withN_select <= 0is an early error, not a silently ignored full-route option. It is also rejected withintegral_mode: df.avas_labels_analysiscontrols which AO subspaces are shown in analysis tables and persisted as raw final-orbital weights under/mppt/orbital_analysis. Analysis, occupied, and virtual label sets are merged and deduplicated by label and reference basis in their declared order. Compound labels are stored as JSON arrays. These are weighted character diagnostics, not categorical shell or correlated-state assignments.Set
downstream_noccexplicitly to define the first MOs treated as doubly occupied in the DIAGPT/HEFFSO pseudo-restricted vacuum. This is not a claim about their physical occupations. The software can infer a value from electron count, but do not rely on that as the scientific choice of vacuum. Values must lie between zero and the post-trim MO count; see physical versus downstream occupations.
For an exact source with a valid five-orbital selected window and a two-MO occupied vacuum prefix, this optional fragment retains all reference MOs and uses half slabs without changing the integral approximation or ordinary HDF5 output contract:
mppt:
N_select: 5
downstream_nocc: 2
exact_half_block_size: 4
Only the exact half-transform scratch is bounded by exact_half_block_size.
Dense CV-CV staging, other ERI arrays, J/K and final HDF5 storage remain.
Smaller slabs can repeat AO integral passes and slow the dump; they do not
bound all peak disk usage. The width stays explicit, not automatically resized
by the RAM planner. Preflight scratch and destination capacity separately.
The option is incompatible with DF; DF storage is automatic, not selected by
an outcore flag.
For performance, explicitly budget as much molecule.max_memory as the worker
can safely provide, allowing for concurrent work. Omit mppt.max_mem_bytes unless
a separate temporary-buffer cap is needed. A tiny cap can force smaller batches
and more I/O; merely writing a large cap cannot improve on uncapped automatic
workspace. scf.max_memory and casscf.max_memory override
their respective stages and otherwise fall back to the molecule/global value;
they do not replace the dump’s molecule total hint. An explicit buffer cap is
intersected with the remaining automatic workspace. Small caps such as 16 MiB
keep their type and meaning but can be rejected at runtime if they cannot admit
the minimum work. None of these settings enforces process RSS or limits final
dataset size, and caller-owned SCF/DF caches still consume RAM.
An insufficient budget raises ValueError before the affected allocation.
Remove an optional cap only when the remaining total has room; raise the total
hint only when RAM is genuinely available under the host/worker limits.
Admission rejects a 1-MB total already exceeded by the resident process on
either route. Exact full-route automatic transform/reorder choices honor the
checked remaining workspace and explicit cap. The HOCl routing regression uses a
feasible 512-MB total with max_mem_bytes: 16KB, not force flags; native/packing
buffer floors mean this is not a strict 16-KiB allocation limit.
See shared memory units and failure guidance
for diagnostics and Exact Export Internals
for formulas, screening, lifetimes and validation limits. DF’s separate phase
admission and automatic RAM/HDF5 selection are described in
DF Export Internals, not additional user settings.
Changing memory or slab controls preserves the retained MO space, complete Hamiltonian, requested SO/property data and ordinary HDF5 contract. Consumer limits still apply; a successful export is not downstream or production certification. The selected-route contract lists the required outputs and indexing rules. Matched-DF checks establish assembly agreement, not the error of DF relative to exact Coulomb integrals.
CLI --resume validates the saved normalized input and resources. Use a new
--output-dir for changed scientific inputs; resume is not an approximation
switch or a request to repeat a completed export. For a separate export of an
existing completed reference, use the reference API
with an explicit ExportConfig and a new output path.
Accepted MPPT aliases are normalized before strict schema validation:
so_from,so_provider,so->so_source;ao2mo_max_mem_bytes,ao2mo_max_memory_bytes->max_mem_bytes;generate_projected_occupied,generate_occupieds,project_occupieds->generate_projected_occupieds;generate_occupied_from,occupied_from,occupied_start->generate_occupieds_from;generate_occupied_to,occupied_to,occupied_end->generate_occupieds_to;occupied_map,occupied_mapping,orbital_map_occupied->occupied_orbital_map.
Do not provide an alias together with its canonical key. Use canonical keys for deterministic validation.
CIPSIXX: Choose One Growth Policy#
Use multistate selection for a manifold of states, with explicit memory budgets and the normal spin-projection closure. The example below seeds two active electrons in four MOs above four closed MOs. Its target is 4000 determinants after closure. The prepared selected window must contain these indices. The iteration budget of 80 leaves room beyond the default 12 passes.
This is a targeted top-k example: selection_growth: topk declares the mode,
and batch_size: 250 explicitly declares the maximum CI-basis addition per step.
Coefficient ranking stays at its default. Always write the complete growth
recipe: mode plus batch size for top-k, mode plus min_abs_coefficient for
coefficient threshold, and additionally adaptive_threshold: true plus
threshold_multiplier for adaptive threshold. min_new_determinants may keep
its default 100. Keep the recipe fields even when they match software defaults.
See the three separate recipes before choosing fixed
or adaptive threshold growth. Do not combine adaptive threshold with top-k.
mppt:
cipsixx:
enabled: true
initial_space: cas
max_selected: 4000
selection_growth: topk
batch_size: 250
max_iterations: 80
n_roots: 8
multi_state: true
state_weighting: legacy-taum
cas_orbitals: [5, 6, 7, 8]
core_orbitals: [1, 2, 3, 4]
frozen_orbitals: []
cas_electrons: 2
candidate_storage: bounded
candidate_buffer_mib: 4096
candidate_workspace_mib: 256
candidate_output_mib: 512
candidate_scratch_mib: 65536
omp_num_threads: 8
blas_num_threads: 1
selected_root is principally the single-state target, numbered from zero
in ascending energy order. Omit it in ordinary multistate work; it does not
restrict selection to one root there. Its omitted value still identifies the
summary energy and stored CI vector. Omit explicit equal weight lists too.
legacy-taum is the recommended nondefault score normalization, explained in
multistate weights; it needs no root_weights list.
The storage numbers are worker-specific example budgets, not universal values. They total 4.75 GiB of configured RAM payloads plus up to 64 GiB scratch; reserve additional RAM for integrals, determinant space and dense CI. All determinant totals used for targets and comparisons are closure-expanded; log the additions from closure separately. See closure diagnostics.
Stage And Initial Space#
Key |
Default and accepted values |
Runtime effect and interactions |
|---|---|---|
|
|
Enables the selection stage. The HDF5 dump still records cipsixx metadata when selection is disabled. |
|
|
|
|
|
Fixed compatibility identifier. It does not select an alternative algorithm; |
|
|
Required and nonempty for CAS initialization. Defines the active occupation combinations. |
|
|
Doubly occupied in every CAS determinant. Also becomes the frozen-orbital fallback when |
|
|
Prevents listed orbitals from acting as excitation holes or particles. Omission inherits embedded HDF5 configuration, then falls back to core orbitals. |
|
|
Total active CAS electrons. The selector splits an odd total as one more alpha than beta. |
|
|
Active alpha count. Spin-resolved counts must always be provided together. With a total, provide either neither spin count or both. |
|
|
Active beta count. If all three count fields are present, total must equal alpha plus beta. |
|
|
Source group for |
|
|
Override native HF spin counts. Omission inherits the integral dump’s electron counts. These are selected-space counts, not total molecular charge controls. |
|
|
External alpha/beta determinant seed, overriding |
|
|
Group in |
Orbital lists must be positive and duplicate-free. Their upper bounds are checked against the effective selected/full cipsixx orbital space during HDF5 dumping and native selection.
Candidate Generation And Growth#
Key |
Default and accepted values |
Runtime effect and interactions |
|---|---|---|
|
|
Closure-expanded stopping target, not a hard maximum. Zero disables target stopping; null inherits an embedded target, otherwise zero. |
|
|
Caps additions only for targeted |
|
|
Maximum growth iterations. Target reached or stalled growth can stop earlier. |
|
|
Minimum absolute first-order coefficient. It remains a filter when the energy metric is selected; multistate mode compares the weighted score. |
|
|
Minimum absolute second-order energy contribution. It remains a filter when the coefficient metric is selected; multistate mode compares the weighted score. |
|
|
Rejects a root contribution when the absolute perturbative denominator is at or below this value. |
|
|
Retains the highest-scoring candidates after accumulation and filtering. Zero removes the cap; null inherits the embedded value. This is not an accumulation-memory limit. |
|
|
|
|
|
Selects candidate ranking, the winning multistate root, and the threshold adjusted by adaptive mode. Both coefficient and energy filters still apply. |
|
|
Valid only with |
|
|
Multiplies the active threshold during adaptive reduction. Adaptive mode requires a value below one; fixed mode accepts the no-op value one. |
|
|
Lowest adaptive threshold. No reduction occurs if this floor is not below the current threshold. |
|
|
Adaptive reduction is considered after a noninitial iteration adds fewer determinants than this value. Zero is accepted only with adaptive mode disabled. |
With no embedded target and max_selected: null, the workflow passes twelve
iterations, and top-k growth adds every retained candidate because there is no
target budget. Use explicit thresholds, max_candidates, and
max_iterations to bound such a run.
Roots, Scoring, And Export#
Key |
Default and accepted values |
Runtime effect and interactions |
|---|---|---|
|
|
Number of lowest variational roots requested. The current determinant-space dimension can limit the roots actually returned. |
|
|
Root used for single-state selection, reported variational energy, and final stored CI coefficients. HF initialization supports only root zero. |
|
|
Scores candidates from every returned root instead of only |
|
|
Multiplies per-root candidate scores in multistate mode. Nonuniform modes require |
|
|
Required only for |
|
|
Controls target counting, downstream export and, with the closed variational space, every diagonalization. |
|
|
|
|
|
|
Runtime And Reports#
Key |
Default and accepted values |
Runtime effect and interactions |
|---|---|---|
|
|
|
|
|
Override MKL/OpenBLAS/BLIS independently of OpenMP. Use |
|
|
Per-iteration counts, thresholds, energies, and timings. Relative paths resolve from the workflow workdir; null disables the report. |
|
|
Per-root energies for ordinary iterations. It does not include a separate final-rediagonalization row; null disables the report. |
|
|
Final formatted determinant diagnostic; HDF5 remains the downstream handoff. |
|
|
Per-iteration CI basis and spin-completed model-space adapter in |
|
|
Per-iteration formatted diagnostic in |
|
|
Exact pre-generation P/C and scoring inputs in |
|
|
Forward |
Managed diagnostics reside under reports/cipsixx/ and are inventoried for
archiving. Their paths must stay inside the run and avoid other outputs.
Report paths must be nonempty. Diagnostics are not durable checkpoint outputs
and are not regenerated when a valid selection checkpoint is reused.
Candidate Storage Budgets#
Capacities use MiB and bound individual storage components, not total RSS. Integrals, reference vectors, CI matrices and eigensolver workspace remain additional allocations. Hash remains the default; resource budgets control the bounded backend. Integer controls reject Boolean and fractional values.
Key |
Default |
Meaning |
|---|---|---|
|
|
|
|
|
Positive aggregate contribution-record buffers across threads. |
|
|
Positive aggregate reducer/merge workspace. |
|
|
Power of two from 1 to 256. |
|
|
Positive explicit count, or native automatic sizing. |
|
|
Positive limit for store-owned file descriptors. |
|
|
Retained candidate payload budget; zero is unlimited. |
|
|
Scratch quota; zero uses available disk with reserve. |
|
|
Directory created by the launcher; default run-local |
Fixed-Input Replay#
replay_selection names a saved .cipsnap; replay_output defaults to
cipsixx_candidates.h5. These belong to pyscf2mppt replay-selection, which
requires --from-hdf5 and a new --output-dir. Ordinary calculation commands
reject replay_selection. The snapshot supplies scientific scoring inputs;
YAML chooses storage and threading. Replay produces candidates without a DIAGPT
model-space handoff. See the replay command.
Initial-Space Validation#
The initial determinant-space dimension must exceed selected_root. Custom
multistate weighting currently also requires the initial space to provide all
n_roots roots. The schema rejects excited-root and multi-root custom weighting
with HF initialization because HF contains one determinant. For CAS and HDF5
determinant initialization, provide a sufficiently large initial space.
The dump normalizes cipsixx orbital indices to zero-based values. With
N_select > 0, /cipsixx/integrals uses the selected orbital space and carries
orbital_space="selected". With N_select = 0, it uses the complete
post-trim orbital space and carries orbital_space="full". The full route
writes packed full-space ERIs in the required C1 destination ordering. The
selected route uses the compact J/K and pair-packed ERI datasets defined by the
selected-route contract.
DIAGPT And HEFFSO: Keep Numerical Defaults#
Enable the stages, select the required SOC state count and set worker threads. Other overrides normally concern a requested diagnostic, not routine tuning:
mppt:
diagpt:
enabled: true
omp_num_threads: 8
heffso:
enabled: true
nvectw: 16
omp_num_threads: 8
DIAGPT’s scalar state count comes from CIPSIXX, through model-space metat
(the requested n_roots, limited by the exported determinant dimension).
DIAGPT diagonalizes its own scalar Hamiltonians; it does not simply reuse
CIPSIXX root vectors. To request 12 scalar states and 24 SOC states, set
cipsixx.n_roots: 12 and heffso.nvectw: 24. HEFFSO’s count is independent:
doubling is a chosen manifold size, not an automatic rule for every system.
Omit state_weights for equal scalar-state weights. gap and zshift are
active scientific controls, not general convergence knobs: zshift changes
determinant shifts in perturbative denominators; under its applicable branch
gap enforces separation of H0 removal/attachment levels. They may leave a
particular case unchanged, but are not ignored. Keep their defaults unless
changing the zeroth-order model deliberately; see DIAGPT input.
DIAGPT title, when set, must be nonempty and single-line. thrpri and gap
are nonnegative, wmupa is in [0, 1], and state_weights must be
nonnegative with at least one positive value. At execution, an explicit weight
list must contain exactly one value per model-space state. When omitted, the
generated DIAGPT input contains one 1.0 weight per state.
DIAGPT always uses the mandatory repository-pinned PRIMME eigensolver.
Its optional solver controls use the same names as HEFFSO:
DIAGPT setting |
Default |
Meaning |
|---|---|---|
|
|
Positive finite relative PRIMME tolerance |
|
|
Native automatic search-basis capacity |
|
|
Native automatic block size; explicit values are 1–8 |
|
|
PRIMME’s default matrix-vector budget |
|
|
Positive compact-log interval, sampled at outer iterations |
Omit these keys for routine work. Tighten a tolerance only for a stated accuracy requirement checked against returned residuals. It is relative to the solver’s matrix scale, not a guaranteed absolute energy error. PRIMME status and the actual converged-root count decide convergence; nominal residual thresholds are stored as diagnostics rather than checked again by each writer and reader.
DIAGPT’s omp_num_threads sets its OpenMP team, or inherits it when omitted.
The launcher sets OpenBLAS/MKL/BLIS to one thread for this stage; packed matrix
products and diagram loops retain OpenMP parallelism. This separates their
threading from PRIMME’s smaller dense BLAS operations.
DIAGPT prints compact PRIMME logs by default for both CASCI and MPPT2:
starting dimensions and tolerance, progress at roughly 5% root milestones or
after progress_interval_seconds, and the solver return status, root count,
iterations, matrix-vector products, elapsed seconds and maximum residual.
The interval is sampled at outer iterations; a long individual matrix-vector
product can delay the next line. Each line is flushed to the stage log.
Set print_level: 0 to suppress routine PRIMME reporting, or 2 through 5
for PRIMME’s native detailed output. The interval must be a positive integer
and applies to compact level 1. Failures still report their return status
at level 0. A successful PRIMME return line describes the solver call;
later eigenstate validation or MPPT2 work can still fail.
DIAGPT and HEFFSO use one C1 scalar handoff at <prefix>heffso.h5.
Scalar model-state density#
Set mppt.diagpt.model_density: true to export full spin-summed one-particle
density matrices from the final scalar MPPT2 eigenvectors. The native switch is
zrdm1=.true. in &cidinp; the default is false. HEFFSO can remain disabled.
The output is /diagpt_density in the existing <prefix>heffso.h5 handoff.
It contains every retained scalar root and a weighted average, in full spatial
MO order after selected-route remapping. Frozen occupied orbitals are included;
the auxiliary electron at infinity is excluded. thrpri affects text only and
does not truncate density coefficients.
state_weights also supplies the density average, after normalization, applied
to the final energy-ordered roots. This does not track their identities back
to the initial states used to construct multipartitioning. Native znocal and
contracted zcontr modes cannot request this final-state export.
These are bare model-space densities. MPPT2 affects the model coefficients; explicit external-space density corrections are not included. An orbital absent from all model determinants has zero population even if it contributes to the perturbative energy. See the density dataset contract in Outputs.
Diagonal PT2 diagnostics#
Set mppt.diagpt.diagonal_diagnostics: true to explain determinant-diagonal
PT2 corrections. The native equivalent is zdiagnostics=.true. in &cidinp.
The default is false; the option does not change the numerical kernels or
request extra integral contractions.
The log reports each component’s mean, minimum, maximum and the corresponding one-based determinant IDs, plus the common pure-CVCV term and populated H0 energy ranges. All energies are in Hartree. These are determinant statistics, not automatically f/d labels or energy contributions to mixed eigenstates.
Diagram names and physical channels#
Each name below identifies one recorded kernel contribution. For a diagonal
element, bra and ket are the same model determinant. The arrows describe
electron substitutions from that determinant to an intermediate determinant;
the second interaction returns to the starting determinant. Model-space
intermediates are removed by model_space_backplay.
The hole/particle labels refer to DIAGPT’s auxiliary reference vacuum. All indices in the table denote spin orbitals:
Indices |
Occupation relative to the reference and the current determinant |
|---|---|
|
Reference-occupied orbitals that are empty in the current determinant: holes. |
|
Reference-empty orbitals that are occupied in the current determinant: particles. |
|
Reference-occupied orbitals that remain occupied in the current determinant. |
|
Reference-empty orbitals that remain empty in the current determinant. |
These are occupation classes, not fixed core/active/external labels. Each substitution obeys the kernel’s spin, symmetry and occupancy restrictions.
Diagnostic component |
Physical channel and recorded contribution |
|---|---|
|
Double |
|
Double |
|
Single |
|
Single |
|
Double |
|
Double |
|
Double |
|
Single |
|
Double |
|
Double |
|
Single |
|
Double |
|
Double |
|
Exclusion correction for intermediate determinants already in the model space, using their single/double Hamiltonian couplings. |
Here a spectator is an occupied orbital that contributes to a single-substitution
matrix element through a two-electron interaction without itself being replaced.
bubl01_holes and the single-substitution part of a0004_holes together contain
the i → h channel; the particle counterparts similarly share p → a.
The a0004 vectors therefore mix single- and double-substitution terms.
The separate pure_cvcv_hartree attribute contains the common part of a0006:
double substitutions from two core orbitals into two external virtual orbitals
on the selected route. Add this scalar once per determinant. The remainder may
still contain other common contributions.
HDF5 output and interpretation#
After MPPT2, the handoff gains an optional /diagpt_diagnostics group:
Field |
Meaning |
|---|---|
|
Float64 vector of length |
|
Common scalar correction, excluded from |
|
Spin-summed state-average weights in full spatial-MO order. |
|
Actual H0 energies after native options, retaining raw sentinel values. |
|
Integer masks for positive-weight channels; zero-weight sentinels are not physical energies. |
|
Actual shifts in the same determinant order as the matrices. |
The 14 named vectors above use the parent handoff’s determinant
catalog, model-space/determinant hashes and selected orbital remap. H1/H2 and
their scalar envide offsets are already stored in that same file.
integral_source_path, when available, is a path, not an integral checksum;
use the workflow’s input fingerprint for persisted integral identity.
The group carries schema mppt_diagpt_diagonal_v1 and complete=1 after
its data are written. znocal does not build H2 and produces no diagnostic
group. A new normal run recreates the handoff, so an old group is not retained
when diagnostics are disabled. Buffer storage is O(14×ncf+norb); this is not
a measured runtime-overhead guarantee.
Off-diagonal component matrices, weighted excitation-denominator histograms and projector/state-character analysis are not produced by this option. Orbital H0 ranges must not be read as extrema over all actually evaluated excitation denominators.
HEFFSO solver settings#
Null PRIMME sizes are adaptive. guess_space becomes
min(n, max(512, 2*nvectw)), max_basis becomes
min(n, max(nvectw+64, 4*nvectw)), max_block uses at most eight OpenMP
threads, and max_matvecs becomes max(10000, 400*nvectw). The workflow
uses the generated namelist to make YAML solver controls authoritative.
With inherited OpenMP threads, an explicit basis too small for the worst-case
eight-vector adaptive block must also set max_block; this prevents a YAML
configuration from becoming valid or invalid only because the caller’s thread
environment changed.
Explicit max_block cannot exceed nvectw, max_matvecs cannot be smaller
than nvectw, and max_basis must hold nvectw + max_block.
sparse_backend: cuda requires direct_sparse: true.
When oneMKL sparse support is compiled, sparse_backend: auto with
direct_sparse: true is the production default. Set sparse_backend: fortran
with direct_sparse: false to validate the portable Fortran/OpenMP path. Both
backends preserve numerical invariants, although eigenvector signs and bases
within degenerate subspaces may differ.
HEFFSO title, when set, must be nonempty and single-line. nvectw is in
[1, 1000], iorder is 1 or 2, print_level is in [0, 5],
guess_space is nonnegative, and progress_interval_seconds is positive.
Residual and initial-vector tolerances must be finite and positive.
Every integral dump produced by the ordinary YAML workflow writes full-space
intdip and intang tensors in the final MO basis, including dump-only runs
and --stop-after dump. This is independent of heffso.enabled,
heffso.properties, and the separate molecule.so switch. No extra property
export setting is needed.
heffso.properties defaults to true. It controls the HEFFSO namelist setting
properties and requires <prefix>heffso_properties.h5 after prefix normalization. The
artifact uses mppt_heffso_properties_v4 and stores state energies, oscillator
strengths and line strengths, angular values and residuals, and Cartesian
L, S, J = L + S, and dipole matrices. Required groups also store complete
PRIMME diagnostics and signed-int64 final determinant occupations in the minimal
closed-shell-vacuum-relative orbital window. The main state table adds S^2,
J^2, and oscillator strength after dE / cm-1; the angular values use two decimal
places. It defines oscillator strength as the dimensionless electric-dipole
strength from state 1. Set properties: false only to request the four-column
energy table without the HDF5 properties artifact.
Setting properties: false changes HEFFSO reporting, not which property
operators are saved by a new YAML dump. Previously exported HDF5 files are not
updated automatically by this change.
Every primary report starts its bounded result with SOLVER DIAGNOSTICS.
Enabled property reports add ANGULAR PROPERTIES, MAGNETIC PROPERTIES, PROPERTIES VALIDATION, and
PROPERTIES SUMMARY after SPIN-ORBIT STATES. Occupations are written to
<prefix>heffso_occupancy_analysis.log; dominant configuration weights are written to
<prefix>heffso_configuration_analysis.log. Both logs are required regardless
of the properties setting. The primary state table is the sole per-state
energy/oscillator-strength listing; complete line strengths remain in HDF5 and the analysis report.
Complete coefficients are always saved in <prefix>heffso_states.h5, including
with properties disabled. The eigenstate guide describes
the reader and phase convention.
Oscillator strengths and magnetic residuals/response use scientific notation;
energies and angular values use fixed decimal notation. Effective angular values are derived from the retained
HEFFSO-state matrices and do not assign term symbols or multiplets.
configuration_weight_percent is in [0, 100]; the strict threshold is
supplemented by at least the positive configuration_top_n row count.
Interpreting The SOC Spectrum#
Start with energy gaps, dominant configurations and orbital populations, then use S²/J² and parent-state information to characterize mixing. Expectations of angular operators are not exact term assignments or a certificate of a complete multiplet. Bare retained-model populations omit external-space density corrections.
Do not require all nominally degenerate microstates to coincide. MPPT multipartitioning, incomplete selected/retained spaces and physical crystal fields can lift multiplet degeneracies. Keep spin-projection closure and check state balance; inspect raw within-pair Kramers gaps separately from gaps between pairs. Scientific validation defines when a degeneracy is actually required.
For magnetic interpretation, an isolated Kramers-pair g tensor describes its
linear Zeeman response, not the Landé factor of an entire free-ion term.
Missing g can mean failed pair-isolation or time-reversal checks, not zero
magnetism. Magnetization and susceptibility depend on the retained SOC space
and temperature; retain the relevant excited states as well as the lowest pair.
Use pyscf2mppt analyze for analysis of the saved results and the following
magnetic guide for units, applicability and operator-order limits.
Magnetic properties#
Use mppt.heffso.magnetic_properties to request g tensors,
finite-field levels, magnetization and susceptibility.
Magnetic properties use the magnetic-moment operator at zeroth order in the
MPPT perturbation, projected into retained states. heffso.iorder chooses the
CASCI/selected-CI or MPPT2 Hamiltonian; it does not change the operator order.
mppt:
heffso:
enabled: true
magnetic_properties:
fields_tesla: [[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]]
temperatures_kelvin: [2.0, 10.0, 300.0]
susceptibility: true
The block is optional. With heffso.enabled: true and the default
properties: true, omitting it still exports the zero-field magnetic model
and eligible Kramers-pair g values. Fields and temperatures have no implicit
grid. Include [0.0, 0.0, 0.0] explicitly for zero-field thermal response.
Key |
Default |
Meaning and constraints |
|---|---|---|
|
|
Inherit |
|
|
Positive, finite electron-spin factor in the zeroth-order magnetic-moment operator. Use |
|
|
Positive, finite minimum tolerance in hartree for grouping zero-field levels. The effective threshold also includes actual solver residuals; it never changes energies. |
|
|
At most 256 explicit |
|
|
At most 256 finite temperatures, each strictly positive, in kelvin. Requires a nonempty field list. |
|
|
Compute differential dM/dB at each field–temperature point; requires temperatures. |
|
|
Store dense field Hamiltonians as well as field levels; requires fields. Adds storage proportional to the field count times |
Boolean values must be YAML booleans. Numerical values must be numbers, not quoted strings; NaN and infinity are rejected. Unknown keys are rejected.
Choose the requested output#
Request |
Settings inside |
Result |
|---|---|---|
Zero-field model and eligible g |
|
Moment/Zeeman matrices, time-reversal diagnostics and doublet classification |
Field-dependent energies |
|
Levels at each requested field; no thermal response |
Magnetization |
Fields plus |
M at every combination of field and temperature |
Susceptibility |
Fields, temperatures and |
M, the full χ tensor, its principal values and axes |
Disable magnetic work |
|
Other properties remain available; magnetic status is |
The YAML above requests two fields × three temperatures = six response
points. All fields use the same temperature list. A temperature or snapshot
request without fields is invalid, as is a field request with magnetic output
disabled. properties: false cannot be combined with explicitly enabled
magnetic output or a field request.
Changing any magnetic control invalidates the HEFFSO checkpoint; the next
workflow run recomputes that stage. Choose nvectw to retain the relevant
SOC states, including the states above a candidate doublet needed to establish
its isolation. It also controls the state space for thermal response.
See Magnetic Properties for formulas, g eligibility, units and approximation limits, and Ce/Pr/OH examples for complete runnable inputs. The output contract lists stored arrays and status codes.
Stage execution and resource limits#
All downstream stages are opt-in and default to disabled. The complete configuration, HDF5 group ownership, and checkpoint rules are documented in the unified cipsixx workflow.
Thread-count semantics differ by layer. For direct SCF/CASSCF,
omp_num_threads: -1 selects all detected cores, 0 becomes one thread, and a
positive value is capped at the detected core count. For cipsixx, DIAGPT, and
HEFFSO, -1 inherits the caller’s environment, 0 is rejected, and a positive
value sets OMP_NUM_THREADS, MKL_NUM_THREADS, and OPENBLAS_NUM_THREADS.
Selection and DIAGPT fingerprints do not include inherited ambient thread
variables; the HEFFSO fingerprint includes its solver-relevant inherited
OpenMP, MKL, OpenBLAS, and CUDA variables.
Current model-space preflight rejects excitation rank above eight, DIAGPT
ncf > 46340, metat > 1000, or metat > ncf. When HEFFSO is enabled it also
rejects ncf > 35000 and a packed excitation-slot count above 280001.
DIAGPT additionally requires 2*norb + 1 and its packed excitation-slot count
to fit signed 32-bit integers.
Orbital Generation And Projection Analysis (mppt)#
Turn distributed atomic-shell character into a compact, inspectable MPPT orbital window. Deep occupied metal character can be mixed through many ligand MOs; correlating virtual character can be spread through a long tail. Projection constructs the strongest available combinations, places them next to the protected active space and leaves the other directions for perturbative correlation. This often makes a chemically chosen selected window possible without discarding the full orbital basis.
Generation rotates and orders existing MOs. It adds neither basis functions nor electrons and performs no new SCF/CASSCF optimization. The reference density is preserved by rotations inside equally occupied blocks, but later rebuilt MPPT need not be invariant under that change of orbital functions. Inspect the resulting character before attaching shell names to it.
Use mppt.generate_projected_occupieds and
mppt.generate_projected_virtuals to prepare the orbital coefficients used for
export after SCF/CASSCF. Use casscf.avas_labels instead when the goal is
the starting orbital guess for CASSCF. Both can be
enabled in one input; see the complete example.
Goal |
Setting |
When it acts |
|---|---|---|
Prepare a CASSCF orbital guess |
|
Before the CASSCF kernel. |
Prepare/order an occupied MO window |
|
After the chosen SCF/CASSCF result. |
Put projected directions first in a virtual MO tail |
|
After occupied generation, when both are enabled. |
Inspect character without rotating MOs |
|
In orbital-analysis output; see the preview commands below. |
All generation options are opt-in. Labels alone request analysis, not orbital
generation. A reference-basis setting alone does not activate either operation.
Use avas_labels_analysis in new inputs. The historical spelling
avas_labels_analyzis remains a supported alias. Both spellings produce the same
stored settings and run identity; existing checkpoints retain their historical
field name. If both keys are supplied, their values must match.
Orbital Source And Execution Order#
mppt.orbitals selects the coefficient set to prepare and export:
Value |
Orbital source |
|---|---|
|
CASSCF orbitals when CASSCF ran, otherwise SCF orbitals. |
|
SCF orbitals, even if a CASSCF calculation also ran. |
|
CASSCF orbitals; a CASSCF stage is required. |
The fresh-run order is:
SCF -> optional AVAS guess -> CASSCF (if requested)
-> choose mppt.orbitals -> pre-projection analysis
-> occupied generation -> virtual generation -> integral export
Pre-projection analysis is printed when a generation flag is enabled. Generated orbitals are not fed back into the CASSCF calculation that has already completed. MO ranges and mapping targets below are one-based positions in this chosen coefficient set, before dump trimming, ordering and selected-window export.
How Projection Finds Useful Directions#
Let C contain the MOs of the allowed occupied or empty block. Let T be the overlaps of the chosen reference AOs with those working MOs, and Sᵣ the reference-AO overlap matrix. The metric-aware projector in that block is:
The pseudoinverse handles dependent reference functions. Leading eigenvectors maximize target character available inside this MO span; their eigenvalues measure that character. They cannot recover radial/diffuse functions absent from the working basis. Reference AO labels identify projector functions, not automatically pure atomic shells in the final molecular orbitals.
Selected target directions stay fixed. The orthogonal complement is semicanonicalized with one source-density physical Fock operator, shared by occupied and virtual preparation. Its energies order the complement; they do not globally canonicalize targets or erase target–complement couplings.
Choose The Construction Method#
Method |
Selection and order |
Use it when |
|---|---|---|
Per-label projection |
Leading nonzero directions for each top-level label, QR orthogonalization, then Fock complement. Targets first; occupied mapping can place them elsewhere. |
Individual shell labels and explicit occupied positions are the intended recipe. |
Compound per-label projector |
A nested label list is one union; separate top-level entries remain separate projectors. |
Several overlapping labels should define one target subspace. |
Joint threshold |
One deduplicated union; retain all eigenvalues strictly above |
Let measured character determine the number of useful directions. |
Joint fixed count |
Same union, but |
A scientifically chosen count is required; inspect warnings and excluded/included weights. |
Start without expected_count unless the count itself is a deliberate
choice. A threshold-determined count is not known until projection runs.
Inspect it before choosing the fixed N_start/N_select and CIPSIXX lists;
the interface does not derive those downstream settings from the threshold.
Do not silently force counts merely to fit a prewritten selected-window recipe.
AO Labels And Compound Projectors#
Labels are PySCF AO search patterns, interpreted in the reference basis for
their stage. For example, "Fe 3d" matches the 3d components on atoms labelled
Fe; "Fe1 3d" targets that explicit atom label. Use actual AO labels or an
appropriate regular expression; the literal "Fe 3d" does not automatically
match the different label Fe1.
Supply a YAML list, not one comma-separated string. For default per-label generation, each top-level entry defines one projector. A nested list defines the union of its AO matches as one joint projector:
mppt:
avas_labels_analysis: ["Fe 3d", "O 2p"]
avas_labels_virtual:
- "Fe 4d"
- ["O 2p", "Fe 4p"]
The two entries of avas_labels_virtual above are separate target subspaces.
Within the second entry, repeated AO matches are counted once. Avoid repeating
or overlapping entries unnecessarily: the generation count sums the matched
AO counts of the top-level entries. Repeated placement requests belong in
occupied_orbital_map, not in duplicated projector labels.
CASSCF AVAS differs in this detail: it uses the union of all requested labels for its initial-guess selection. See CASSCF AVAS initialization.
A numeric prefix inside an AO pattern, such as "0 O 2p", is a PySCF
zero-based atom index. It is not one of the one-based MO indices used for
generation ranges and mapping.
Occupied Generation And Placement#
The default mode processes each label separately. For threshold selection over the complete union with automatic CAS protection, use the joint mode below.
Enable occupied generation and choose a valid occupied window. This fragment illustrates one oxygen centre in a system with at least five occupied MOs; adapt the labels and positions to your actual orbital table:
mppt:
orbitals: scf
generate_projected_occupieds: true
avas_labels_occupied: ["O 2p"]
avas_basis_occupied:
O: [library, sto-3g]
generate_occupieds_to: 5
occupied_orbital_map:
"O 2p": [3, 4, 5]
Key |
Default |
Meaning |
|---|---|---|
|
|
Enables occupied-block preparation. |
|
|
Required projector labels when generation is enabled. |
|
|
Reference AO basis for generation, placement weights and occupied-label diagnostics. |
|
|
First included MO, one-based. |
|
Occupied SCF MO count |
Last included MO, one-based and inclusive. |
|
|
Optional placement of high-weight orbitals at specified absolute MO positions. |
Explicit occupied bounds must be positive, with the upper bound no smaller than the lower bound; these input checks also apply when generation is disabled. The upper occupied bound cannot exceed the source doubly occupied inactive block. Active and singly occupied orbitals are protected automatically. Columns outside the selected window remain untouched.
The generator retains projected targets and resolves the complement with Fock:
For each label, diagonalize its reference-AO projector inside the requested occupied window and take the leading contributing directions.
Orthogonalize the collected directions with QR and complete the basis inside the same occupied span. Diagonalize the fixed physical Fock in the complement only. Projected directions come first, then the energy-ordered complement.
Apply the optional placement mapping without mixing target directions.
This rotates existing MOs; it neither runs a new SCF nor adds electrons or orbitals. For a window of equally occupied orbitals, the density and reference energy are preserved. Range checks enforce doubly occupied/empty partitions and preserve the active block. Targets are generally noncanonical. Projection quality still depends on the reference functions, their overlap with the chosen window, and orthogonalization between target subspaces; pure atomic orbitals are not guaranteed.
For each mapping entry, the code chooses the largest reference-projector weight among the still-unused orbitals in the window and places that orbital at the requested target. It then fills the remaining positions. Check the printed mapping weights: placement does not guarantee a large overlap, and there is no minimum-overlap acceptance test for the mapping itself.
Mappings accept a scalar target, a list of targets, or explicit repeated pairs:
mppt:
occupied_orbital_map:
- ["O 2p", 3]
- ["O 2p", 4]
- ["O 2p", 5]
Targets must be unique and inside the selected occupied range. Do not repeat dictionary keys in YAML to express multiple targets. The printed occupied Fock diagonal contains expectation values in final mapped order, not eigenvalues. The source-density physical Fock defines the complement energy basis and its final-order diagnostics; source orbital energies are not used to reconstruct it; see diagnostic energy semantics.
Ce Example: Place 5s/5p Immediately Before The Virtual Block#
Consider a Ce-centred closed-shell reference with 750 MOs, 234 electrons and
117 doubly occupied MOs. Ce5s/5p character may lie deep among the occupied MOs
while the highest occupied MOs are ligand-like. Project over all 1..117, not
just the last few occupied columns, to collect that character.
This fragment belongs in an otherwise complete input for that reference. It assumes one Ce centre and AO labels matching one 5s and three 5p functions; inspect the actual labels, ranks and projection weights for your basis:
mppt:
orbitals: scf
generate_projected_occupieds: true
avas_labels_occupied: ["Ce 5s", "Ce 5p"]
# Omitted avas_basis_occupied uses the working AO basis.
occupied_orbital_map:
"Ce 5s": 114
"Ce 5p": [115, 116, 117]
The intended placement, when all four target directions are available, is:
Final MO columns |
Role |
|---|---|
|
Remaining occupied orbitals |
|
Projected Ce5s-like occupied orbital |
|
Three projected Ce5p-like occupied orbitals |
|
Virtual block, unchanged by occupied generation |
“Immediately before the LUMO” means column placement, not raising the
energies of deep occupied orbitals to the HOMO. These settings preserve the
234-electron reference; adding an electron for a Ce3+ target is a separate step.
An AO shell label alone does not establish physical radial character; use
avas_basis_occupied for suitable independent reference functions when needed.
If a separate virtual preparation puts the 16 desired 4f/5d/6s/6p directions in
118..133, a later N_start: 114, N_select: 20 selects the combined window.
Occupied generation alone does not prepare or validate those virtual orbitals.
Export integrals consistently for the final MO coefficients and selected window;
changing indices in an existing integral file is not a substitute.
Virtual Generation And Its Starting Index#
Both per-label and joint generation start at the first empty MO after the source inactive and active blocks, unless a later starting index is supplied.
Enable virtual generation with target AO labels. The following fragment uses an oxygen reference basis for a chosen correlating p subspace:
mppt:
generate_projected_virtuals: true
avas_labels_virtual: ["O 3p"]
avas_basis_virtual:
O: [library, cc-pvdz]
Key |
Default |
Meaning |
|---|---|---|
|
|
Enables rotation of the selected MO tail. |
|
|
Required target labels when generation is enabled. |
|
|
Reference AO basis for virtual construction and virtual-label diagnostics. |
|
Automatic, as defined below |
First MO in the rotated tail, one-based; all earlier columns are preserved. |
For each label entry, the largest projector-eigenvalue directions are placed first, followed by the Fock eigenbasis of the orthogonal complement. The total number of MOs does not change. Reference functions select directions available in the working MO span; they cannot add missing diffuse or correlating functions to the calculation basis.
The automatic start uses the source density’s protected occupied/active boundary:
Selected orbital source |
Automatic first rotated MO |
|---|---|
SCF |
|
CASSCF |
|
Here nocc_scf counts occupied SCF columns, including singly occupied orbitals;
ncas is the actual source active-space size. Set generate_virtuals_from
explicitly to preserve additional empty columns before generation.
Important: an explicit start inside an occupied/active block is rejected.
Leave at least one retained empty MO. Columns beginning at delete_from are
excluded from generation and remain unchanged.
The complete tail is rotated; this path has no functional end-index/count
control. generate_virtuals_count is currently accepted by the schema but is
not consumed by the generation implementation, so it is not an effective cap.
Projector Counts And Numerical Rank#
Default per-label generation checks the sum of matched reference AO counts against the occupied-window or virtual-tail size before rank filtering. A label can match several atoms and several functions, so a small number of label strings does not necessarily request a small number of orbitals.
Within each target subspace, only directions with projector eigenvalues above
1e-10 are selected. The log reports expected, rank and picked; fewer
directions may survive than the AO count suggests. With no contributing
targets, the entire allowed block is resolved in the Fock eigenbasis.
The diagnostic eigenvalue
grouping tolerance is 1e-6; these are internal defaults, not YAML controls.
Overlapping target subspaces need not supply independent directions. Use a
compound label for an intended joint subspace and inspect the final weights.
N_select selects the later exported model window; it does not replace the
generation-range settings. delete_from protects the discarded tail from generation.
Joint Generation With A Character Threshold And Optional Count#
Set occupied_joint_projection or virtual_joint_projection to select
directions of one combined target projector. Each control requires
orbital_character_threshold in [0, 1) and optionally accepts expected_count.
A value of 0.02 means 2% target character. Enable the
corresponding generator as well. Omitting the joint control keeps the default
per-label behavior described above.
This RuO2 preparation fragment assumes an existing CAS(4,9) with 14 closed MOs and supplied reference files matching the indicated physical shells:
mppt:
generate_projected_occupieds: true
avas_labels_occupied: ["Ru 4d", "Ru 5s", "Ru 5p", "O 2p"]
avas_basis_occupied:
Ru: [file, resources/Ru_HF_reference.basis]
O: [library, ano-rcc]
occupied_joint_projection:
orbital_character_threshold: 0.02
expected_count: 10
generate_projected_virtuals: true
avas_labels_virtual: ["Ru 5s", "Ru 5p"]
avas_basis_virtual:
Ru: [file, resources/Ru_HF_reference.basis]
O: [library, ano-rcc]
virtual_joint_projection:
orbital_character_threshold: 0.02
expected_count: 4
N_start: 5
N_select: 23
downstream_nocc: 16
The working molecular basis and the reference bases must be supplied with the complete molecular input. The threshold alone does not define atomic radial functions. This fragment prepares orbitals after CASSCF; it does not request a new CAS optimization or choose CIPSIXX frozen orbitals.
Algorithm and order. All simple and nested labels are flattened into a
deduplicated AO union. The code diagonalizes its metric-aware projector once
inside each requested MO partition. Without expected_count, directions with
eigenvalues strictly greater than the character threshold are selected.
With expected_count, exactly that many highest-weight directions are selected.
Reference AO count may exceed the partition size.
Every direction is retained. In the closed block, the complement comes first and selected directions last. In the virtual block, selected directions come first. Targets retain decreasing projector order; the complement is sorted by ascending eigenvalues of its restricted Fock. With the counts above this gives closed complement MO1–4, selected closed MO5–14, unchanged CAS MO15–23 and selected virtual MO24–27. The chosen window therefore contains 23 spatial orbitals and 24 electrons.
CAS and density protection. Joint occupied generation defaults to the
CASSCF inactive count, and virtual generation starts after inactive plus active
orbitals. Explicit ranges may narrow these partitions but cannot enter the
active block. Selected occupied columns must have population two; virtual
columns must have population zero. Joint occupied mode rejects
occupied_orbital_map because its placement is already fixed. For open-shell
SCF sources, choose a closed-only range explicitly.
Count adjustment. expected_count fixes the final selected count. If fewer
directions pass the character threshold, the next-highest weights are included;
if more pass, only the highest requested number remain selected. Either mismatch
emits a warning and preparation continues. For expected_count: 10:
Nine pass 2% and the tenth has weight 0.005 (0.5%): include the tenth and warn.
Eleven pass 2%: select the top ten and warn that one passing direction is excluded.
Ten pass 2%: select them without a mismatch warning.
The count must lie between zero and the partition size; requesting more columns
than exist is an error. A requested count can include zero-character directions.
At tied eigenvalues the count still wins, although the particular directions
inside the tied subspace are not unique. This is rank selection, not a scalar
cutoff that includes all ties. N_start, N_select and downstream frozen lists
remain separately configured. Every unselected MO remains in the complement.
Physical energy basis. One fixed hcore + J[D] - K[D]/2 operator uses the
complete source spin-summed density and the source exact/DF provider. Both
generators use it without an energy-window setting or complement-mode switch.
Do not replace it with source orbital-energy metadata or a captured KS/ROHF
effective operator. Couplings between targets and complement remain in the
exported operators; only the complement-complement block is diagonalized.
Saved evidence. HDF5 dataset /mppt/orbital_reports_schema_version is 2.
Group /mppt/orbital_generation has a scalar count dataset and numbered
report subgroups, starting at 0. Each joint_projector_fock_v1 report contains the
orbital_character_threshold, threshold_count before count adjustment,
expected count, labels, reference AO indices/basis description,
complete descending projector eigenvalues, input bounds and final selected MO positions,
the fixed Fock SHA256 and ascending complement eigenvalues in Hartree.
Orbital-sized vectors (eigenvalues, selected_orbitals, reference_indices,
complement_energies_hartree) and UTF-8 labels are separate datasets.
Only scalar metadata is JSON, in a scalar UTF-8 metadata_json dataset.
Positions refer to the full untrimmed orbitals. SHA256 values fingerprint the
source coefficient block, union metric and reference-to-block overlaps as
little-endian C-order float64 arrays. Orbital checkpoints preserve these reports
when export resumes. The selected count is the length of selected_orbitals;
comparing it with threshold_count exposes the adjustment. Logs show counts
and positions, not vector coefficients. /mppt/orbital_preparation separately
binds the source density/operator, recipe and final MO frame and stores final
Fock expectations. Checkpoint reuse requires that identity; unidentified prepared
arrays or changed generation settings are rejected before export.
The Fock vector is stored only once, as fock_expectations_hartree, not in JSON.
NPZ checkpoints use the same named numerical arrays. Regenerate orbital evidence
from source SCF/CASSCF checkpoints after the JSON-vector format change; no old
prepared-report fallback is retained. Oversized ineffective deletion cutoffs are
normalized consistently for preparation, resume and inspection. See the complete
storage layout and resource bounds.
Eigenvector signs and bases within exactly degenerate spectral subspaces are not unique. Compare selected subspaces when reproducing generation; a rotation within a degenerate subspace can matter if its individual orbitals are later treated differently by multipartitioning or freezing.
Independent AVAS Reference Bases#
The three independent settings share one format:
Setting |
Reference functions used for |
|---|---|
|
|
|
Occupied generation, mapping and occupied-label analysis |
|
Virtual generation and virtual-label analysis |
casscf:
avas_basis:
Fe: [library, def2-svp]
mppt:
avas_basis_occupied:
Fe: [library, sto-3g]
avas_basis_virtual:
Fe: [file, ./Fe_projectors.dat]
Fe1: [file, ./Fe1_projectors.dat]
Each value is a map from an element or full atom label to [library, name]
or [file, path]. Use the exact lowercase source tokens. A full atom-label
override takes precedence over the element entry; unspecified atoms inherit
the working basis. Every override key must match an atom label or element
present in the molecule. Files use the chemical element in their basis
headers: an Fe1 override loads iron functions from an Fe section.
Omission, null, or {} all select the working basis and preserve the old
normalized input identity. These settings accept maps, not a bare basis-name
string. They are independent of the top-level orbital basis and of
density-fitting auxbasis, and do not activate
AVAS/generation by themselves.
The reference may have a different AO count from the calculation. Projection uses reference/reference and reference/working overlaps, with a pseudoinverse for dependent reference functions. The working molecule and its Hamiltonian are not replaced by a new reference-basis SCF calculation.
Reference molecules retain geometry, ECP/effective-charge core offsets and Cartesian/spherical representation. For ECP/GRPP work, use appropriate reference functions and inspect their actual AO labels: there is no automatic conversion of an arbitrary all-electron basis into a valence-only reference, and a matching shell label alone does not establish the intended radial character.
Direct runs resolve files from the runtime work directory. Managed runs resolve
them from the source YAML, capture immutable copies and include their contents
in run identity. Declare custom resources with file; library entries are
not copied or content-hashed as external files. See
preview and restart rules.
Reading The Diagnostics#
Output |
How to interpret it |
|---|---|
|
Reference basis and selection information for the CASSCF guess, before orbital optimization. |
|
Snapshot of the chosen SCF/CASSCF coefficients before occupied/virtual generation. |
|
Actual reference basis used by that generator and its weights. |
|
Matched reference AO count, contributing projector rank, and selected directions. These are not correlated-state degeneracies. |
Occupied mapping lines |
Chosen source orbital, requested target position and its reference-projector weight. |
|
Expectations in final mapped order, in Hartree, printed ten columns per row. They need not be sorted; the final orbitals need not diagonalize Fock. |
Occupied Fock-trace / HF-energy consistency checks |
When available, check conservation under the occupied-space rotation; they do not certify orbital purity or CASSCF convergence. |
Final/inspection projection tables |
Per-MO weights for the current coefficients, using each label set’s reference basis. |
avas_labels_analysis uses working AOs. Occupied and virtual label sets use
their own configured projectors even when their generation flag is disabled.
Labels are deduplicated by label and reference basis; the same AO label
with two bases therefore produces separate, basis-labelled columns.
A projector weight describes overlap with a reference subspace, not an electron population. For normalized MOs it lies between zero and one up to numerical error, but weights for overlapping label subspaces need not sum to one. Mulliken character, projector eigenvalues and per-MO projection weights are different diagnostics.
Text tables round weights to two decimal places and normally leave values
below 0.01 blank; a blank is not proof of zero overlap. A completed dump
stores raw final weights in /mppt/orbital_analysis/projection_weight, with
reference descriptions in label_display and optional per-label
projection_basis_spec_json. See orbital-analysis output.
Source MO energies printed after rotations are metadata, not a claim that the final MOs are canonical eigenvectors with those energies. The HDF5 group also stores the final-basis Fock diagonal and the dump’s orbital-index mapping.
Complete Example: CASSCF AVAS And Both Generators#
Save this as avas-lih.yaml. It uses only library bases and demonstrates the
three stages on a small molecule; it is not a recommended active space for
an unrelated chemical system.
# Complete example: AVAS and orbital generation
molecule:
atoms:
- [Li, 0.0, 0.0, 0.0]
- [H, 0.0, 0.0, 3.0]
units: bohr
max_memory: 512.0
basis:
Li: [library, 6-31g]
H: [library, 6-31g]
scf:
spin: 1
density_fit: true
omp_num_threads: 1
casscf:
active_orbitals: 2
n_active_electrons: 2
density_fit: true
avas_labels: ["Li 2s", "H 1s"]
avas_basis:
Li: [library, sto-3g]
H: [library, sto-3g]
omp_num_threads: 1
runtime_projections:
labels: ["Li 1s", "Li 2s", "Li 2p", "H 1s"]
mppt:
N_select: 5
downstream_nocc: 2
avas_labels_analysis: ["Li 1s", "Li 2s", "H 1s"]
generate_projected_occupieds: true
avas_labels_occupied: ["Li 1s"]
avas_basis_occupied:
Li: [library, sto-3g]
generate_projected_virtuals: true
avas_labels_virtual: ["H 1s"]
avas_basis_virtual:
H: [library, sto-3g]
LiH has one doubly occupied inactive MO, followed by two CAS(2,2) active MOs.
The automatic occupied range 1..1 and virtual start 4 protect both active
columns. The selected window deliberately contains MO1–5, with a two-MO
downstream vacuum prefix. One thread and 512 MB are small-example budgets.
The preview command below stops before export; resuming the same input can
later write integrals in the prepared basis.
Preview, Errors And Restart#
Inspect the resulting orbitals without a two-electron integral dump:
pyscf2mppt avas-lih.yaml --output-dir runs/avas-lih --stop-after orbitals
pyscf2mppt --inspect-checkpoint runs/avas-lih/checkpoints
The first command runs SCF, requested CASSCF and enabled generators. The second
reconstructs the saved state and prints final orbital tables without rerunning
those kernels or the full integral dump. It is also useful for analysis-only
label sets: no_dump: true by itself does not print a final analysis table
when no generation flag requests the pre-projection snapshot.
Read the final MO positions and weights, the selected projector spectrum and
complement energies together. Then use --resume with this same input/run to
export. A revised window or projection recipe is a changed scientific input;
choose a new managed run or the supported completed-reference API rather than
editing an existing integral file’s indices.
Symptom |
Check / action |
|---|---|
AO label not found |
Inspect actual reference AO labels, atom tags, basis content and ECP core offsets. |
Requested AO count exceeds the block size |
Narrow the labels, combine overlapping labels where appropriate, or choose a larger valid block. |
No virtuals remain |
Check the chosen MO source and automatic start; specify |
Mapping does not show the desired character |
Check its printed weights and the selected occupied window; mapping only orders available orbitals. |
AVAS dimensions differ from the requested CAS |
Review the labels/reference basis and explicitly requested counts; the warning does not resize CASSCF. |
Prepared-orbital recipe mismatch |
Resume from source SCF/CASSCF data or start a fresh calculation for changed generation settings. |
Prepared-orbital checkpoints bind generation settings and projector-file hashes
to the final MO frame. This does not replace complete managed-run resource and
software provenance. --force-workflow reruns downstream
stages, not SCF/CASSCF orbital preparation; --from-hdf5 does not reconstruct
AVAS or regenerate MOs. See CLI restart semantics.
Python Entry Points#
For a program that already owns mol, mf and the current mol_orb, the
occupied helper accepts the same reference-basis concept:
from pyscf2mppt.orbitals import construct_occupied_via_projections
density = mf.make_rdm1()
j, k = mf.get_jk(dm=density)
physical_fock = mf.get_hcore() + j - 0.5 * k
mol_orb = construct_occupied_via_projections(
mol=mol,
mo_coeff=mol_orb,
labels=["Ce 4p"],
start_orbital=10,
end_orbital=18,
mo_energy=mf.mo_energy,
fock_ao=physical_fock,
mo_occ=mf.mo_occ,
orbital_map={"Ce 4p": [12, 13, 14]},
basis={"Ce": ("file", "./Ce_projectors.dat")},
scf_obj=mf,
)
This is a fragment for an existing matching molecule and valid occupied
range. Python resource specifications use tuples; use absolute paths or
paths relative to the process work directory. Mapping can also use
{"Label": 12} or [("Label", 12), ("Label", 13)].
The corresponding entry points are
construct_virtuals_via_pure_ao_projections(..., fock_ao=physical_fock, basis=...) and
avas_from_labels(..., basis=...) (the latter is exported from pyscf2mppt).
Their Python arguments expose algorithm controls that the YAML runner keeps
fixed. For an external-reference export, ExportConfig.avas_basis_*
controls diagnostics only; see external PySCF references.
CLI Runtime And Checkpoints#
Run a YAML input directly:
pyscf2mppt input.yaml
Checkpoint and resume long calculations:
pyscf2mppt input.yaml --output-dir runs/calculation --stop-after scf
pyscf2mppt input.yaml --output-dir runs/calculation --resume
Inspect a checkpoint without running the full integral dump:
pyscf2mppt --inspect-checkpoint runs/calculation/checkpoints > inspect.out
Run only enabled downstream stages from any existing compatible HDF5 dump:
pyscf2mppt workflow.yaml --from-hdf5 checkpoints/calculation.h5
Matching completed stages are reused from
/mppt/workflow/stages. Use --force-workflow to rerun enabled stages.
Executable paths may be supplied with --selection-executable,
--diagpt-executable, and --heffso-executable.
The explicit --from-hdf5 path is authoritative; mppt.output_hdf5 in a
workflow-only file does not select the input. Top-level keys other than mppt
and unknown keys directly under mppt are currently ignored in this mode.
Nested downstream sections remain strict. The explicit HDF5 is a writable
reference, validated even when all downstream stages are disabled. A fresh
output directory is created for logs and results; the large input is copied
only when an archive is explicitly requested.
--from-hdf5 cannot be combined with --stop-after. Use --resume to continue
the same downstream run directory.
Supported --stop-after stages are:
input_normalizedscfcasscforbitalsdump
An SCF stage recorded as completed is restored without constructing another
initial guess, reading its starting-guess resource, or rerunning the SCF kernel.
This also applies to a saved unconverged SCF result: stage completion does not
mean convergence. Changing scf.initial_guess rejects incompatible managed
resume. To try another guess, start a fresh output directory. Resume enforces
input and resource identity.
The supplied YAML must still exist and pass parsing before resume validates the saved input/resource identity. Pre-dump checkpoints can continue; dump-complete reuse also requires the accepted HDF5 identity. The complete option, inspection, executable-resolution and restart semantics are in the CLI reference.
CLI runs default to runs/<input-stem>/ or use --output-dir. Relative resources
resolve from the source YAML; generated outputs are grouped into data/,
reports/, logs/ and checkpoints/. run.log captures the full pipeline.
The low-level Python run_from_yaml(workdir=...) API retains explicit checkpoint
control. Its resources and stage outputs use the supplied workdir, while a
relative dump path is resolved by the writer from the caller’s process directory.
Prefer an explicit absolute dump path for that API.
Integral dump from an existing PySCF object#
The library API remains independent of the YAML runner. Adapt a completed SCF or CASSCF object into validated reference data, then export it through the same HDF5 path used by full-YAML calculations:
from pathlib import Path
from pyscf2mppt import ExportConfig, dump_reference, reference_from_scf
# mf must already be converged; the adapter snapshots its final reference data.
reference = reference_from_scf(mf)
# Write integrals to HDF5 before starting any downstream MPPT stages.
dump_reference(
reference,
ExportConfig(output_path=Path("checkpoints/scf_integrals.h5")),
)
The adapter captures the public final get_hcore() result exactly once; an
explicit hcore_ao override causes zero calls. See
external PySCF references for CASSCF, explicit
property operators, validation, overwrite behavior, and downstream HDF5 reuse.