simPart {nanop}R Documentation

Functions to simulate the atomic positions in a nanoparticle

Description

Functions to simulate the deterministic atomic positions in a nanoparticle and displace those positions stochastically to model thermal effects

Usage

simPart(sym="fcc", latticep=4.08, r=10, latticepshell=NA,
rcore=NA, rcenter=FALSE, center=c(0,0,0), foranalcs=FALSE)

displacePart(nanop, sigma=NA, sigmacore=NA, sigmashell=NA, rcore=NA,
rcenter=FALSE, center=c(0,0,0), latticep = 4.08)

Arguments

sym character vector describing the structure to be used; currently only "fcc" for face-centered cubic is available.
latticep numeric indicating the lattice parameter(s).
r numeric indicating the radius of the nanoparticle. (Currently, only spherical nanoparticle models are implemented).
nanop numeric matrix in which each row represents the position of an atom, e.g., as returned by simPart.
sigma numeric which, if not NA, determines the variance of the Gaussian displacements from the mean atomic position throughout the nanoparticle. If this argument is not NA then the following three arguments should be NA.
sigmacore numeric which, if not NA, determines the variance of the Gaussian displacements from the mean atomic position in the core of the nanoparticle; if this argument is not NA then both rcore and sigmashell must also be not NA.
sigmashell numeric which, if not NA, determines the variance of the Gaussian displacements from the mean atomic position in the shell of the nanoparticle; if this argument is not NA then both rcore and sigmacore must also be not NA.
rcore numeric which, if not NA, determines the radius of the core; if this argument is not NA then both sigmacore and sigmashell must also be not NA.
latticepshell numeric indicating the lattice parameter(s) associated with the shell.
rcenter logical value indicating whether to choose the center of the particle at random within the unit cell
center If rcenter=FALSE, the position at the particle center.
foranalcs logical indicating whether the result will be used in combination with calculating analytical broadening for a core-shell particle using the function broadPDF.

Value

numeric matrix with three columns in which each row represents an atomic position.

Examples


## Deterministic particle 
aa <- simPart()

## if the package 'rgl' is installed, the lines calling
## 'spheres3d' can be uncommented; they will provide a 3D
## visualization of a particle.
# spheres3d(aa, radius=.4)

## Particle with uniform displacements 
aa <- simPart(r=11, latticep=5)
ax <- displacePart(aa, sigma=.02) 
# spheres3d(ax, radius=.4)

## Particle with displacements in the core different from displacements
## in the shell
aa <- simPart(r=10, latticep=5)
ax <- displacePart(aa, sigmacore=.001, sigmashell=.1, rcore=10) 
# spheres3d(ax, radius=.4)


[Package nanop version 1.0 Index]