# NOT RUN {
# Diffraction from just two unit cells of cyanate
sdata <- load_structure("cyanate")
# Max resolution is 1 angstroms; no backstop
ltmp <- diffraction(sdata,D=1,Ncell=1)
# Plot diffraction pattern
plot(ltmp$xstar,ltmp$Imod,type="l",
xlab=expression(paste("x"^"*")),ylab="Intensity")
# Diffraction from 20 unit cells with backstop of 20 angstroms diameter
ltmp <- diffraction(sdata,D=1,bstop=10)
plot(ltmp$xstar,ltmp$Imod,type="l",
xlab=expression(paste("x"^"*")),ylab="Intensity")
# }
Run the code above in your browser using DataLab