Description Usage Arguments Details Value See Also Examples
Function to create object of type atoms
to be passed to simPart
.
1 2 3 |
createAtom(name, base=NA, sigma=0.01, scatterLength=NA,
scatterFactor=NA)
|
name |
character describing the name of chemical element; see details. |
base |
numeric matrix in which each row represents fractional coordinates of the corresponding basis atom within the primitive cell; see examples. If |
sigma |
numeric vector which, if not |
scatterLength |
numeric describing neutron scattering lengths for given atom. If |
scatterFactor |
list containig X-ray scattering factor parameters. If |
Parameter name
can be set up to any character value; if other arguments are not specified it is used as an argument in functions getBase
, getScatterLength
and getScatterFactor
calls. Functions getScatterLength
and getScatterFactor
contatain information for most chemical elements and some of their isotopes and ions. Fractional coordinates, however, does depend not on the type of chemical element but on the structure under considirations. Therefore argument name
in function getBase
indicates crystal structure (see getBase
). For example passing character "Cl" as an argument results in fractional coordinates of Cl atoms in the rock salt crystal structure.
list with elements name
, base
, sigma
, scatterLength
, scatterFactor
.
getBase
, getScatterLength
, getScatterFactor
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 | ## create CdSe nanoparticle:
## CdSe particle has wurtzite structure
## Zn and S atoms could be used to describe
## basis atoms fractional coordinates
## (see getBase() )
## get fractional coordinates for Zn
Cd_base <- getBase("Zn")
## get scattering parameters for Cd
Cd_scL <- getScatterLength("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")
## uncomment to plot particle:
#plotPart(part)
## create rock salt structure
Na <- createAtom("Na")
Cl <- createAtom("Cl")
## name, scatterLength and scatterFactor parameters
## in Na and Cl are now set up to those of Na and Cl.
## if we are interested only in particle structure
## or actually simulating rock salt there is no need
## to change them
part <- simPart(atoms=list(Na, Cl))
#plotPart(part)
## set up fractional coordinates that cannot be
## simulated by getBase()
## (for example we have ZnS wurtzite structure
## with atom S z-coordinate 0.378
## different from ideal value of 0.375 (3/8) ):
S_base <- matrix(c(
c(0.5, sqrt(3)/6, 0.378), #S
c(0.5, -sqrt(3)/6, (0.378-0.5))),
ncol=3, byrow=TRUE)
## each row represents fractional atomic coordinates in the primitive cell
S2 <- createAtom("S", base=S_base)
## use standard parameters for Zn atoms
Zn <- createAtom("Zn")
part <- simPart(atoms=list(Zn, S2), latticep=c(4.3,7.02), sym="hcp")
#plotPart(part)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.