1

I am trying to use ifft function to evaluate the radial distribution function g(r), r is distance (nm), by using the structure factor s(q) , which is function of wave vector q (1/nm) :

$$ g(r) = 1+\frac{1}{2 \pi^2 \rho r}\int_0^q q s(q) sin (q r) dq $$ from 0 to q_max

I did this by using normal integration (quad) but it takes long time to calculate it. So I believe I can use ifft to do this since the function s(q) is a discrete function.

I do not know what input I have to use in ifft() ? do I have to put q*s(q) ? what about sin (q r) ? Is it just : imag (ifft()) ? Do I have to take in my account Nyquist frequency in my data ?

I am sorry there are too many questions but I am REALLY confused ):

Any help will be appreciated!

Thanks a lot .

0 Answers0