Summary
Add a histogram-based Debye evaluation method (binned interatomic distances → I(q) = Σ_r h(r) sin(qr)/(qr)) to complement the current exact O(N²) direct pair sum, with an optional periodic (minimum-image) mode. This is the approach used by AUSAXS, gmx scattering, and debyer.
A single addition that ties several threads together: fast Debye, a clean PBC Debye path, AUSAXS-style partial-histogram fitting, and cheap trajectory accumulation.
Motivation / benefits
- Speed — histogram the pairwise distances once, then evaluate any q-grid cheaply:
O(N_bins · N_q) vs the direct sum's O(N² · N_q). Optional Monte-Carlo pair sampling (gmx-style coverage) gives an O(N) approximate path for large systems.
- Periodicity (the main point) — the histogram is the natural home for minimum-image (MIC) distances: MIC pair distances drop straight into the bins. This gives a general condensed/periodic Debye path:
- monatomic fluid/solid and molecular fluids (cross-boundary correlations via nearest image; intramolecular distances recovered for molecules < L/2 with no connectivity),
- dilute solute (reduces to the isolated-molecule profile),
- optional continuum cut-off correction (debyer-style) for
r_c < L/2: subtract (4π ρ / q³)(q r_c cos q r_c − sin q r_c) (+ optional sinc/Lorch damping) — important for low-q S(q) of condensed systems, negligible for dilute solutes. Beware double-counting against the excluded-volume model, which already subtracts a homogeneous bulk.
- Fitting — partial histograms by form-factor-type pair (atom–atom, atom–water, water–water; cf. AUSAXS) recombine over the fit knobs
c1/c2 cheaply — the Debye analogue of the cached MultipoleModel.
- Trajectories — per-frame histograms are additive, so
⟨I(q)⟩ over an ensemble is one accumulation + one transform (debyer's multi-frame trick), efficient for long trajectories.
Cost / caveats
- Binning trades the direct sum's exactness for a discretization error controlled by bin width — mitigate with narrow and/or weighted bins.
- q-dependent form factors require per-(type-pair) histograms (or a q-dependent histogram) to combine correctly.
Scope (suggested)
References
- AUSAXS — Lytje & Pedersen 2025, J Appl Cryst 58, 1332 (partial histograms, weighted bins).
gmx scattering (GROMACS 2024+) — histogram Debye, MIC, Monte-Carlo coverage.
- debyer (M. Wojdyr) — MIC + continuum cut-off correction (+ sinc/Lorch damping) for bulk.
Context: arose from the Acta Cryst D software-paper Periodicity discussion (make-whole vs MIC-Debye vs reciprocal-lattice explicit).
Summary
Add a histogram-based Debye evaluation method (binned interatomic distances →
I(q) = Σ_r h(r) sin(qr)/(qr)) to complement the current exact O(N²) direct pair sum, with an optional periodic (minimum-image) mode. This is the approach used by AUSAXS,gmx scattering, and debyer.A single addition that ties several threads together: fast Debye, a clean PBC Debye path, AUSAXS-style partial-histogram fitting, and cheap trajectory accumulation.
Motivation / benefits
O(N_bins · N_q)vs the direct sum'sO(N² · N_q). Optional Monte-Carlo pair sampling (gmx-stylecoverage) gives anO(N)approximate path for large systems.r_c < L/2: subtract(4π ρ / q³)(q r_c cos q r_c − sin q r_c)(+ optional sinc/Lorch damping) — important for low-qS(q)of condensed systems, negligible for dilute solutes. Beware double-counting against the excluded-volume model, which already subtracts a homogeneous bulk.c1/c2cheaply — the Debye analogue of the cachedMultipoleModel.⟨I(q)⟩over an ensemble is one accumulation + one transform (debyer's multi-frame trick), efficient for long trajectories.Cost / caveats
Scope (suggested)
c1/c2.r_c < L/2) guard/warning.References
gmx scattering(GROMACS 2024+) — histogram Debye, MIC, Monte-Carlo coverage.Context: arose from the Acta Cryst D software-paper Periodicity discussion (make-whole vs MIC-Debye vs reciprocal-lattice explicit).