Description Usage Arguments Value Examples
Functions to simulate the deterministic atomic positions in a nanoparticle and displace those positions stochastically to model thermal effects
1 2 3 4 5 6 7 | simPart(atoms, sym = "fcc", latticep = 4.08, r=10,
atomsShell=NA, symShell = NA, latticepShell = NA, rcore = NA,
shell=NA, box=NA, ellipse=NA, pDimer=0, pStack=0,
rcenter=FALSE, center=c(0,0,0),
move=TRUE, rotShell=FALSE, rcenterShell=FALSE)
displacePart(nanop, sigma=NA, rcenter=FALSE, latticep=4.08)
|
atoms |
list with elements describing basis atoms in the primitive cell. Elements should be the same type as the return value of |
sym |
character describing the structure to be used: "fcc" for face-centered cubic structure, "bcc" for body-centered cubic structure, "sc" for simple cubic structure, "hcp" for hexagonal close-packed structure. |
latticep |
numeric vector indicating the lattice parameter(s). Should be given in the form:
|
r |
numeric vector indicating the radius (radii) of the nanoparticle. If length is greater than |
atomsShell |
list with elements describing basis atoms in the primitive cell for the particle shell. |
symShell |
character describing the structure associated with the shell. See |
latticepShell |
numeric vector indicating the shell lattice parameter(s). See |
rcore |
numeric vector which, if not |
shell |
numeric which, if |
box |
numeric vector. If not |
ellipse |
numeric vector. If not |
pDimer |
numeric indicating probability of atom to form a cluster with its neighbour. |
pStack |
numeric indicating probability of stacking fault to appear in each atomic plane. Currently is not available for perovskite symmetry. Produces ABCACABC stacking for cubic lattice and ABABABCBC stacking for hexagonal lattice. |
rcenter |
logical value indicating whether to choose the center of the particle at random within the unit cell. |
center |
If |
move |
logical value indicating whether to shift atoms near the core-shell boundary to avoid unphysically small interatomic distances. Might not work correctly if |
rotShell |
logical value indicating whether to rotate the particle shell by a random angle with respect to the core. |
rcenterShell |
logical value indicating whether to choose the center of the particle shell at random. If |
sigma |
numeric vector which determines the variances of the Gaussian displacements from the mean atomic positions throughout the nanoparticle. If |
nanop |
numeric matrix in which each row represents the position of an atom, e.g., as returned by |
numeric matrix with three columns in which each row represents an atomic position and list of the following attributes that describe particle properties:
"nStacks" |
number of stacking faults simulated in the particle. |
"rowcore" |
number of atoms within the core. |
"rowshell" |
number of atoms within the shell. |
"center" |
position of the particle center. |
"nAtomTypes" |
number of different atom types in the particle, e.g. for a core/shell particle with "Cu"/"ZnS" symmetry |
"atomType" |
vector of length |
"scatterLength" |
numeric vector describing neutron scattering lengths for all atom types in the particle |
.
"scatterFactor" |
list describing X-ray scattering factor parameters. See |
"sigma" |
see |
"layer_end", "layer_start" |
numeric vectors that are used if vector |
"layerS_end", "layerS_start" |
numeric vectors. Indicates layers for the particle shell. |
"dimer" |
logical indicating whether the particle is a cluster of two spherical particles. |
"r" |
If |
"rcore" |
If |
"shape" |
particle shape. |
"sym" |
particle (core) symmetry. |
"symShell" |
particle shell symmetry. |
"atomsCore" |
names of the chemical elements in the particle core. |
"atomsShell" |
names of the chemical elements in the particle shell. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | ## Uncomment all plotPart() calls for 3D visualization
## create CdSe nanoparticle:
## CdSe particle has wurtzite structure
## Zn and S atoms could be used to create base matrix
## (see getBase() )
Cd_base <- getBase("Zn") #get fractional coordinates for Zn
Cd_scL <- getScatterLength("Cd") #get scattering parameters for Cd
Cd_scF <- getScatterFactor("Cd")
Cd <- createAtom("Cd", base=Cd_base, scatterLength=Cd_scL,
scatterFactor=Cd_scF, sigma=0.01)
Se_base <- getBase("S")
Se_scL <- getScatterLength("Se")
Se_scF <- getScatterFactor("Se")
Se <- createAtom("Se", base=Se_base, scatterLength=Se_scL,
scatterFactor=Se_scF, sigma=0.008)
## atoms Cd and Se now can be used as arguments in simPart
part <- simPart(atoms=list(Cd, Se), latticep=c(4.3, 7.02),
sym="hcp")
#plotPart(part)
## Deterministic particle
## Particle with uniform displacements
Cu <- createAtom("Cu")
part <- simPart(atoms=list(Cu), atomsShell=list(Cu), rcore=8,
latticep=5)
partx <- displacePart(part, sigma=.02)
#plotPart(partx, radius=.4, box=TRUE)
## Particle with displacements in the core different
## from displacements in the shell
## create rock salt structure
Zn <- createAtom("Zn")
S <- createAtom("S")
part <- simPart(atoms=list(Zn,S), atomsShell=list(Cd, Se), r=14,
rcore=10, sym="hcp", latticep=c(3.1, 4.1), symShell="hcp",
latticepShell=c(4.3, 7.02))
partx <- displacePart(part, sigma=c(.01, .005, .012, .012))
## first elements in sigma and correspond to Zn atoms,
## second - to S atoms, third - to Cd atoms, last - to Se atoms.
attributes(part)$atomType
## elements '1' indicate Zn atoms in the total matrix, '2' indicate
## S atoms, '-1' indicate Cd atoms, and '-2' indicate Se atoms.
#plotPart(partx, radius=.4)
## Particles with radii drawn from a log-Normal size-distribution
## and constant thickness 0.8
r <- exp(rnorm(10, log(10), log(1.1)))
part <- simPart(r=r, shell=0.8, atoms=list(Cu),
atomsShell=list(Cu))
## particle attributes
attributes(part)
## Extract second subparticle
t1 <- attributes(part)$layer_start[2]
t2 <- attributes(part)$layer_end[2]
part2 <- part[t1:t2, ]
## In order to use part2 as an argument for calcTotalScatt() or
## other functions certain attributes should be set up
## (see calcTotalScatt).
## To avoid extraction of every subparticle use option
## kind="fast_av" in calcTotalScatt() function.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.