mag4.reports

Pretty-printers for distance tables, J-shell summaries and four-state reports.

Functions

print_inequivalent(groups, element, tol, *)

Tabular dump of the inequivalent J shells.

print_mm_distances(results, element, cutoff, ...)

Tabular dump of all M–M pairs found within cutoff.

print_report(all_configs, unique_groups, ...)

Print (and optionally write) the full four-state analysis report.

mag4.reports.print_mm_distances(results, element, cutoff, structure)[source]

Tabular dump of all M–M pairs found within cutoff.

Return type:

None

mag4.reports.print_inequivalent(groups, element, tol, *, ligand_elements=None, bond_cutoff=2.5, angle_tol=1.0, ll_cutoff=0.0, z_formula_units=1)[source]

Tabular dump of the inequivalent J shells.

The Multip. column gives the number of distinct M–M dimers per primitive cell, taking periodic boundary conditions into account (computed via pymatgen’s Structure.get_neighbors() with canonical (min_idx, max_idx, image) deduplication). A second /f.u. column normalises that by z_formula_units (the number of formula units in the primitive cell, taken from the reduced composition).

When ligand_elements is supplied the shells were produced by mag4.geometry.group_inequivalent_geom(); an extra M-L-M bridge column is shown. Without it, the legacy mag4.io_cif.group_inequivalent() output is printed.

Return type:

None

Parameters:
mag4.reports.print_report(all_configs, unique_groups, atoms, couplings, ref_bath, n_sym_ops, supercell, output_file=None, *, per_config_cells=None, n_supercell_atoms=None, multiplicities=None, config_coefficients=None, ring_coefficients=None, ring_edge=None, spectator_shells=None, spectator_coefficients=None, tr_pairs=None, config_msgs=None)[source]

Print (and optionally write) the full four-state analysis report.

per_config_cells (optional) is a list, one dict per unique config in unique_groups order, with keys cell (6-tuple a,b,c,α,β,γ), n_atoms (int), volume_A3 (float), sg_number (int), sg_symbol (str). When supplied, a one-line cell summary is emitted after each Config #N block so mag4-extract can rescale per-config energies for the four-state formula.

Return type:

None

Parameters: