Output
The log
Each SCF iteration is one line. This is terco water.xyz (RHF/def2-SVP,
run against a CPU build):
it E(total) dE RMS(D) |FDS-SDF| fock(s) linalg(s)
1 -75.845437163849 -7.5845E+01 5.5990E-02 3.3350E+00 0.003 0.000
2 -75.926042499268 -8.0605E-02 1.6019E-02 5.8492E-01 0.004 0.000 i
...
9 -75.960983987068 -1.2523E-10 3.4864E-07 5.0742E-06 0.004 0.000
10 -75.960983987078 -9.8197E-12 6.0952E-08 8.6926E-07 0.004 0.000
Column |
Meaning |
|---|---|
|
SCF iteration number |
|
total energy, Eh, this iteration |
|
change in total energy from the previous iteration, Eh ( |
|
change in the density matrix, sqrt(sum ΔD²)/nao (summed over both spins for UHF) |
|FDS-SDF| |
norm of the orthogonalised DIIS commutator Xᵀ(FDS - SDF)X, summed over both spins for UHF ( |
|
wall time this iteration spent in the Fock build |
|
wall time this iteration spent on the generalised eigenproblem/orthogonalisation |
trailing |
this iteration’s Fock build was incremental (from the density difference), the default; absent on the first iteration and whenever a full rebuild ran |
A DFT run (-f <functional>) adds an xc(s) column between fock(s) and
linalg(s) for the XC quadrature’s own wall time.
A DFT run adds a dft: timing breakdown (grid generation, XC
evaluation, VV10) and, with --df, a dfjk: breakdown of the fitted J/K
build (metric Cholesky, the three-centre integrals, the half-transform,
…), each with its own achieved FLOP rate or bandwidth where that is
meaningful. An unrestricted run prints HOMO/LUMO per spin; --rimp2 adds a
RI-MP2 CORRELATION and a TOTAL RI-MP2 ENERGY line and the opposite-/same-spin
components (the MP2 here is always the density-fitted one, and is labelled so);
--riccsd/--riccsd-t add the RI-MP2 and RI-CCSD correlation energies, the
(T) correction and the RI-CCSD and RI-CCSD(T) totals to the energy box (TOTAL ENERGY stays the SCF energy, as with --rimp2; the correlated totals are
TOTAL RI-CCSD ENERGY and TOTAL RI-CCSD(T) ENERGY); --pcm
adds the dielectric solvation energy; --grad prints the Cartesian
gradient per atom (Eh/Bohr) with its RMS and max component.
The SCF converges when dE is below --econv and |FDS-SDF| is below
--gconv; the run then prints a boxed total/SCF energy and HOMO/LUMO, a
SUMMARY block (nuclear repulsion, one- and two-electron energy, and any
XC/solvation/correlation term that applies), and the wall time. The exit
status is 0, or 2 if the SCF did not converge within --iterations.
Step tables
At the performance log level (the default --logger info prints them) the
correlated methods end with a table of timed steps, one row per step: the
device time to completion, the floating-point operations the step executed
(counted from the dimensions of its matrix products, 2 m n k each, batched
calls times their count) and the rate they give, each count with the SI prefix
that keeps it under 1000. RI-MP2 prints rimp2: rows (metric, Cholesky,
three-index integrals, transforms, the K matrix products, the pair sums) and a
total with the work over the whole wall time.
--riccsd and --riccsd-t print the same table with rccsd: rows after the
iteration table:
rccsd: step time (s) work rate
rccsd: integrals 0.004 - -
rccsd: cholesky 0.000 197.57 kFLOP 2.49 GFLOP/s
...
rccsd: tau, intermediates 0.003 3.08 MFLOP 902.91 MFLOP/s
rccsd: W intermediates 0.012 31.01 MFLOP 2.64 GFLOP/s
rccsd: ladder, assembled 0.026 286.71 MFLOP 10.83 GFLOP/s
...
rccsd: total 0.079 396.93 MFLOP 5.06 GFLOP/s rank 0 of 1
rccsd: mean time of an iteration 0.007 s over 11 iterations
The integrals row is the whole build of the fitted blocks; the indented rows
under it (metric, Cholesky, three-index integrals, half transform, B = X L^-T,
the four blocks) are pieces it times itself, so they do not add up to it (the
orbital transforms and the copy of the blocks back to the host are in the first
only). The other rows are the stages of one iteration summed over all of them:
tau and the one-particle intermediates, the W intermediates, the particle
ladder (named for the form that ran, assembled or direct) and its dressing, the
T1 equation, the T2 equation, its three ring terms, DIIS and the energy. A
stage’s work counts its matrix products only; the packs, scatters, denominators
and per-element kernels (and the spherical-basis conversions of the integral
rows) add time but no count, so a row that mixes them (the intermediates, W,
the T1 and T2 equations) shows a rate below the card’s matrix-product rate by
the share of its time those take. The ladder and the ring terms are nearly all
matrix products. Each step is also an NVTX range (rccsd: <name>) in a build
with TERCO_NVTX. The (T) correction reports its own timings. Over several ranks (mpiexec -n N)
the table is rank 0’s own share of the work, not the job’s: the total row ends rank 0's share of N,
the step table gains the three transfer rows
(amplitudes to ranks, ladder wait (idle), ladder to first rank) and the energy box says
ladder and (T) shared by N ranks (Command-line program).
The job’s throughput is in the lines after the table. Each rank’s line ends with the work it counted and its rate over the seconds it computed (the integral build and the iteration stages, not the transfers or the wait), then one line gives the whole job: the work of all ranks over the wall seconds, and the mean per GPU (one rank per GPU):
rccsd: rank 0: ladder d = 1..51 ( 14.8 % of its flops) ...; 1.54 PFLOP at 17.80 TFLOP/s
rccsd: rank 1: ladder d = 52..163 ( 28.4 % of its flops) ...; 1.50 PFLOP at 17.00 TFLOP/s
rccsd: all 4 ranks: 97.011 s wall, 6.10 PFLOP at 62.90 TFLOP/s, 15.73 TFLOP/s per GPU
The (T) does the same: each rank r: M triples, S s line gains , W FLOP at R FLOP/s (its GEMM work over
its own seconds) and all N ranks: S s wall, ... per GPU follows, with the slowest rank’s seconds as the
wall time. The job’s work is the FLOP the hardware executed: what every rank does in full, the
integral build, is counted once per rank, so the total is N times that of the integrals and not the
work of a one-rank run. The counts are the matrix products of each rank’s own step table, as
in the table above.
A symmetric run
With --symmetry (see Command-line program) the log gains four things. The settings
block has a symmetry line saying what was asked
(on (auto, reported in the input frame), a group name, or, when the run
fell back, on (auto), but --df is not supported with symmetry yet: running in C1). Before the first iteration, two lines name the group, the number of
irreps, the dimension of each irrep’s symmetry-adapted basis, and the Fock
build chosen:
symmetry: C2v, 4 irreps, SO dimensions [10, 1, 3, 5]
symmetry: full Fock build (size rule: 3 atoms in 2 orbits)
After the SCF, a summary block (terco water.xyz -b 6-31gs --symmetry on,
CPU build):
symmetry : requested on, detected C2v, used C2v
symmetrisation : largest atom displacement 0.00E+00 Bohr
frame : results are in your INPUT frame (rotated back from the C2v standard frame the SCF ran in)
geometry, input frame, symmetrised (Angstrom)
1 O 0.00000000 0.00000000 0.11730000
2 H 0.00000000 0.75720000 -0.46920000
3 H 0.00000000 -0.75720000 -0.46920000
irrep SO functions occupied orbitals
A1 10 3
A2 1 0
B1 3 1
B2 5 1
orbitals: index irrep energy (Eh) occupation
1 A1 -20.5605076874 2.0
2 A1 -1.3415388911 2.0
3 B2 -0.7065577365 2.0
...
requested,detected,used: what you asked for, the largest Abelian group found, and the group the SCF ran in (a named group may be a subgroup of the detected one).detectedis the Abelian group even for a molecule of higher symmetry, e.g. D2h for benzene.The frame line says which axes every coordinate, the gradient and the orbitals are in. With
on/autoit is your input frame: the geometry printed is your input symmetrised in place, and the largest atom displacement this took is on thesymmetrisationline (below--symmetry-tol). With a named group the results are in the standard frame of the group (centre of nuclear charge at the origin, axes along the group’s), and aNOTE ... STANDARD FRAMEreplaces the frame line;--json’ssymmetry.frame rotationandsymmetry.frame originmap the input to it. Energies, orbital energies, irrep labels, occupations and atomic charges are the same in either frame.The irrep table gives each irrep’s number of symmetry-adapted functions and occupied orbitals (alpha / beta for an unrestricted run).
Each orbital carries its irrep label. A molecule with more than 50 orbitals prints a window around the HOMO instead of all of them.
A run that falls back to C1, or an on/auto run on a molecule with no
symmetry, prints only the settings line and is otherwise as with
--symmetry off. A named group that ends up as C1 prints the symmetry
line followed by no symmetry in the SCF (the group used is C1).
--json
--json <file> writes a summary alongside the log. Every run’s own
settings appear under "input", grouped exactly as in the TOML file
(terco input files) – including values nobody gave, filled in with their
defaults – so the file written back as TOML reruns the same calculation.
terco water.xyz --json water.json (RHF/def2-SVP) writes:
{
"program": "terco",
"version": "0.1.0",
"input": {
"molecule": { "geometry": "water.xyz" },
"basis": {
"main": "def2-svp",
"auxiliary": "cc-pvdz-rifit",
"jk_auxiliary": "def2-universal-jkfit",
"cartesian": false
},
"scf": {
"functional": "hf",
"max_iterations": 100,
"energy_tol": 0.1E-9,
"commutator_tol": 0.10000000000000001E-4,
"screening": 0.99999999999999998E-12,
"incremental": true,
"density_fitted": false,
"convergence": { "diis_size": 10, "adiis": false, "soscf": false }
},
"dft": { "grid": 3, "nlc_grid": 1 },
"correlation": { "method": "none", "frozen_core": -1 },
"driver": { "gradient": false, "hessian": false, "optimize": false }
/* every other [section] in docs/INPUT.md follows, each at its
default, since none was given on this run */
},
"geometry": "water.xyz",
"method": "RHF",
"basis": ".../test/basis_sets/def2-svp.json",
"guess": "sad",
"charge": 0,
"unpaired electrons": 0,
"number of basis functions": 24,
"spherical": true,
"iterations": 10,
"converged": true,
"nuclear repulsion energy": 9.1895337626396856,
"one-electron energy": -123.03292347071759,
"two-electron energy": 37.8824057209996,
"exchange-correlation energy": 0.0,
"scf energy": -75.960983987078308,
"total energy": -75.960983987078308,
"homo energy": -0.49806581316084186,
"lumo energy": 0.17614645009814475
}
Every file has a "status": "ok", "not converged" (the SCF, RI-CCSD or optimisation did not converge; the
exit status is 2) or "error" (the exit status is 1). A run that fails or refuses its input still writes the file when --json was given,
holding "status": "error" and an "error" object with a "code", the "message" and the "stage" it failed in; the
exit status stays 1. The file is the one named by --json file, --json=file or the TOML [output] json; a TOML file
that cannot be parsed has no json path to use, so only a command-line --json gets a file then, and --json with
no file name after it (the next argument starts with --) or with an empty one (--json=) is itself refused without
one. Every real is written at 17 significant digits; a NaN or an infinity is written as the string "NaN",
"Infinity" or "-Infinity" (json-fortran’s default), so the file stays valid JSON but that value is not a number.
"code" is a stable identifier; the "message" is for people:
code |
meaning |
|---|---|
|
an option or value was refused before the run started (the default at stage input) |
|
a failure after the input was accepted that has no more specific code |
|
the command line could not be parsed: an unknown option or a missing value |
|
the TOML input file could not be read or holds an invalid key |
|
no geometry file was given |
|
the charge and –uhf do not fit the molecule’s electron count |
|
–guess names no initial guess |
|
the geometry optimiser failed (not merely unconverged) |
|
the library refused an argument (TRC_ERR_BADARG) |
|
the library or the input check refused a combination that is not implemented |
|
the library call came in the wrong order (TRC_ERR_STATE) |
|
a step that needs a converged SCF found none (TRC_ERR_NOCONV) |
|
any other library error |
|
(T) failed after a converged RI-CCSD, whose energies the file keeps |
"stage" says what the run was doing:
stage |
meaning |
|---|---|
|
reading and checking the command line, the TOML file and the geometry |
|
handing the molecule, basis and settings to the library |
|
the SCF |
|
the RI-MP2 correlation energy, including reading it back after the gradient |
|
RI-CCSD and (T) |
|
the excited states |
|
the analytic gradient |
|
the static polarizability (CPHF/CPKS) |
|
the Hessian and the vibrational analysis |
|
the geometry optimiser, with the SCFs it runs |
|
the population, charge and Fukui analyses |
|
writing the summary and the other output files |
A run with an SCF result adds "orbital energies" and "orbital occupations" ("beta orbital energies" and
"beta orbital occupations" for an unrestricted run), "grid electron count" (Kohn-Sham: what the grid integrated the
density to), and an "scf convergence" object: "converged", "iterations", "final energy change" (the last step that moved the energy, so a second-order run that stopped on a rejected step does not read as 0), "final commutator norm", a "history" of arrays with one entry per iteration ("energy", "energy change" (as in the
table, the first entry is the first energy itself, the loop starting from 0, so a one-iteration run’s "final energy change" is its energy), "density rms change" (the table’s RMS(D): sqrt(sum ΔD²)/nao, summed over both spins for UHF;
-1 on a second-order step; a second-order step that was rejected is a row with "energy change" 0, the energy having
stayed), "commutator norm" (the table’s |FDS-SDF|: sqrt(sum e²) of the orthogonalised commutator
e = Xᵀ(FDS - SDF)X, summed over both spins for UHF, the DIIS error --gconv gates; it is not the AO-basis norm of
FDS - SDF), "accelerator": plain, cdiis, adiis, gdm handover,
gdm or soscf, and the booleans "incremental fock", "level shift", "mom"), and "events" ("gdm steps", "gdm rejected steps", "soscf switch iteration", "level shift dropped", "mom orbitals kept", …). A converged run also
adds "dipole moment", {"vector": [x, y, z], "magnitude": m, "units": "au"}: the nuclei (the effective charge
where an ECP replaces the core, nothing on a ghost atom) minus the electron density times r, origin at (0, 0, 0)
of the frame the geometry is reported in (the input frame, except that an explicit --symmetry group reports the
standard frame), as pyscf’s dip_moment. Both describe the SCF determinant the run ended on, an excited one after
MOM. The vector of a charged molecule depends on that origin. A PCM run gives the solute’s own dipole, without the
apparent surface charges. A basis with an f shell has no dipole integrals yet, and the key is then absent. An
unrestricted run (UHF or UKS) adds "s squared" (the determinant’s <S^2> on the held orbitals, as pyscf’s
spin_square) and "spin multiplicity" (sqrt(4 <S^2> + 1), not an integer when the determinant is
spin-contaminated). --polarizability
adds "polarizability" with the 3x3 "tensor" and the "isotropic" value (atomic units).
A --grad run adds a "gradient" array (and "gradient grid response" for the Kohn-Sham ground-state gradient; not written for RI-MP2, double-hybrid or TDDFT gradients, which have their own switch or none); --rimp2 adds an
"mp2 opposite-spin energy"/"mp2 same-spin energy" pair, their sum "mp2 correlation energy" and
"mp2 total energy" (the SCF energy plus it; a double hybrid adds "pt2 correlation energy", its weighted part, and its
"total energy" is the double-hybrid total);
--riccsd/--riccsd-t add "ri-ccsd converged", "ri-ccsd iterations",
"ri-ccsd frozen core orbitals", "ri-ccsd active occupied", "ri-ccsd virtual orbitals", "ri-ccsd auxiliary functions", "ri-mp2 correlation energy", "ri-ccsd correlation energy", "ri-ccsd t1 diagnostic" and, when the
RI-CCSD converged, "ri-ccsd total energy" (and with (T) "ri-ccsd triples correction" and "ri-ccsd triples total energy"; "total energy" stays the
SCF energy); a (T) that failed after a converged RI-CCSD adds "ri-ccsd triples error"
with the library’s message, in place of the two (T) keys, and the run exits 1, so the file has "status": "error" and
an "error" object (code triples_failed, stage ccsd) next to the RI-CCSD energies; an RI-CCSD that did not converge has "ri-ccsd converged": false
and no totals; the SUMMARY rows show the same quantities under shorter labels that fit the
block (ri-ccsd (t) correction, ri-ccsd(t) total, ri-ccsd frozen core, …);
--tddft adds a "tddft" object ("excitation energies" in Eh and "excitation energies ev", "oscillator strengths", "y norms", "transition dipoles", "dominant hole"/"dominant particle"/"dominant weight" per root, "target root total energy", "candidates open": the Ritz pairs the missed-root check left open, 0 when none), and with --grad the gradient is of that state ("gradient of"); --opt/--hessian add "optimization"/"vibrational" blocks. Keys
whose default is decided from the system (the charge, the guess, …)
appear in "input" only when the run was given one explicitly.
--riccsd --grad adds the gradient keys, with "gradient of": "scf energy + ri-ccsd correlation"; an RI-CCSD that did not converge has none.
"symmetry"
Written when a symmetry request ran and used a group, or when a named group
was requested (an on/auto request that found no symmetry, or fell back to
C1, writes no object). Its keys:
Key |
Written when |
Meaning |
|---|---|---|
|
always |
the request as given ( |
|
always |
the largest Abelian group found |
|
always |
the group the SCF used ( |
|
always |
the largest atom displacement symmetrisation made, Bohr |
|
the group is not C1 |
a sentence saying whether the geometry, gradient and orbitals are in the |
|
same |
3x3 matrix (array of rows), |
|
same |
the centre of nuclear charge, Bohr (the origin of the standard frame) |
|
same |
|
|
same |
irrep names, in the order the labels below index |
|
same |
symmetry-adapted functions per irrep, summing to the number of basis functions |
|
same, after an SCF |
irrep name of each orbital, in energy order ( |
|
same |
object mapping each irrep to its occupied-orbital count (a |
A --grad gradient is in the frame frame names, like geometry.
"build" and "timings"
Every --json ends with two objects. "build" says what the binary is, so
a timing can be filed against the right build: "device" (a GPU build or
the host build), "gpu_arch" (the -gpu=ccNN flag; written for device
builds only, a host build has no such flag), "lmax", "df_lmax" and
"df_lmax_aux" (TERCO_LMAX, TERCO_DF_LMAX, TERCO_DF_LMAX_AUX),
"cart_order" (TERCO_CART_ORDER), "mpi" and "multicore" (booleans),
"compiler", "compiler_version", "build_type" and "commit" (git describe --always --dirty when CMake last configured, "unknown" outside a
git checkout; a later git pull that does not reconfigure leaves it stale).
terco --version prints the same facts on a build: line.
"timings" is in seconds (doubles), except the counts whose key starts with
n_, which are integers. Only the stages the run had are written. The
times are terco’s own timers, the ones the verbose tables print. What stops
each clock: the Fock timer stops after the (synchronous) device kernels and
the copy of the result back have returned; the XC, DF-JK step and RI-MP2 step
tables wait for the device explicitly before they read the clock. The SCF
loop itself has no extra wait added for the timers.
What the numbers cover:
A “Fock build” (
scf.fock_*) is, per iteration: the density transform from the spherical to the Cartesian basis, the J/K build (with--df, the whole DF-JK build, which is whydfjk.totalequalsscf.fock_total), and the fold of the result back. It does not include the XC build, the PCM solve or the linear algebra (Fock assembly, DIIS, diagonalisation), which have their own rows (dft.xc,pcm.*) or none.scf.wallruns from the start of the SCF routine (after the input is validated) to the last iteration and the final transfers of the density and orbitals to the host. It includesscf.setup, the DFT grid, the PCM cavity, every Fock build, XC, linear algebra, and the second-order iterations; it excludes what the CLI does before it (reading the geometry and the basis, building the initial guess) and after it (the gradient, analysis, writing the file).scf.setupis the once-per-geometry part of that: shell pairs, one-electron integrals, the ERI context, the linear algebra set-up. The DFT grid (dft.grid) and the PCM cavity (pcm.setup) are timed separately and are not inscf.setup, though they are inscf.wall.--soscf: the Newton iterations are counted inscf.n_iterations(and the top-level"iterations") but are not Fock builds of the main loop, so they are in neitherscf.n_fock_buildsnorscf.fock_total; only the DIIS iterations before the hand-over are.scf.wallcovers both.Several MPI ranks: the file is written by rank 0 and holds rank 0’s own clocks.
scf.*,dft.*,pcm.*,dfjk.*,rimp2.totalandgradient.totalare therefore rank 0’s wall times (they include any wait for the other ranks inside the timed region).rimp2.step.*is the maximum over the ranks of each step.dfjk.step.*is rank 0’s own.
Key |
Written when |
Meaning |
|---|---|---|
|
always |
wall time from the start of |
|
an SCF ran here |
the whole SCF, see above |
|
same |
once per geometry, see above |
|
same |
SCF iterations, DIIS and second-order, equal to the top-level |
|
same |
Fock builds of the main (DIIS) loop, one per iteration there; the second-order solver’s own are not counted |
|
same |
build 1 alone: it includes one-off device and kernel setup |
|
same |
all |
|
|
mean of builds 2..n, |
|
a functional was given |
the integration grid(s), VV10’s included |
|
same |
semilocal XC over all iterations (VV10 excluded) |
|
the functional has VV10 |
the nonlocal correlation over all iterations |
|
|
the DF-JK Fock builds, equal to |
|
|
the DF-JK step table (metric, Cholesky, three-index integrals, …) as printed, names lower-cased with other characters as |
|
|
cavity, K matrix and nuclear potential, once |
|
|
the charge solve and potential, mean over the iterations |
|
|
the same, summed |
|
|
the RI-MP2 energy step, whole |
|
same |
its step table ( |
|
|
|
--opt, --hessian and --fukui write only total_wall: they run SCFs at
other geometries or charges after the one the run is about, and the library
holds only the last. The groups are nested objects ("scf", "dft",
"dfjk", "pcm", "rimp2", "gradient"); a later method adds its own
group (its stage table) without changing any key above. Example, a
--rimp2 run:
"timings": {
"total_wall": 0.34,
"scf": { "wall": 0.147, "setup": 0.011, "n_iterations": 10, "n_fock_builds": 10,
"fock_first": 0.0116, "fock_total": 0.1335, "fock_mean_after_first": 0.0135 },
"rimp2": { "total": 0.005, "step": { "metric_p_q": 0.0006, "cholesky": 0.0001, "mu_nu_p": 0.0038 } }
}
The library side is the C entry points trc_timing_count and trc_timing
(ABI 1.24), which hand out the same named values one at a time: loop index
from 0 to the count minus one with a name buffer of TRC_TIMING_NAME_MAX
characters. A buffer too short for a name is refused (TRC_ERR_BADARG, and
trc_message says the length needed), never truncated. The rimp2.* entries
belong to the latest trc_run_rimp2 only.