Repository navigation
Behavior of Structure.Bisoequiv #51
Description
Activity
Hi Nik
I have a possible answer to your 2nd issue, but it is just a guess and I cannot find out if it is real. But it might be that PDFcalculator strictly only takes periodic structures, aka crystal structures. So the long-range correlations you see are because the calculator repeats your input file over and over again. However, I cannot see what type of file types the PDFcalculator takes if there are any limits at all. I know this could be an issue if we were in the fitting part of Diffpy. But I am not sure about the calculators.
Hi Mikkel,
The thing is, nominally this structure is periodic. It was taken from an MD simulation in a periodic box, hence the
Structure.placeInLatticecommand in my original example.In fact, you can see the 'real' periodic image effect if you set
rmaxto some value larger than the nominal cell size. One of the reasons I have been comparing the reciprocal vs. real space summation approaches is because I was curious what the difference would be between treating these periodic calculations as discrete versus extended structures.Moreover, the spurious oscillations are only apparent when you calculate the partial PDFs. Somehow these oscillations 'cancel out' when you sum the partial PDFs to the total, i.e., the oscillations in g(H-H) almost cancel the oscillations in g(O-H) to create a 'normal' looking PDF for water.
I saw that anticorrelation of the oscillatrions but I need to think what is an explanation. The other thing going on is what we have been discussing...the Uiso's seemed to be not behaving the same way in each calculator. This may be the bug, but needs a bit more looking.
Correct me if I am wrong but in MD simulations periodic boundary conditions "moves" atoms at an edge to the opposite edge. However in Diffpy periodic boundaries creates another cell adjacent to the original cell. Since we have a static situation there will be some correlation over the border between neighbouring unit cells. See crude and fast illustration.
But I have no idea if I am correct, just guessing.
I think that is a correct description of periodic boundary conditions in MD calculations. However, the forces acting on the particles do take into account an 'infinite' tiling of the simulation cell, in that atoms at the boundary experience forces due to periodic images from their nearest neighbors. Thus, (I believe) the arrangement of atoms in the cell should be consistent with how Diffpy calculates the pair correlations, if that makes sense.
I can calculate the O-O RDF using, e.g. VMD, and get the following with and without periodic conditions enforced in the calculation.
These were calculated from exactly the same frame as in my Diffpy example. As you can see, there are no undamped oscillations in the baseline when using VMD, which is why I think the behavior of the
PDFCalculatoris spurious.structure.Bisoequiv = 0.04
I did not have time to follow the discussion in detail, but note that B=0.04 is a very small value, it is usually about 10 times larger. The relation between B and U is just a scaling factor of
8*pi^2. The mean square displacement for a 2 atom separation at B=0.04 issqrt(2*U) = 0.03, which is just ~3 datapoints on PDFCalculator calculation grid spaced at 0.01;
not enough to represent peak function.Perhaps that could be the cause of inaccuracies, try to adjust the B value or, if correct, use a smaller rstep in PDFCalculator.
- Thanks Pavol, good catch.…On Wed, Aug 31, 2022 at 4:18 PM Pavol Juhas ***@***.***> wrote: structure.Bisoequiv = 0.04 I did not have time to follow the discussion in detail, but note that B=0.04 is a very small value, it is usually about 10 times larger. The relation between B and U is just a scaling factor of 8*pi^2. The mean square displacement for a 2 atom separation at B=0.04 is sqrt(2*U) = 0.03, which is just ~3 datapoints on PDFCalculator calculation grid spaced at 0.01; not enough to represent peak function. Perhaps that could be the cause of inaccuracies, try to adjust the B value or, if correct, use a smaller rstep in PDFCalculator. — Reply to this email directly, view it on GitHub <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_diffpy_diffpy.structure_issues_51-23issuecomment-2D1233379919&d=DwMCaQ&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=6Pin9WIW2wJZzVMqXib07fokbkHzCKPr15sA4fQTrA8&m=mziszj3YF6HIci7Wzwn88SECLubJiY6cNzfeRdje0GGH5MGe5C7jD4IwQpAxpegu&s=6bzd_tX06QYQBHE1uCyzrnsSTcdZfVz9V9hXOlKpXlI&e=>, or unsubscribe <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABAOWUP6KVQ35QB6YAJY5N3V364ZBANCNFSM576V6LLA&d=DwMCaQ&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=6Pin9WIW2wJZzVMqXib07fokbkHzCKPr15sA4fQTrA8&m=mziszj3YF6HIci7Wzwn88SECLubJiY6cNzfeRdje0GGH5MGe5C7jD4IwQpAxpegu&s=r9KejEo-C8QfHKF6Nvj8FPhWhVKEwnJtjSjp4sk-P7o&e=> . You are receiving this because you were mentioned.Message ID: ***@***.***>-- Simon Billinge Professor, Columbia University Physicist, Brookhaven National Laboratory
Hi Pavol,
I don't think the thermal parameters being too small is creating the oscillations in the partial PDFs. E.g., here is a series of calculations on the same structure:

For a given
rmax, the oscillations seem invariant to setting the U value for the oxygens over three orders of magnitude. Rather,rmaxseems to control the 'frequency' of the oscillation in real space.



@sbillinge I am porting over a discussion from the diffpy-users google group on the behavior of
Structure.Bisoequivfor calculating PDFs via real-space summation withdiffpy.srreal.pdfcalculator.PDFCalculator.The original thread:
To be clear, I think there may be two issues at hand: (1) the expected behavior of
Structure.Bisoequivfor setting thermal parameters of atoms inStructureobjects, and (2) the expected behavior of usingsetTypeMaskwith aPDFCalculatorobject. the latter might more properly be an issue to file underdiffpy.srreal.