DIAGPT Manual Input#

The unified Python workflow normally validates HDF5 inputs and generates this namelist. This page is for controlled manual runs.

For ordinary YAML work, enable DIAGPT and set its thread budget. Keep numerical defaults; add diagonal_diagnostics or model_density only for the corresponding analysis. The scalar root count is metat from CIPSIXX’s model-space export, derived from cipsixx.n_roots. Omitted YAML state_weights gives equal weights for all these roots; the native namelist omission rule below is different.

MPPT reconstruction is not generally unitarily invariant. Non-Kramers degeneracies can be lifted; their interpretation also depends on S and applicable L/J completeness and selection convergence. Use the scientific validation rules before comparing MPPT2 spectra across input functions, partitions or selected spaces.

Structure#

DIAGPT reads &cidfil and then scans for &cidinp:

&cidfil prefix='Ce_', &end
Ce scalar states
&cidinp
  zbig=.false.,
  thrpri=0.25,
  wmupa=1.0,
  gap=0.05,
  zshift=.false.,
  zcontr=.false.,
  znocal=.false.,
  zwh0=.true.,
  zrh0=.false.,
  primme_print_level=1,
  paver=1.0,
&end

DIAGPT requires the title line syntactically but does not use it as a scientific input. zbig is normalized to .false. during startup.

Standard Fields#

Field

Meaning

Source default

prefix

Prefix for the optional zeroth-order restart and <prefix>heffso.h5

required for manual files

thrpri

Threshold for displaying model-space determinant labels; eigenvectors are always saved completely in HDF5

0.0

wmupa

Multipartitioning weight: 1 pure MPPT, 0 conventional state-selective partition, intermediate values mixed

1.0

gap

Requested separation of H0 removal/attachment levels in the applicable spectrum-adjustment branch, in Hartree

0.05

zshift

Enable determinant-dependent shifts that place zeroth-order determinant energies inside the weighted-state energy frame

.false.

paver

One state-average weight per model-space state

first state 1, others 0 when omitted

zwh0

Write <prefix>h0.1

.false.

zrh0

Read <prefix>h0.1

.false.

znocal

Build/diagonalize the zeroth-order Hamiltonian and exit before the full PT calculation

.false.

zftfp

Use generalized hole/particle Fock diagonals for denominators

.false.

zforde

Force model-space degeneracy

.false.

zequif

Read orbital-equivalence records after the namelist

.false.

zprt

Enable very verbose diagnostic output

.false.

primme_print_level

0: quiet, 1: compact solver progress, 2–5: native PRIMME detail

1

primme_progress_interval_seconds

Positive interval for compact progress, sampled at outer iterations

60

primme_eps

Positive finite relative PRIMME tolerance for both scalar solves

1.0e-6

primme_max_basis

Explicit search-basis capacity; zero uses automatic sizing

0

primme_max_block

Explicit block size, at most eight; zero uses automatic sizing

0

primme_max_matvecs

Explicit matrix-vector budget; zero uses the PRIMME default

0

zrh0 and zwh0 cannot both be true. Explicit paver values are converted to absolute values and normalized over metat; at least one nonzero weight is therefore required.

H0 Gap And Determinant Shifts#

Both controls are active. With zshift=false, wmupa>0.99, a PT calculation and no forced-degeneracy branch, gap enters the removal/attachment spectrum overlap check. Levels already sufficiently separated are unchanged; otherwise the branch adjusts levels to the requested separation. This is not a lower bound on every evaluated excitation denominator.

zshift=true enables determinant shifts; mixed multipartitioning can also produce scaled shifts with zshift=false. The resulting shift(k) enters diagonal/backplay and off-diagonal denominators. A particular calculation can have zero shifts, but the option is not ignored. Leave both controls at their defaults unless deliberately testing a different zeroth-order construction; inspect the H0/diagonal diagnostics rather than inferring activity from a flag.

Forced Orbital Equivalence Records#

zequif applies only when zrh0=.true. reads a previously written zeroth-order record. When enabled, append the equivalence data immediately after &end:

2
2 5 6
3 7 8 9

The first line is the number of equivalence groups. Each following line gives the group size and then that many 1-based orbital indices; the current reader accepts at most five orbitals per group.

Current limitation: the application loop computes each group’s average hole occupation, particle occupation, removal energy, attachment energy, and Fock diagonal but applies those values only to the final listed orbital. Do not enable zequif for scientific runs until that implementation is corrected.

Zeroth-Order Restart Record#

zwh0=.true. writes one compiler-native unformatted sequential record to <prefix>h0.1; zrh0=.true. reads the same layout:

norb, upper_unshifted_limit, lower_unshifted_limit, record_weight,
(hole_occupation(i), particle_occupation(i), removal_energy_eoip(i),
 attachment_energy_eoea(i), fock_diagonal(i), i=1,norb)

Orbital entries use DIAGPT’s symmetry-sorted record order. Treat this file as a same-build restart rather than a portable interchange format; HDF5 remains the portable model-space and integral contract.

The compiled target-state ceiling is metat <= 1000. DIAGPT allocates CI coefficient storage for the active ncf * metat extent, not for the full compiled ceiling. Inputs above 1000 states fail HDF5 preflight rather than being truncated.

DIAGPT always uses the repository-pinned PRIMME eigensolver. PRIMME is a mandatory CMake dependency, so a binary without it is not produced.

Both scalar solves identify themselves as CASCI or MPPT2 in the PRIMME log. Compact level 1 reports root milestones and elapsed-time progress; start and return summaries include the configured dimensions, tolerance, actual returned root count, iteration/matvec statistics and maximum residual. Output is flushed immediately. Long individual solver operations can delay time-based updates until the next outer-iteration callback.

The reported nominal_limit is diagnostic. A status=0 return is PRIMME’s status, not a statement that subsequent DIAGPT eigenstate validation or the complete calculation has finished. Solver failures are printed even at level 0.

DIAGPT automatically uses a basis of min(ncf, max(4*roots, roots+64)) and blocks of up to eight vectors, capped by the root count and one quarter of the basis size, with a minimum of one. Multiple-vector blocks improve recovery of clustered lowest roots; the cap keeps small full-spectrum problems valid. Sizing is independent of the thread count. Explicit positive capacity settings override the corresponding automatic value; PRIMME rejects incompatible basis/restart dimensions.

The default relative tolerance is 1.0e-6. Use primme_eps=1.0e-10 to retain the previous stricter setting. Relative tolerance is not an absolute energy accuracy; compare tighter solves for the requested observable. Both native solves require PRIMME status zero and its actual complete root count. Stored residuals and nominal limits remain diagnostics, including practical convergence.

Packed-matrix products use an OpenMP reduction with one output vector per thread. This avoids the threaded OpenBLAS DSPMV synchronization regression without allocating a dense matrix; additional workspace scales as ncf * threads. Sixteen logical CPUs need not outperform eight physical cores.

The Python workflow keeps dense BLAS at one thread and lets OpenMP parallelize packed products and diagram loops. This also avoids high-thread-count overhead inside PRIMME’s smaller dense operations. mppt.diagpt.omp_num_threads controls the OpenMP team; an omitted value inherits OMP_NUM_THREADS. For an equivalent manual launch, set OPENBLAS_NUM_THREADS=1, MKL_NUM_THREADS=1, and BLIS_NUM_THREADS=1 alongside the desired OpenMP count.

The determinant-local diagonal kernels a0001, a0002, a0003, a0005, bubl01, bubl02 and bubl03 distribute independent determinants across the OpenMP team. Each worker updates its determinant’s accumulator and reads shared occupation columns without a shared mutable occupation buffer. Kernels that need compact generated-row indices construct that map before the parallel loop. The small-space guard uses parallel execution when ncf >= 4 * omp_get_max_threads(); smaller spaces stay serial to avoid overhead.

No scientific input or HDF5 contract changes. Rebuild DIAGPT to obtain this implementation; setting a larger thread count cannot add it to an older binary. OpenMP coverage is stage-specific: this change does not parallelize H0 or the factorized pure-CVCV kernel, so full utilization throughout a run is not promised.

HDF5 Manual Route#

DIAGPT requires both the model space and all scalar/two-electron integrals in the configured HDF5 file. MPPT_SELECTED chooses between the selected and full HDF5 contracts:

export MPPT_HDF5_FILE=/path/to/calculation.h5
export MPPT_SELECTED=false  # true only for the selected integral contract

diagpt < diagpt.inp > diagpt.log 2> diagpt.err

The file must contain /mppt/model_space/quasi_restricted with a valid content_hash_fnv1a64. With MPPT_SELECTED=true, scalar integrals come from the compact full-labelled J/K slices and the four pair-packed ERI blocks. With MPPT_SELECTED false or unset, DIAGPT loads fock_full_packed and int2e_full, keeps the latter in dense packed bijkl, and serves it through ai(). See the complete selected/full contract.

Odd-electron model spaces carry zion and an auxiliary electron-at-infinity marker in the HDF5 model metadata; no additional YAML flag is required. After full-orbital remapping, this marker is 2*norb+1, outside the physical ERI tables. Indexed diagram caches retain it as a zero-valued placeholder, including when a pair is prepared before the diagram’s symmetry rejection. It does not add a physical orbital or require an extra row in any integral dataset.

Normal outputs are the optional <prefix>h0.1 restart file and the mppt_heffso_handoff_v3 <prefix>heffso.h5 handoff described in the output contract. The handoff stores ordered determinants, metat, and packed CASCI/selected-CI and MPPT2 matrices.