Skip to contents

The atomic scattering factor function used in x-ray crystallography

Usage

scafac(atom_name, s)

Arguments

atom_name

A character string. The symbol of the atom whose scattering factor needs to be calculated (see list of available names in sfcoeffs).

s

A real numeric vector, the values of \(s\) at which the scattering function needs to be evaluated.

Value

The value of the scattering factor at s.

Details

The scattering factor is normally built as a function of \(\sigma\equiv\sin\theta/\lambda=s/2\), where \(s\) is the length of the Miller indices (as a vector) in reciprocal space, \(s=|\mathbf{h}|\). But in the expression for the structure factor it appears as a function of \(s\), rather than a function of \(\sigma\). Here the scattering function is a function of \(s\). The approximation used here (and in most crystallography packages) is accurate for up to 2 angstroms resolution. It can be used for resolutions higher than 2 angstroms, but it is less accurate.

See also

Examples


# Resolution range (up to 2 angstroms)
s <- seq(0,0.5,length.out=1000)

# The chosen atom is nitrogen
atom_name <- "N"

# Scattering factor
fN <- scafac(atom_name,s)

# Plot