Description Usage Arguments Value Examples
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).
1  structure_gauss(sdata, x = NULL, N = NULL, k = ksigma)

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:

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.
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  # 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)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.