Here you can find the source code (in Fortran90) for calculation of twodimensional diffraction patterns and several examples of input atomic configurations.
Mikhail I. Arefev, Maxim V. Shugaev and Leonid V. Zhigilei
"Kinetics of laserinduced melting of thin gold film: How slow can it get?" Science Advances 8, eabo2621, 2022
PDF, doi: 10.1126/sciadv.abo2621, Supplementary Information
The format of the files is as follows: (1) For *.xyz atomic structure files, the total number of atoms is given in the first line, the dimensions of the system in x, y, and z directions are given in the second line. The atomic x, y, z coordinates are listed in all of the remaining lines. (2) For 2d diffraction profiles each file contains x coordinate in reciprocal space in the first column, x coordinate in reciprocal space in the second column and the magnitude of the structure factor in the third column (3) For 1d diffraction profiles each file contains the value of Q in inverse angstroms in the first column and the magnitude for the structure factor in the second column 
You can download the source codes for 2D structure factor
calculation (with examples of input and output) using the link: Source code for calculating 2D diffraction patterns (by Mikhail Arefev)
A brief description of the code is provided in the User Manual 
The table below shows several examples of twodimensional diffraction profiles (first row) and
angular average (bottom row) for the following systems: Example 1 (FCC_32.xyz): A FCC gold system which contains 32,000 atoms thermalized for 350 picoseconds at 300 K and zero pressure in NPT ensemble with periodic boundary conditions applied in all three directions. Example 2 (Liq_32.xyz): A liquid gold system which contains 32,000 atoms thermalized for 140 ps after melting at 1300 K and zero pressure in NPT ensemble with periodic boundary conditions applied in all three directions. Example 3 (FCC_256.xyz): A FCC gold system which contains 256,000 atoms thermalized for 350 picoseconds at 300 K and zero pressure in NPT ensemble with periodic boundary conditions applied in all three directions. Example 4 (Liq_256.xyz): A liquid gold system which contains 256,000 atoms thermalized for 140 ps after melting at 1300 and zero pressure in NPT ensemble with periodic boundary conditions applied in all three directions. 
Example 1: FCC_32.xyz (SF_FCC_32.dat) 
Example 2 : Liq_32.xyz (SF_Liq_32.dat) 
Example 3: FCC_256.xyz (SF_FCC_256.dat) 
Example 4: Liq_256.xyz (SF_Liq_256.dat) 
AvrgFCC_32.dat:  AvrgLiq_32.dat:  AvrgFCC_256.dat:  AvrgLiq_256.dat: 
The data is produced, and the codes are developed with support from the National Science Foundation,
Grant No. DMR1708486. Computational support was provided by the NSF through the Extreme Science and Engineering Discovery Environment (Project No. TGDMR110090) and
by Research Computing at the University of Virginia.
