# Using FFT for spins in a non-cubic crystal lattice

Classical Ising/XY/Heisenberg models on a crystal lattice are commonly used to model magnetic materials. These can be studied using Monte Carlo simulations on a computer. Magnetic systems are often studied experimentally utilizing neutron scattering, and of the relevant quantity to extract from the Monte Carlo is the Spin Structure Factor, defined as the Fourier transform of the spin-spin correlation function $$S(\mathbf{q}) = \frac{1}{N}\sum_{ij} \left e^{-i\mathbf{q}\cdot(\mathbf{r}_i-\mathbf{r}_j)}$$ where $$\mathbf{r}_i$$ is the position of spin $$i$$ in the lattice. Note this is equivalent to the correlator of the reciprocal space correlation, $$S(\mathbf{q}) = \left$$ where the reciprocal space spin variables are defined as $$s(\mathbf{q}) = \frac{1}{\sqrt{N}}\sum_{i} s_i e^{-i\mathbf{q}\cdot\mathbf{r}_i}$$ This can be efficiently computed using a FFT, if we have a cubic lattice. My question is, how do we apply the FFT to compute this transformation if we have a non-cubic lattice, such as an FCC lattice?