mag4.pipeline

High-level CIF analysis pipeline (loads structure, prints distance tables, returns crystal + couplings).

Functions

run_cif_analysis(cif_path, element, cutoff)

Print distance / J tables and return (crystal, couplings).

mag4.pipeline.run_cif_analysis(cif_path, element, cutoff, tol=0.01, *, ligand_elements=None, bond_cutoff=2.5, angle_tol=1.0, ll_cutoff=0.0, signed_dihedral=False)[source]

Print distance / J tables and return (crystal, couplings).

couplings is a list of items that can be fed straight into mag4.dimers.find_dimers():

  • Without ligand_elements: [[label, distance], ...] (legacy form, distance is the only discriminator).

  • With ligand_elements set: [[label, distance, fingerprint], ...] where fingerprint is an mag4.geometry.AngleFingerprint carrying the M–L–M bridging geometry — used by find_dimers as a secondary discriminator so that pairs at the same distance but different bridging angles end up in different J shells (J1a, J1b, …).

Return type:

tuple[CrystalData, list]

Parameters: