Hello,
As a specific example, consider simulating G(r) using a single frame of an MD trajectory using diffpy.srreal.pdfcalculator.DebyePDFCalculator. Below I attach four such simulations, each using the same coordinates from a single frame (~34 angstrom box, containing ~4000 atoms).
The first simulation (top to bottom) includes the periodic boundary conditions from the MD as a diffpy.structure.Lattice, and calculates G(r) out to rmax = 20. The next is an identical calculation, but with the lattice removed. The third is the same as the first simulation, but rmax is extended to sqrt(3)*a, where a is the MD box size (i.e., rmax is extended to the longest distance in the box). The final simulation is the same, but without the lattice.
The (obvious) issue, immediately clear in the first three simulations, is the massive oscillatory background, which looks like a damped sine wave. The phase, but perhaps not the frequency, of the oscillation seems to depend on rmax. When the calculation is extended to rmax =~ dimensions of the MD frame, AND there is no lattice attached to the structure, the oscillations are significantly damped, but not zero, as shown in the expansion of the final red curve.
As far as I can tell from the documentation, the Debye calculator doesn't have any provisions for periodic boundary conditions, yet clearly the presence of a lattice has some effect on the calculation. At the same time, it seems to me that even in the ansatz of the Debye calculator (i.e. reciprocal space calculation), one could take into account pbc to properly take into account the scattering from atoms near the boundaries of the frame.
Can anyone explain the behavior of the Debye calculator here/suggest a more appropriate way to go about simulating PDFs from MD trajectories?
Best,
Nik