structure_gauss {crone} | R Documentation |
Structure of gaussian atoms
Description
Structure formed by all gaussian atoms in the unit cell. Positions, atomic numbers and thermal factors are given by vectors of a same length. Each atom forming the structure is also characterised by a given occupancy (between 0 and 1).
Usage
structure_gauss(sdata, x = NULL, N = NULL, k = ksigma)
Arguments
sdata |
A named list, normally obtained through the use of
function
|
x |
Point in the 1D cell at which this function is calculated. Default is NULL, in which case a grid is set up internally. |
N |
Integer. Number of points in the regular grid, if the grid is not provided directly. |
k |
A real number. It controls the standard deviation of the
gaussian function describing the atom and, thus, the shape of the
associated peak. The standard deviation sigma is given by:
|
Value
A named list of length 2: x is the grid (either input by user or set up internally), rr is a vector of length equal to the length of vector x, with values equal to the evaluated gaussian atoms.
Examples
# Cell, atom types, positions and B factors
a <- 10
SG <- "P1"
x0 <- c(2,5,7)
Z <- c(6,16,8)
B <- c(0,0,0)
# All occupancies to 1
occ <- c(1,1,1)
# Standard data format
sdata <- standardise_sdata(a,SG,x0,Z,B,occ)
# Grid for unit cell
x <- seq(0,a,length=1000)
# Structure density
rtmp <- structure_gauss(sdata,x)
plot(rtmp$x,rtmp$rr,type="l",xlab="x",ylab=expression(rho))
# Now reduce occupancy of sulphur
occ[2] <- 0.5
sdata <- standardise_sdata(a,SG,x0,Z,B,occ)
rtmp <- structure_gauss(sdata,x)
points(rtmp$x,rtmp$rr,type="l",col=2)
# Increase temperature of oxygen
B[3] <- 10
sdata <- standardise_sdata(a,SG,x0,Z,B,occ)
rtmp <- structure_gauss(sdata,x)
points(rtmp$x,rtmp$rr,type="l",col=3)