I(q) and p(r) calculator

This Javascript calculates the scattering curve I(q) in reciprocal space and the the distance distribution function p(r) in real space of models consisting of up to 40 spheres placed at different x/y/z coordinates having the same or different radii and electron densities by using the Debye-formula in reciprocal and in real space, respectively. Enter the number of spheres (Nsp), their coordinates x(i), y(i), z(i), their radii r(i) and their electron-densities c(i). The spheres can also overlap (totally or partially) where the resulting electron density of the overlapping region is the sum of the overlapping electron densities. For n(I) points the I(q) from q = 0 to qz with a scaling factor F and for n(p) points from r = 0 to Dm (max. dimension) with a scaling factor F will be calculated. The parameters max. Dimension (Dm), Radius of Gyration (Rg), I(0) and gamma(0) are also listed and if F = 0 is entered, the respective function will be normalized to I(0) = 1 and gamm(0) = 1. The values are listed and displayed in I vs q (left plot, optionally log(I) can be plotted) and p(r) vs r (right plot, optionally gamma(r) being p(r)/(r*r) can be plotted) in arbitrary units and can be copied and pasted from the window into any text-file for further processing and graphical displaying. An animation of the preloaded model can be seen here or here.

Input I(q)/p(r) Results
I(q) log I qz F n(I) n(p)
p(r) g(r) Nsp
x(1) y(1) z(1) r(1) c(1)
x(2) y(2) z(2) r(2) c(2)
x(3) y(3) z(3) r(3) c(3)
x(4) y(4) z(4) r(4) c(4)
x(5) y(5) z(5) r(5) c(5)
x(6) y(6) z(6) r(6) c(6)
x(7) y(7) z(7) r(7) c(7)
x(8) y(8) z(8) r(8) c(8)
x(9) y(9) z(9) r(9) c(9)
x(10) y(10) z(10) r(10) c(10)
x(11) y(11) z(11) r(11) c(11)
x(12) y(12) z(12) r(12) c(12)
x(13) y(13) z(13) r(13) c(13)
x(14) y(14) z(14) r(14) c(14)
x(15) y(15) z(15) r(15) c(15)
x(16) y(16) z(16) r(16) c(16)
x(17) y(17) z(17) r(17) c(17)
x(18) y(18) z(18) r(18) c(18)
x(19) y(19) z(19) r(19) c(19)
x(20) y(20) z(20) r(20) c(20)
x(21) y(21) z(21) r(21) c(21)
x(22) y(22) z(22) r(22) c(22)
x(23) y(23) z(23) r(23) c(23)
x(24) y(24) z(24) r(24) c(24)
x(25) y(25) z(25) r(25) c(25)
x(26) y(26) z(26) r(26) c(26)
x(27) y(27) z(27) r(27) c(27)
x(28) y(28) z(28) r(28) c(28)
x(29) y(29) z(29) r(29) c(29)
x(30) y(30) z(30) r(30) c(30)
x(31) y(31) z(31) r(31) c(31)
x(32) y(32) z(32) r(32) c(32)
x(33) y(33) z(33) r(33) c(33)
x(34) y(34) z(34) r(34) c(34)
x(35) y(35) z(35) r(35) c(35)
x(36) y(36) z(36) r(36) c(36)
x(37) y(37) z(37) r(37) c(37)
x(38) y(38) z(38) r(38) c(38)
x(39) y(39) z(39) r(39) c(39)
x(40) y(40) z(40) r(40) c(40)

Dm
Rg
I0
g0
Author: M.Kriechbaum, TU-Graz (2020), e-mail: manfred.kriechbaum@tugraz.at