Learn R Programming

nanop (version 2.0-6)

broadPDF: Analytically broaden the PDF

Description

Analytically broaden the PDF using Gaussians

Usage

broadPDF(pdfob, sigma=0,  delta=NA, n=NA, nAtomTypes=1)

Arguments

Value

A list with elements r and gr that represent distances and values of the PDF, respectively.

Rdversion

1.1

Details

The correlated atomic displacement parameter for the atoms $\mu$ and $\nu$ is calculated as $$\sigma^2_{\mu, \nu} = (\sigma^2_{\mu} + \sigma^2_{\nu} ) [ 1 - \frac{\delta}{r^n}].$$

Examples

Run this code
## simulate particle
Cu1 <- createAtom("Cu", sigma=0.012) 
Cu2 <- createAtom("Cu", sigma=0.008) 
part <- simPart(atoms=list(Cu1), atomsShell=list(Cu2), r=20, 
    rcore=16, latticep=4.08, latticepShell=3.89)

## use a stochastic model for displacements 
partx <- displacePart(part, sigma=attributes(part)$sigma) 
gr1 <- calcPDF(partx, maxR=40) 

## use analytical broadening
gr2 <- calcPDF(part, maxR=40)
gr2 <- broadPDF(gr2, sigma=attributes(part)$sigma, nAtomTypes=2)

# plot PDFs calculated using both methods
matplot(gr1$r, cbind(gr1$gr, gr2$gr), type="l", lty=1, lwd=1:2)

Run the code above in your browser using DataLab