calcPDF {nanop} | R Documentation |
Functions to calculate the pair distribution function (PDF) and Q-dependent PDF given a matrix of atomic positions. The latter is currently relatively time-consuming.
calcPDF(nanop, calpha = 1, dr = 0.01, minR = 1, maxR = 20, p = 1, foranalcs=FALSE) calcQDepPDF(nanop, dr=.1, minR=1, maxR=20, minQ=1, maxQ=20, a1 = 16.8819, b1=.4611, a2=18.5913, b2=8.6216, a3=25.5582, b3=1.48260, a4=5.86, b4=36.3956, c=12.0658)
nanop |
numeric matrix in which each row gives the coordinates of an atomic position in the nanoparticle |
calpha |
numeric indicating the concentration of atoms of the
type under consideration
|
dr |
numeric indicating the step size in r desired
|
minR |
numeric indicating the minimum value of r for which the
function should be evaluated
|
maxR |
numeric indicating the maximum value of r for which the function should be evaluated |
p |
numeric indicating the atomic number density or an approximation thereof |
minQ |
numeric indicating the minimum value of Q for which the function should be evaluated |
maxQ |
numeric indicating the maximum value of Q for which the function should be evaluated |
a1 |
numeric X-ray scattering factor parameter; see details |
b1 |
numeric X-ray scattering factor parameter; see details
|
a2 |
numeric X-ray scattering factor parameter; see details
|
b2 |
numeric X-ray scattering factor parameter; see details
|
a3 |
numeric X-ray scattering factor parameter; see details
|
b3 |
numeric X-ray scattering factor parameter; see details
|
a4 |
numeric X-ray scattering factor parameter; see details
|
b4 |
numeric X-ray scattering factor parameter; see details
|
c |
numeric X-ray scattering factor parameter; see details
|
foranalcs |
logical indicating whether the result will be used in
combination with calculating analytical broadening for a core-shell
particle using the function broadPDF |
The X-ray scattering factor is approximated by the function f(s)=a_1 * exp(-b_1 s) + a_2 * exp(-b_2 s) + a_3 * exp(-b_3 s) + a_4 * exp(-b_4 s) + c with s = \frac{Q}{4\pi}. The constants in the function are possible to specify as arguments. Their default values correspond to the values for Au.
List with elements
Q |
numeric vector of values at which the function was evaluated |
gQ |
numeric vector of function values |
calcQDepPDF
and calcPDF
do not use the same
normalization; calcQDepPDF
is currently very time-consuming.
## simulate a particle aa <- simPart() ## uniform displacement of positions ab <- displacePart(aa, sigma=.005) ## different displacement in core than shell ab1 <- displacePart(aa, rcore=8, sigmacore=.005, sigmashell=.02) ## calculate and plot PDF associated with both particles ac <- calcPDF(ab) ac1 <- calcPDF(ab1) plot(ac$r, ac$gr, type="l") lines(ac1$r, ac1$gr, col=2)