## What is this database?

This database contains simulated x-ray and neutron powder diffraction patterns of the nano-sized model samples of the materials from the Crystallography Open Database (COD). For each crystalline material, the size of model sample varies in the range from 6 to 30 nm with step 3 nm allowing to identify the dependency of the powder diffraction pattern on the crystalline size. The database was obtained using volunteer computing powered by BOINC.

## How the diffraction patterns are calculated?

The powder diffraction patterns were calculated using open-source software XaNSoNS (X-ray and Neutron Scattering on Nanoscale Structures). The data from the Periodictable package for Python were used for x-ray atomic form factors and neutron scattering lengths.

XaNSoNS implements Monte-Carlo approach to handle fractional site occupancy numbers and non-zero atomic displacement parameters. Note that only isotropic atomic displacement parameters are considered (all the anisotropic atomic displacement parameters are ignored).

The site occupancy number of the atom (_atom_site_occupancy CIF field) is interpreted as a probability that atom of this type will occupy this site.

The position of each atom in each cell is shifted to a random direction on the randomized but normally distributed distance according to the value of the isotropic atomic displacement parameter (_atom_site_U_iso_or_equiv CIF field), which is interpreted as a σ2 of this normal distribution.

X-ray and neutron powder diffraction patterns are calculated for two different types of model samples:

1. isolated spherical crystalline particle of a given size (diameter), D;
2. solid crystalline material with long-range order broken on the distances greater than a given value, D.
Variation of D results in 18 powder diffraction patterns in total for a given structure from the COD and for a given type of incident radiation source (x-ray or neutron). Note that variation of crystallite shape (which affects the diffraction pattern at small scattering angles) in addition to variation of its size is out of the scope of this database.

In the case of isolated particle (model sample of type "a"), the x-ray powder diffraction pattern is calculated using the following equation:

$\begin{array}{cc}\phantom{\rule{1.0em}{0ex}}& S\left(q\right)=\genfrac{}{}{0.1ex}{}{1}{N}\sum _{e{l}_{i}=1}^{{N}_{el}}\left({\left({f}_{e{l}_{i}}\left(q\right)\right)}^{2}{N}_{e{l}_{i}}^{"at"}+2\sum _{e{l}_{j}=e{l}_{i}}^{{N}_{el}}{f}_{e{l}_{i}}\left(q\right){f}_{e{l}_{j}}\left(q\right)\sum _{k=0}^{{N}_{bin}-1}{\left[{H}_{e{l}_{i},e{l}_{j}}\right]}_{k}\genfrac{}{}{0.1ex}{}{\mathrm{sin}\left(q\left(k+0.5\right){\Delta }_{bin}\right)}{q\left(k+0.5\right){\Delta }_{bin}}\right)\hfill \end{array}$

where $q=4\pi \mathrm{sin}\left(\theta /\lambda \right)$ is the scattering vector magnitude (2θ is the scattering angle and λ is a wavelength of the source), eli and elj are the indexes of chemical elements (or ions), Nel is the total number of different chemical elements in the nanoparticle, N is the total number of atoms of all elements in the nanoparticle, q is the scattering vector magnitude, ${f}_{e{l}_{i}}\left(q\right)$ is the x-ray atomic form factor for the chemical element (or ion) with the index eli, ${N}_{e{l}_{i}}^{"at"}$ is the total number of atoms of the element eli in the nanoparticle, $\left[{H}_{e{l}_{i},e{l}_{j}}{\right]}_{k}$ is the k-th bin of the histogram of interatomic distances for a pair of elements eli, elj, Δbin is the bin's width equal to 0.001 Å. The value of $\left[{H}_{e{l}_{i},e{l}_{j}}{\right]}_{k}$ is equal to the number of pair of atoms of the elements eli and elj, for which the condition $k{\Delta }_{bin}\le {r}_{ij}\le \left(k+1\right){\Delta }_{bin}$ is met, where rij is the interatomic distance.

In the case of solid material (model sample of type "b"), the x-ray powder diffraction pattern is calculated using the modified equation:

$\begin{array}{cc}\phantom{\rule{1.0em}{0ex}}& S\left(q\right)=4\pi \rho {\left({R}_{cut}\right)}^{3}{\left({f}_{av}\left(q\right)\right)}^{2}\genfrac{}{}{0.1ex}{}{\mathrm{sin}\left(q{R}_{cut}\right)}{q{R}_{cut}\left({\left(q{R}_{cut}\right)}^{2}-{\pi }^{2}\right)}+\genfrac{}{}{0.1ex}{}{1}{{N}_{BS}}\sum _{e{l}_{i}=1}^{{N}_{el}}\left({\left({f}_{e{l}_{i}}\left(q\right)\right)}^{2}{N}_{e{l}_{i}}^{"at"}+2\sum _{e{l}_{j}=e{l}_{i}}^{{N}_{el}}{f}_{e{l}_{i}}\left(q\right){f}_{e{l}_{j}}\left(q\right)\sum _{k=0}^{{N}_{bin}-1}{\left[{H}_{e{l}_{i},e{l}_{j}}\right]}_{k}\genfrac{}{}{0.1ex}{}{\mathrm{sin}\left(\pi {r}_{k}/{R}_{cut}\right)}{\pi {r}_{k}/{R}_{cut}}\genfrac{}{}{0.1ex}{}{\mathrm{sin}\left(q{r}_{k}\right)}{q{r}_{k}}\right)\hfill \end{array}$

where ρ is the average atomic density of the model sample, Rcut = D is the cut-off radius (the longest distance at which the atoms are still correlated), fav(q) is the average atomic form-factor of the model sample, ${r}_{k}=\left(k+0.5\right){\Delta }_{bin}$, NBS is the number of atoms in the bounding sphere. The factor $\genfrac{}{}{0.1ex}{}{\mathrm{sin}\left(\pi {r}_{k}/{R}_{cut}\right)}{\pi {r}_{k}/{R}_{cut}}$ is the weight coefficient that smoothly suppresses the contribution of long-range interatomic correlations. The first term describes the contribution of a continuous sphere with atomic density $\rho \genfrac{}{}{0.1ex}{}{\mathrm{sin}\left(\pi r/{R}_{cut}\right)}{\pi r/{R}_{cut}}$ and radius Rcut.

Note that Lorentz-polarization factor is omitted to make the diffraction patterns dependable only on q and not on scattering angle and source wavelength. One should apply Lorentz-polarization correction to the x-ray powder diffraction patterns before use.

Neutron diffraction patterns are calculated by the same formulas with the only difference that x-ray atomic form factors are replaced by neutron scattering lengths that do not depend on q.

Note that multiple scattering, inelastic scattering and absorption are not considered.

## How to use the database?

Since the COD contains all necessary information about the structures, there is no need to duplicate it in this database. If you need to search the structure by its parameters, use the advanced search in the COD website. In this database, just enter the COD ID of the structure of interest in the search field to get to the structure’s page. Alternatively, just add the COD ID to the address field after slash, e.g., http://database.xansons4cod.com/1514018.

The structure's webpage contains interactive charts showing simulated powder diffraction patterns, links to the data files (txt) with these diffraction patterns and the list of volunteers who contributed to this page by donating their computing power.

You can show/hide the curves by clicking on the respective entries in the legend. By default, only the diffraction patterns for solid materials for 6, 12, 18, 24 and 30 nm samples are shown. Zoom the diffraction patterns in or out with ←→ and →← buttons. Move zoomed area right or left with → or ← buttons. Note that the limits of y-axis are set in such a way as to show the main features of diffraction pattern, therefore for the single particles the large sinusoid at small values of q is cropped.

You can download the data files with simulated powder diffraction patterns by clicking the links below the charts. The filename contains COD ID, type of the source (x-ray or neutron) and type of the model sample (single particle or solid material).

## Data format.

The 1st line contains the information on the volunteers (ids and usernames) who contributed to this file.

Example: # Volunteers [id|"name"]: 34|"Conan" 13|"McShane of TSBT" 57|"gaballus" 122|"Coleslaw" 91|"PDW" 29|"fzs600"

The 2nd line is a list of the chemical elements contained in the structure.

Example: # Elements: Sr F Al Na

The 3rd line contains the range of scattering vector magnitude, q, in Å-1 as well as the resolution of the diffraction patterns. For all the diffraction patterns in the database, qmin = 0.1 Å-1, qmax = 8.15 Å-1 and Nq = 4096. So, one can define the numerical mesh for q as linspace(qmin, qmax, Nq) in Matlab, Octave or Python (with numpy).

Example: # q in 1/A [min max N]: 0.1 8.15 4096

The 4th line is an ordered list of the sizes of the model sample in Å.

Example: # Sizes in A: 60 90 120 150 180 210 240 270 300

Each column of the data is a powder diffraction pattern for the respective size of the model sample from the list of the 4th line.