7. structurefactor (sf)

7.1. Structure Factors

RMSA
PercusYevick
PercusYevick1D
PercusYevick2D
stickyHardSphere
adhesiveHardSphere
criticalSystem
latticeStructureFactor

7.2. Hydrodynamics

hydrodynamicFunct

7.3. Pair Correlation

sq2gr

7.4. Lattice

Explicit creating of particle lattice.

bravaisLattice
scLattice
bccLattice
fccLattice
hexLattice
hcpLattice
rhombicLattice
rhombicLattice.X
rhombicLattice.Y
rhombicLattice.Z
rhombicLattice.b
rhombicLattice.filter
rhombicLattice.centerOfMass
rhombicLattice.numberOfAtoms
rhombicLattice.planeSide
rhombicLattice.move
rhombicLattice.inSphere
rhombicLattice.show
rhombicLattice.limit2Cube

Lattice objects describing a lattice of points.

Included are methods to select sublattices as cubes, sphere or side of planes.

The small angle scattering can is calculated by js.ff.cloudScattering.

The same method can be used to calculate the wide angle scattering with bragg peaks using larger scattering vectors.

Examples

A hollow sphere cut to a wedge.

import jscatter as js
import numpy as np
grid= js.lattice.scLattice(1/2.,2*8)
grid.inSphere(6)
grid.inSphere(-4)
grid.limit2Cube(6,6,6)
grid.planeSide([1,1,1])
grid.planeSide([1,-1,-1])
grid.show()

q=js.loglist(0.01,5,300)
ffe=js.ff.cloudScattering(q,grid.points,relError=50,rms=0.1)
p=js.grace()
p.plot(ffe)

A comparison of sc, bcc and fcc nanoparticles (takes a while )

import jscatter as js
import numpy as np
q=js.loglist(0.01,35,1500)
q=np.r_[js.loglist(0.01,3,200),3:40:800j]
unitcelllength=1.5
N=8

scgrid= js.lattice.scLattice(unitcelllength,N)
sc=js.ff.cloudScattering(q,scgrid.points,relError=50,rms=0.05)
bccgrid= js.lattice.bccLattice(unitcelllength,N)
bcc=js.ff.cloudScattering(q,bccgrid.points,relError=50,rms=0.05)
fccgrid= js.lattice.fccLattice(unitcelllength,N)
fcc=js.ff.cloudScattering(q,fccgrid.points,relError=50,rms=0.05)

p=js.grace(1.5,1)
# smooth with Gaussian to include instrument resolution
p.plot(sc.X,js.formel.smooth(sc,10, window='gaussian'),legend='sc')
p.plot(bcc.X,js.formel.smooth(bcc,10, window='gaussian'),legend='bcc')
p.plot(fcc.X,js.formel.smooth(fcc,10, window='gaussian'),legend='fcc')

q=q=js.loglist(1,35,100)
p.plot(q,(1-np.exp(-q*q*0.05**2))/scgrid.shape[0],li=1,sy=0,le='sc diffusive')
p.plot(q,(1-np.exp(-q*q*0.05**2))/bccgrid.shape[0],li=2,sy=0,le='bcc diffusive')
p.plot(q,(1-np.exp(-q*q*0.05**2))/fccgrid.shape[0],li=3,sy=0,le='fcc diffusive')

p.title('Comparison sc, bcc, fcc lattice for a nano cube')
p.yaxis(scale='l',label='I(Q)')
p.xaxis(scale='l',label='Q / A\S-1')
p.legend(x=0.03,y=0.001,charsize=1.5)
p.text('cube formfactor',x=0.02,y=0.05,charsize=1.4)
p.text('Bragg peaks',x=4,y=0.05,charsize=1.4)
p.text('diffusive scattering',x=4,y=1e-6,charsize=1.4)