Learn R Programming

nanop (version 2.0-1)

createAtom: Describe fractional coordinates and scattering parameters of the basis atoms

Description

Function to create object of type atoms to be passed to simPart.

Usage

createAtom(name, base=NA, sigma=0.01, scatterLength=NA, 
    scatterFactor=NA)

Arguments

Value

list with elements name, base, sigma, scatterLength, scatterFactor.

Rdversion

1.1

Details

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.

See Also

getBase, getScatterLength, getScatterFactor

Examples

Run this code
## 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)

Run the code above in your browser using DataLab