Energies and forces 665
0 1 2 3 4 5 6 7 8
x
0.0
0.2
0.4
0.6
0.8
1.0
M
(n
x)
n= 2
n= 4
n= 6
n= 8
Fig. B.2 Cardinal B-spline functions forn= 2, 4 , 6 ,8.
bn(ν) = e^2 πi(n−1)ν/Nl
n∑− 2
k=0
Mn(k+ 1)e^2 πiνk/Nl. (B.27)
(Remember thatnandnαaredifferentindices!) The sum in eqn. (B.26) is not actually
infinite becauseMn(x) has compact support. The number of nonzero terms, and hence
the accuracy of the interpolation, increases withn. Using eqn. (B.26), the structure
factor can then be evaluated using a (discrete) fast Fourier transform of the form
S(n) =bn(nx)bn(ny)bn(nz)Q ̃(n), (B.28)
where
Q ̃(n) =
N∑l− 1
kx=0
N∑l− 1
ky=0
N∑l− 1
kz=0
e^2 πinxkx/Nle^2 πinyky/Nle^2 πinzkz/NlQ(k), (B.29)
and
Q(k) =
∑N
i=1
qi
∑
j 1 ,j 2 ,j 3
Mn(ux,i−kx−j 1 Nl)
×Mn(uy,i−ky−j 2 Nl)