ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
21 stars 5 forks source link

[BUG] Unusual RDF result in pair distribution function job. #431

Closed ChiCheng45 closed 3 months ago

ChiCheng45 commented 5 months ago

Description of the error According to the documentation (https://mdanse.readthedocs.io/en/protos/pages/structure.html#pair-distribution-function), the pair distribution function job also calculates the radial distribution function. I ran the pair distribution function job with a water trajectory (which is periodic) but the RDF it produces does not look like a typical RDF from the literature. Some weird thing about the MDANSE RDF include the fact that it goes to zero as R get large which is wrong.

Additional details Generated using the DFTB water trajectory.

image

vs. for example fig.5 from this paper https://arxiv.org/pdf/2312.15211.

image

gonzalezma commented 5 months ago

Note that the paper figure that you show displays the pair-distribution function (PDF) g(r). The PDF output of MDANSE should show something similar. The radial distribution function (RDF) is defined as 4pir2rhog(r), so it grows with r as r2. And the decay to zero could be because r becomes > L/2, so one cannot compute g(r) correctly any more? If you are interested in the different PDF, RDF and D(r) definitions, check pp. 245-248 in doi:10.1088/0034-4885/69/1/R05