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
18 stars 4 forks source link

[BUG] Why are there large negative values of the static structure factor as q->0 #474

Open ChiCheng45 opened 2 weeks ago

ChiCheng45 commented 2 weeks ago

Description of the error Why does the static structure factor have a large negative value for q->0. Here is one I generated using a cp2k water trajectory. I'd imagine there are numerical issues as q=0 but the drop to a large negative value begins before it gets close to 0.

image

Here is an experimental static structure factor of liquid Ar (https://journals.aps.org/pra/abstract/10.1103/PhysRevA.7.2130).

image

it goes to zero as q->0.

gonzalezma commented 2 weeks ago

I just answered in the other issue. From a physical point of view, the minimum Q that makes sense in the simulation is the (1,0,0) vector. Here we calculate S(Q) as the FT of the g(r), so the Q-range chosen is arbitrary, but any Q value below that Qmin is not meaningful. In particular, for Q=0 the exp term is 1 and you will get a number that is proportional to the sum of all the scattering lengths of the atoms in your system.