Oscillatory background using DebyePDFCalculator

139 views
Skip to first unread message

Niklas Thompson

unread,
Jan 19, 2022, 2:37:04 PM1/19/22
to diffpy-users
Hello,

In relation to my previous question re simulating PDF data from molecular dynamics trajectories (https://groups.google.com/g/diffpy-users/c/UvY6fvaxcmE/m/hs1x5tKTAAAJ), I have encountered another issue when simulating data in reciprocal space.

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
Figure 1-2.png

Peter

unread,
Jan 26, 2022, 11:50:27 PM1/26/22
to diffpy-users
Hello,

I had the same issue, I am also curious to know what is causing this 

I saw this effect only when the Rmax of the DebyeCalculator was set to a value close to the Rmax of the nanoparticle I was calculating the PDF of. I found a simple 'hack' to prevent this is to just set the Rmax of the DebyeCalculator to a much larger value than the Rmax of the particle. 

However, I would like to understand the underlying issue - just to be sure I'm not doing something wrong

Thank you

Niklas Thompson

unread,
Jan 27, 2022, 11:03:35 AM1/27/22
to diffpy-users

Hey Peter--yes, that has been my working solution as well, but I'm a little bothered that I don't understand the origin of the problem!

Simon Billinge

unread,
Jan 27, 2022, 11:18:36 AM1/27/22
to diffpy...@googlegroups.com
We are interested to look into this, but are too busy right now with an experiment.  We can look into this in a couple of weeks time.  If anyone figures it out before then, please post it here!

Long wavelength ripples like that are often related to Qmin issues.  In the Debye Calculator it is important to set the Q_min to eliminate any small angle scattering from the particle size but below any scattering from the atomic correlations.   It may be worth trying changing your Q_min so it is < 2*pi/r_max of your particle, sthg like that.   If your Q_min is too high you will be "losing" some atomic correlation scattering and when the FT loses signal, it tends to respond with the long-wavelength oscillations.

Simon

--
You received this message because you are subscribed to the Google Groups "diffpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diffpy-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diffpy-users/0298cb6a-7803-47ca-9ccc-ed14ee0dfa05n%40googlegroups.com.


--
Simon Billinge
Professor, Columbia University
Physicist, Brookhaven National Laboratory

Niklas Thompson

unread,
Jan 27, 2022, 4:35:33 PM1/27/22
to diffpy-users
Hi Simon,

I was worried this was an issue related to the SAXS, but (Q_min, R_max) are coupled in this behavior.

For example, I attach below examples of doing the computation at fixed R_max = 20 A, scanning Q_min from 0.15 to 1.5 A in 0.15 A steps (top to bottom). There are large baseline 'anomalies' in each case, seemingly transitioning from a low frequency oscillation to a higher frequency oscillation as Q_min increases.However, if I increase R_max = 40 A, the Q_min dependence of the signal over R = 0--20 A completely disappears by about Q_min = 0.3 (I presume this is eliminating the SAXS), and even setting Q_min = 2.5 has essentially no effect on the calculation. So, I am not sure the observation is due to Q_min being too large, but is somehow related to truncation of R_max below the particle size. (FWIW, the 'size' here would be about 60 A on the diagonal, so 2*pi/r_max ~ 0.1)

However, I think I have a hypothesis as to the phenomenological origin of this behavior. If I fix Q_min at a 'reasonable' experimental value (say, 0.5 1/A), and scan R_max from 5 to 55 A, then you see pretty wild behavior in the real-space baseline, that eventually settles out when R_max is big enough. Looking at reciprocal space, it's clear that the density of the q-sampling increases when R_max is increased; I'm not totally up-to-par on my Fourier analysis theory, but with very low q-sampling, it looks like there are (spurious) features in F(Q) that probably are the origin of the low-frequency oscillations in G(r) (plot attached). Is this thinking correct? Even so, I'm not sure I understand why this would be related to system size, per se. Can the q-sampling in the DebyePDFCalculator be set independent of R_max? 

Nik
rmax_40-2.png
rmax_dependence.png
rmax20-qmin_scan.png
rmax_40.png

Simon Billinge

unread,
Jan 27, 2022, 5:20:42 PM1/27/22
to diffpy...@googlegroups.com
Thanks Nik this is helpful.  We will look into it.  I don't remember how the sampling is done in the Algo...

Niklas Thompson

unread,
Mar 9, 2022, 4:56:14 PM3/9/22
to diffpy-users
For anyone interested, I think the coupling between rmax and qstep is due to automatic initialization of the 'setOptimumQstep' option, and can be overridden by setting qstep manually. See documentation here: https://www.diffpy.org/diffpy.srreal/api/diffpy.srreal.html#module-diffpy.srreal.pdfcalculator 
Reply all
Reply to author
Forward
0 new messages