Interaction#
Interaction evaluates the four-center matrix element after the two
transition fields have been transformed to momentum space. For transition
fields \(\rho_{13}\) and \(\rho_{42}\), QUARTIC2D evaluates the
radial-kernel reduction of
The ordinary constructor evaluates the requested method once. Use
Interaction.converge_parameters() when the interaction itself requires a
recorded refinement study.
- class quartic2d.Interaction(deltas, field1, field2, U_q, *, method='gl4', interpolator='cubic', n=512, bias=-0.5, subdivisions=1, N=1024, h=None)#
Evaluate four-center matrix elements from transformed transition fields.
For transition fields
\[\rho_{13}(\mathbf r)=\phi_1^*(\mathbf r)\phi_3(\mathbf r), \qquad \rho_{42}(\mathbf r)=\phi_4^*(\mathbf r)\phi_2(\mathbf r),\]Interactionevaluates the radial-kernel reduction of\[U_{1234}(\boldsymbol\delta)= \iint d^2\mathbf s\,d^2\mathbf t\, \rho_{13}(\mathbf s) U(|\mathbf s-\mathbf t+\boldsymbol\delta|) \rho_{42}^*(\mathbf t).\]The two fields are supplied as
HarmonicTransformobjects. The ordinary constructor performs one evaluation using explicit numerical parameters.converge_parameters()is the recommended opt-in path when the assembled interaction requires a recorded refinement study.- Parameters:
deltas (array_like, shape (D, 2)) – Cartesian displacement vectors \(\boldsymbol\delta\).
field1 (HarmonicTransform) – Momentum-space harmonic representations of the two transition fields.
field2 (HarmonicTransform) – Momentum-space harmonic representations of the two transition fields.
U_q (callable) – Scalar radial interaction kernel in momentum space. The callable is evaluated at non-negative momentum magnitudes.
method ({'fftlog', 'trapezoid', 'simpson', 'gl4', 'gl8', 'ogata'}, default='gl4') – Numerical method used for the final radial interaction integrals. The methods have different convergence controls; see
converge_parameters()and the numerical-method guide rather than interpreting the method name as an accuracy ranking.interpolator ({'linear', 'cubic', 'pchip'}, default='cubic') – Interpolator used for the sampled momentum-space harmonics.
n (int, default=512) – FFTLog sequence length. Used only for
method='fftlog'.bias (float, default=-0.5) – FFTLog power-law bias. Used only for
method='fftlog'.subdivisions (int, default=1) – Number of equal finite-rule subdivisions per original momentum interval. Used by
trapezoid,simpson,gl4, andgl8.N (int, default=1024) – Ogata node count. Used only for
method='ogata'.h (float or None, optional) – Ogata resolution parameter.
Noneselects the package default for the requestedN.
- Phi_mm#
Angular prefactors for every harmonic pair and displacement.
- Type:
ndarray
- H_mm#
Radial interaction integrals for every harmonic pair and displacement.
- Type:
ndarray
- V_mm#
Harmonic-pair contributions to the final matrix element.
- Type:
ndarray
- V#
Total interaction for each displacement.
- Type:
ndarray, shape (D,)
- convergence#
Calibration record attached when the object is constructed through
InteractionConvergenceResult.interaction().- Type:
InteractionConvergenceResult or None
See also
Interaction.converge_parametersRecommended interaction-level calibration workflow.
InteractionConvergenceResultReusable selected parameters and convergence history.
HarmonicTransformMomentum-space representation of one transition field.
Typical workflow#
interaction = Interaction(deltas, field_13, field_42, U_q)
values = interaction.V
For quantitative production work:
result = Interaction.converge_parameters(
deltas,
field_13,
field_42,
U_q,
rtol=1e-4,
)
if not result.converged:
raise RuntimeError("interaction convergence search did not converge")
fig, axes = result.plot_convergence()
interaction = result.interaction(deltas, field_13, field_42, U_q)
interaction.plot_convergence()
The returned InteractionConvergenceResult stores the selected
parameters and the method-specific search history. It can be serialized,
reused to construct an interaction, and inspected with the convergence plots.
Recommended method#
|
Calibrate the assembled interaction for explicit numerical criteria. |
|
Plot the attached interaction-level convergence record. |
Advanced mutation and low-level convergence#
|
Select the interaction quadrature and recompute |
|
Select the momentum-space interpolator and recompute |
|
Refine the active interaction method at fixed transformed fields. |