Skip to content
Michael-MD edited this page Mar 26, 2023 · 9 revisions

atom.h is a class which stores information about a single atom. This will be used later for storing information about atoms in the crystal.

Constructor

The class constructor header is given by

Atom(int Z, float xf, float yf, float zf, int px, int py, float rx, float ry)

The inputs are as follows:
    Z: atomic number of atom
    (xf, yf, zf): fractional position of atom in unit cell
    (px, py): dimensions of grid where calculations are carried out in pixels
    (rx, ry): real space length of unit cell in Ang.

Methods

vector<vector> scatteringFactor()

Calculates the scattering factor. The scattering factor is given by 5.17 of kirkland. The parameters for the fit are stored in scattering_amplitude_coefficients.cpp.

vector<vector> structureFactor()

The structure factor is given by 5.23 of kirkland although this method only calculates F(q_\perp, q_z=0) in anticipation of the fourier projection theorem used to calculate the projected atomic potential.

void calcPotential()

The atomic potential is given by 5.21 of kirkland.

Attributes

int px, py

Stores the pixel resolution of the calculation. These must be powers of two since the fft used is a radix-2 fft.

float occ, msd

occupancy and mean-square displacement, not currently used in code.

float xf, yf, zf

fractional coordinates of atom

int Z

atomic number

vector<vector> v

stores potential from calcPotential() method.

Clone this wiki locally