Static Structure Factor S(q) or S(k)

Reference: K. Zhang, On the Concept of Static Structure Factor, arXiv:1606.03610 (2016) (link)

see code at

https://github.com/statisticalmechanics/gr

Also check a more comprehensive review on this topic

Unifying the concepts of scattering and structure factor in ordered and disordered samples (link), Dingning Li and Kai Zhang, J. Appl. Cryst. 54, 644-660 (2021)

and source code for it

https://github.com/statisticalmechanics/scatter

LJ system

Lammps input script is here

configuration snapshots are stored in "movie.xyz" in xyz format

C code to calculate g(r) gr.c , which generates "gr.dat"

C code to calculate S(q) sq.c , which calculates S(q) with two methods as bellow.

*****************************************************************************************************************************************************

After being complied (with executive file e.g. sq), the "sq.c" code can be run in command line as

./sq

Some parameters need to be input in the window.

NumberOfParticles // total number N of particles in the system

L // simulation box size, assuming cubic shape. This is used to define wavevector increment dk=2 pi/L, and may allow to be scaled by fluctuating box size (not implemented in the current version)

NumberOfrBins // number of r-bins in the file "gr.dat" containing the radial distribution function g(r)

NumberOfqBins // number of q-bins in S(q) used in the discrete numerical integration of the Fourier transform

qmax // the maximum q value for S(q) in the Fourier transform method

NumberOfConfig // total number of configurations in your xyz movie file. put 1 if you have only one snapshot

NumberOfEqui // number of configurations considered as equilibration and to be skipped in your xyz movie file. put 0 if the sampling starts from the first snapshot

nkbound // number of k vectors in each direction (constrained by the allowed size of the data structure). So in total nkbound^3 wavevectors

dkmultiplier // put 1 if you want the increment dk to be 2 pi / L. Otherwise, it is dk = 2 pi / L * dkmultiplier

*****************************************************************************************************************************************************

Method 1. Fourier transform of g(r)

comment: Not defined at k=0. Also should not apply to crystals. Oscillation of S(k) for k<k* is due to oscillation of g(r) about 1 at r>r*.

Method 2. Direct calculation with Fourier density correlation.

comment: S(k) -> N as k->0, due to finite size and periodic boundary condition, where N is the total number of particles. S(k) scales with N at peak k's for crystals. The noise of the data can be reduced by choosing smaller increment dk (e.g. using larger box size L in the input)

1. rho = 0.8 at T = 2.0, liquid

first peak at r*=1.06 (2pi/r*=5.93) main peak at k*=6.77 (2pi/k*=0.928)

2. rho = 0.1 at T = 2.0, gas

first peak at r*=1.13 (2pi/r*=5.56) main peak at k*=6.16 (2pi/k*=1.02)

3. Hard sphere at rho -> 0.0

first peak at r*=1.0 (2pi/r*=6.28) main peak at k*=5.81 (2pi/k*=1.08)

4. rho = 1.2 at T = 0.8, fcc solid

first peak at r*=1.05 (2pi/r*=5.98) main peak at k*=7.3 (2pi/k*=0.86), other peaks: 8.4, 11.9,13.95...

peak ratio versus k*: 1.15=2/sqrt(3), 1.63=2sqrt(2)/ sqrt(3), 1.91...

5. rho = 1.2 at T = 0.8, hcp solid (non-cubic box with length 10.5628:18.2953:17.2489 = 1: sqrt(3):sqrt(8/3))

Peaks for perfect hcp lattice of particle distance 1.05628

k S(k) ratio planes

6.868645 399.993588

7.285296 1333.333301 1 hexagonal planes: 2pi/(1.05628*sqrt(2/3))

7.774776 545.457442

10.012675 249.995986

11.896840 1142.857091 1.633

12.907294 260.870938

13.737265 1000.031944 1.8856

13.950283 888.888827

14.212029 260.866758

14.570634 3999.999610 2

15.549552 181.823985

16.108429 999.983872 2.211

17.553717 272.724325

18.172708 249.995959

18.534191 214.286824

18.810574 3999.999430 2.582

19.578645 153.843663

20.025380 1000.031846

6. rho = 1.2, perfect bcc solid

first peak at r*=1.029 (2pi/r*=6.11) main peak at k*=7.49 (2pi/k*= 0.84), other peaks: 10.6, 12.98, 14.99...

peak ratio versus k*: 1.415=sqrt(2), 1.732=sqrt(3), 2 ...