download the cu.py python script and the copper.cif file. Put those files in the same folder. You can run your first MsSpec calculation by typing in a terminal:
+
$pythoncu.py
+
+
+
Here is the content of the script file:
1fromase.ioimportread2frommsspec.calculatorimportMSSPEC3
@@ -816,12 +821,14 @@ Building atomic systems, structures… is pretty straightforward:
Based on the previous *.cif file, create a new cluster without the deepest plane and run the same calculation for the same emitter
Note
+
Use the cluster.edit() method to interactively remove atoms…
As the cluster will contain fewer atoms, the emitter index will be different
MsSpec is a Fortran code with two components: Phagen (Written by R. Natoli) and Spec (written by D. Sébilleau). Phagen computes the phase shifts of the electronic wave propagating in the matter on a spherical harmonics basis. Spec uses those phase shifts to compute the multiple scattering process and simulate the intensity of different electronic spectroscopies.
+
In the most recent version of MsSpec, the program is interfaced with python (https://msspec.cnrs.fr/), allowing for much more flexibility and interplay with other simulation techniques.
ASE is a set of tools and Python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations.
+Building atomic systems, structures… is pretty straightforward:
+
+
+
# To build a molecule with ASE
+fromase.buildimportmolecule
+# To view
+fromase.visualizeimportview
+
+# Create a water molecule
+water=molecule('H2O')
+# Display it
+view(water)
+
MsSpec can simulate different electronic spectroscopies like PED, AED, LEED, EXAFS, APECS and more will be included in the forthcoming version. However, it is really well-suited for PhotoElectron Diffraction simulation, and the python interface is only fully available for it at the moment. Since PED covers all the MsSpec features and concepts, we will focus on this technique.
+
There are typically 3 steps to follow to get a result with MsSpec:
download the cu.py python script and the copper.cif file. Put those files in the same folder. You can run your first MsSpec calculation by typing in a terminal:
9# The "emitter" atom is located in the middle of the 3rd plane
+10cluster.emitter=10
+11
+12# Create a "calculator"
+13calc=MSSPEC(spectroscopy='PED',algorithm='inversion')
+14calc.set_atoms(cluster)
+15
+16data=calc.get_theta_scan(level='2p3/2')
+17
+18# Plot the result with the interactive GUI
+19data.view()
+20
+21# Or plot using matplotlib directly
+22frommatplotlibimportpyplotasplt
+23data[0].views[0].plot()
+24plt.show()
+
Based on the previous *.cif file, create a new cluster without the deepest plane and run the same calculation for the same emitter
+
+
Note
+
Use the cluster.edit() method to interactively remove atoms…
+
As the cluster will contain fewer atoms, the emitter index will be different
+
+
What do you conclude ?
+
+
+
The number of atoms used for the calculation greatly impact the calculation time and memory. Most of the time, a cluster is shaped as an hemisphere to minimize the number of atoms to take into account
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity02/Activity02.html b/msspecbook/_build/html/Activity02/Activity02.html
index 3bc9efd..c5f718b 100644
--- a/msspecbook/_build/html/Activity02/Activity02.html
+++ b/msspecbook/_build/html/Activity02/Activity02.html
@@ -32,7 +32,7 @@
-
+
@@ -381,7 +381,7 @@ The idea is to use low energy photoelectron diffraction to see the substitution
Let’s start by building the cluster. You can copy/paste directly the code from this page to your text editor or you can download the script SbAg.py. You will also need the data.txt file.
1fromase.buildimportbulk 2fromase.visualizeimportview 3
@@ -1409,7 +1409,8 @@ The idea is to use low energy photoelectron diffraction to see the substitution
To model a spectroscopy experiment, some parameters need to be correctly defined. In MsSpec, parameters are grouped in different categories (detector_parameters, source_parameters, calculation_parameters…). Each category is an attribute of your calculator object and contains different parameters.
+For example, to define the angle of the incoming light with respect to the sample normal direction, you will use
+
# (assuming your calculator variable is calc)
+# e.g: Incoming X-Ray light is 30° from the sample normal
+calc.source_parameters.theta=30
+
+
+
+
Sb-induced smooth growth of Ag on Ag(111) example#
+
To see how some parameters - not related to the cluster shape - may change the results, we will look at the effect of two parameters:
+
+
The source direction
+
The inner potential of the sample
+
+
The inner potential is material specific. It will add to the photoelectron kinetic energy inside the material. When the photoelectron escapes the sample, this internal potential is missing and this will create an energy step that will act as a refraction for the photoelectron intensity. The effect will be significant for large polar angles and for small kinetic energy of the photoelectron.
+
Let’s look at the effect of those parameters on the following example.
+The idea is to use low energy photoelectron diffraction to see the substitution of Ag by Sb atoms on the surface plane.
Let’s start by building the cluster. You can copy/paste directly the code from this page to your text editor or you can download the script SbAg.py. You will also need the data.txt file.
+
1fromase.buildimportbulk
+ 2fromase.visualizeimportview
+ 3
+ 4frommsspec.calculatorimportMSSPEC
+ 5frommsspec.utilsimporthemispherical_cluster,get_atom_index,cut_plane
+ 6importnumpyasnp
+ 7frommatplotlibimportpyplotasplt
+ 8
+ 9# Create the silver cell
+10Ag=bulk('Ag',cubic=True)
+11# Orientate the cell in the [111] direction
+12Ag.rotate((1,1,1),(0,0,1),rotate_cell=True)
+13# Align the azimuth to match experimental reference
+14Ag.rotate(15,'z',rotate_cell=True)
+15
+16# Create a cluster
+17cluster=hemispherical_cluster(Ag,diameter=20,emitter_plane=0)
+18cluster=cut_plane(cluster,z=-4.8)
+19cluster.emitter=get_atom_index(cluster,0,0,0)
+20cluster[cluster.emitter].symbol='Sb'
+
Azimuthal (\(\phi\)) scan for Sb(4d) emitter in the top layer of Ag(111) at 45 eV kinetic energy.#
+
+
+
The agreement is not satisfactory although most of the features may be identified.
+
+
+
+
Try to change the source direction and the inner potential of Ag to better match the experiment…
+
+
Note
+
The cluster is smaller than it should for size convergence, but the calculation would take too much memory for this example
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity03/Activity03.html b/msspecbook/_build/html/Activity03/Activity03.html
index 3f0f55d..5f3b12c 100644
--- a/msspecbook/_build/html/Activity03/Activity03.html
+++ b/msspecbook/_build/html/Activity03/Activity03.html
@@ -32,7 +32,7 @@
-
+
@@ -511,7 +511,8 @@ document.write(`
How large is the backscattering factor of Rhodium with respect to that of Oxygen ?
-
+
+
Solution…
# Compute the scattering factordata=calc.get_scattering_factors(kinetic_energy=723)
@@ -543,7 +544,7 @@ document.write(`
-
Complete the script below to compute the (\(\theta,\phi\)) scan of the photodiffraction of O(1s) adsorbed on a fcc site on Rh(111) surface.
+
Complete the script below to compute the (\(\theta,\phi\)) scan of the photodiffraction of O(1s) adsorbed on a fcc site on Rh(111) surface.
1frommsspec.calculatorimportMSSPEC 2fromase.buildimportfcc111,add_adsorbate 3importnumpyasnp
@@ -573,7 +574,8 @@ document.write(`
What is the bond length difference between to intensity maxima ?
Activity 3: Adsorbates and the single scattering approach
+
+
+
+
+
+
Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
Activity 3: Adsorbates and the single scattering approach#
+
Photoelectron diffraction is widely used to study the adsorption of atoms or molecules on a crystalline surface. Photoelectrons from adsorbates are scattered by the underlying surface, carrying information about the adsorption site, bond length and/or molecule orientation…. Thanks to a simulation, such information becomes quantitative with a high degree of accuracy.
+
Calculations of the multiple scattering using matrix inversion have the great advantage of being exact, including all scattering paths. On the other hand, memory consumption soon becomes a problem as the kinetic energy and number of atoms to be considered increase. As an approximation, it is possible to only consider a single scattering from the emitter to any atom in the cluster. This approximation is extremely computationally fast and can give satisfactory results for adsorbates. We’ll see later that this approach is rather too simplistic for most cases.
In a paper published in 1998, T. Gerber et al. used the quite high backscattering factor of Rhodium atoms to probe the distance of Oxygen atoms adsorbed on a Rhodium surface. Some electrons coming from Oxygen atoms are ejected toward the Rhodium surface. They are then backscattered and interfere with the direct signal comming from Oxygen atoms (see the figure below). They demonstrated both experimentally and numerically with a sinle scattering computation that this lead to a very accurate probe of adsorbed species that can be sensitive to bond length changes of the order of \(\pm 0.02 \mathring{A}\).
To illustrate that photoelectrons emitted by Oxygen adsorbates towards the Rhodium surface can be backscattered, we will start by computing the scattering factor for both O and Rh atoms.
+
+
+
+
By using the Atoms class of the ase package, try to build a O-Rh chain where atoms are 4 Å apart. Here is the begining of the script. Try to complete the line of code and view your two-atoms chain.
+
fromaseimportAtoms
+fromase.visualizeimportview
+
+# Create an atomic chain O-Rh
+cluster=Atoms(...# Fill this line
+
We will compute for different values of the adsorption height \(z_0\).
+
+
+
+
Complete the script below to compute the (\(\theta,\phi\)) scan of the photodiffraction of O(1s) adsorbed on a fcc site on Rh(111) surface.
+
1frommsspec.calculatorimportMSSPEC
+ 2fromase.buildimportfcc111,add_adsorbate
+ 3importnumpyasnp
+ 4
+ 5data=None
+ 6all_z=...# -> Define a list of z values for the adsorbate
+ 7
+ 8for...# -> Complete this for-loop over z values
+ 9# construct the cluster
+10cluster=fcc111('Rh',size=(2,2,1))
+11cluster.pop(3)
+12add_adsorbate(...# -> Put the oxygen atom on the fcc site
+13cluster.emitter=...# -> Oxygen is the last atom we added, so the indice is...
+14
+15# Define a calculator for single scattering calculations
+16calc=MSSPEC(spectroscopy='PED',algorithm='expansion')
+17calc.calculation_parameters.scattering_order=1
+18calc.set_atoms(cluster)
+19
+20# Compute
+21data=calc.get_theta_phi_scan(level='1s',kinetic_energy=723,data=data)
+22
+23data.view()
+
+
+
As proposed in the comments, add a loop to vary the adsorption height of Oxygen between 1.10 and 1.65 Å.
+What is the bond length difference between to intensity maxima ?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity04/Activity04.html b/msspecbook/_build/html/Activity04/Activity04.html
index 71c0c1e..ee08018 100644
--- a/msspecbook/_build/html/Activity04/Activity04.html
+++ b/msspecbook/_build/html/Activity04/Activity04.html
@@ -32,7 +32,7 @@
-
+
@@ -357,9 +357,9 @@ document.write(`
Activity 4: From single scattering to multiple scattering#
-
In the previous activity, we saw that simple single scattering calculations (SSC) can be used to simulate photodiffraction diagrams with good accuracy. The approximation works fine when the emitting atom is very close to the surface.
+
In the previous activity, we saw that simple single scattering calculations (SSC) can be used to simulate photodiffraction diagrams with good accuracy. The approximation works fine when the emitting atom is very close to the surface.
However, the SSC approach is no longer suitable for deeper emitter atoms, where multiple scattering effects come into play. In this activity, we will focus on a major consequence of multiple scattering: the defocusing effect.
-
The defocusing effect is presented in the figure below for a chain of nickel atoms. Although purely illustrative, understanding multiple scattering in atomic chains is fundamental because they are found in many situations, such as in particular directions of a crystal or in molecules of various lengths.
+
The defocusing effect is presented in the figure below for a chain of nickel atoms. Although purely illustrative, understanding multiple scattering in atomic chains is fundamental because they are found in many situations, such as in particular directions of a crystal or in molecules of various lengths.
@@ -367,7 +367,7 @@ However, the SSC approach is no longer suitable for deeper emitter atoms, where
Fig. 10 The defocusing effect dur to multiple scattering in an atomic chain of Ni atoms.#
-
In 1989, M.-L Xu, J.J. Barton and M.A. Van Hove studied these multiple scattering effects on atomic chains (see their paper below).
+
In 1989, M.-L Xu, J.J. Barton and M.A. Van Hove studied these multiple scattering effects on atomic chains (see their paper below).
In the spirit of figure 3 of their paper, we will create 3 atomic chains of Ni atoms (2, 3 and 5 atoms) tilted by 45° and we will compare the intensity of the forward scattering peak for single scattering and for full multiple scattering.
See also
@@ -381,7 +381,7 @@ In the spirit of figure 3 of their paper, we will create 3 atomic chains of Ni a
Start by creating a simple chain of 2 Ni atoms: an emitter and a scatterer in the [101] direction.
Tip
-
Nickel is fcc with lattice parameter \(a\)=3.499 Å. Use the Atoms class of ase like in the previous activity…
+
Nickel is fcc with lattice parameter \(a\)=3.499 Å. Use the Atoms class of ase like in the previous activity…
if you need help to start…
frommsspec.calculatorimportMSSPEC
@@ -441,6 +441,32 @@ In the spirit of figure 3 of their paper, we will create 3 atomic chains of Ni a
Fig. 12 Polar scan of a Ni chain of 2-5 atoms for single and full mutliple scattering.#
+
1frommsspec.calculatorimportMSSPEC
+ 2fromaseimportAtoms
+ 3importnumpyasnp
+ 4
+ 5symbol='Ni'# The kind of atom for the chain
+ 6a=3.499*np.sqrt(2)/2# The distance bewteen 2 atoms
+ 7# in [101] direction
+ 8
+ 9chain=Atoms(symbol)
+10data=None
+11foriinrange(1,5):
+12atom=Atoms(symbol,[[0,0,i*a]])
+13atom.rotate('y',45)
+14chain+=atom
+15
+16calc=MSSPEC(spectroscopy='PED',algorithm='inversion')
+17calc.calculation_parameters.scattering_order=1
+18
+19chain.emitter=0
+20calc.set_atoms(chain)
+21
+22data=calc.get_theta_scan(level='3s',theta=np.arange(0,80,0.5),data=data)
+23data[-1].views[0].set_plot_options(ylim=[0,0.045])
+24data.view()
+
Activity 4: From single scattering to multiple scattering
+
+
+
+
+
+
Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
Activity 4: From single scattering to multiple scattering#
+
In the previous activity, we saw that simple single scattering calculations (SSC) can be used to simulate photodiffraction diagrams with good accuracy. The approximation works fine when the emitting atom is very close to the surface.
+However, the SSC approach is no longer suitable for deeper emitter atoms, where multiple scattering effects come into play. In this activity, we will focus on a major consequence of multiple scattering: the defocusing effect.
+
The defocusing effect is presented in the figure below for a chain of nickel atoms. Although purely illustrative, understanding multiple scattering in atomic chains is fundamental because they are found in many situations, such as in particular directions of a crystal or in molecules of various lengths.
The defocusing effect dur to multiple scattering in an atomic chain of Ni atoms.#
+
+
+
In 1989, M.-L Xu, J.J. Barton and M.A. Van Hove studied these multiple scattering effects on atomic chains (see their paper below).
+In the spirit of figure 3 of their paper, we will create 3 atomic chains of Ni atoms (2, 3 and 5 atoms) tilted by 45° and we will compare the intensity of the forward scattering peak for single scattering and for full multiple scattering.
Start by creating a simple chain of 2 Ni atoms: an emitter and a scatterer in the [101] direction.
+
+
Tip
+
Nickel is fcc with lattice parameter \(a\)=3.499 Å. Use the Atoms class of ase like in the previous activity…
+
+
if you need help to start…
+
frommsspec.calculatorimportMSSPEC
+fromaseimportAtoms
+
+symbol=...# The kind of atom for the chain
+a=...# The distance bewteen 2 atoms
+ # in [101] direction
+
+chain=Atoms(...,positions=[...])
+chain.rotate(...)
+chain.edit()
+
+
+
+
+
+
+
+
+
+
Create an MSSPEC calculator with expansion algortithm and set the scattering_order=1 to compute a polar scan of the Ni(3s) in single scattering. How is varying the height of the peak at 45° (along the chain) if you increase the number of atoms in the chain ?
+
Repeat the same experiment with inversion algorithm for having the full multiple scattering result. What do you observe ?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity05/Activity05.html b/msspecbook/_build/html/Activity05/Activity05.html
index 48aa649..135c185 100644
--- a/msspecbook/_build/html/Activity05/Activity05.html
+++ b/msspecbook/_build/html/Activity05/Activity05.html
@@ -32,7 +32,7 @@
-
+
@@ -427,23 +427,23 @@ document.write(`
-
Complete the code snipet provided below to create a small TiSe2 cluster with Ti emitter in the 2nd plane:
+
Complete the code snipet provided below (or here) to create a small TiSe2 cluster with Ti emitter in the 2nd plane:
1fromase.buildimportmx2 2fromase.visualizeimportview 3frommsspec.calculatorimportMSSPEC 4frommsspec.utilsimporthemispherical_cluster,get_atom_index 5 6# Some usefull constants (a, c, d, D) for defining the structure
- 7a=...
- 8
+ 7a=...
+ 8 9# Create the TiSe2 trilayer10# use ase help for this function
-11TiSe2=mx2(formula=...)
-12
+11TiSe2=mx2(formula=...)
+1213# The preious cell is 2D, let's define the c-axis to take into account 14# the Van der Waals gap between trilayers
-15TiSe2.cell[2]=[0,0,...]
-16
+15TiSe2.cell[2]=[0,0,...]
+1617# To be aligned like in the paper18TiSe2.rotate(60,'z',rotate_cell=True)19
@@ -453,54 +453,37 @@ document.write(`
23foriinrange(3):24TiSe2[i].tag=i25
-26cluster=hemispherical_cluster(TiSe2,emitter_tag=...,emitter_plane=...,planes=5)
-27cluster.emitter=get_atom_index(cluster,0,0,0)
+26cluster=hemispherical_cluster(TiSe2,emitter_tag=...,emitter_plane=...,planes=5)
+27cluster.emitter=get_atom_index(cluster,0,0,0)2829view(cluster)
-30
fromase.buildimportmx2
-fromase.visualizeimportview
-frommsspec.calculatorimportMSSPEC
-frommsspec.utilsimporthemispherical_cluster,get_atom_index
-
-# Some usefull constants (a, c, d, D) for defining the structure
-a=3.535;c=6.004;d=3.450;D=2.554
-
-# Create the TiSe2 trilayer
-# use ase help for this function
-TiSe2=mx2(formula='TiSe2',kind='1T',a=a,thickness=d,size=(1,1,1),vacuum=None)
-
-# The preious cell is 2D, let's define the c-axis to take into account
-# the Van der Waals gap between trilayers
-TiSe2.cell[2]=[0,0,c]
-
-# To be aligned like in the paper
-TiSe2.rotate(60,'z',rotate_cell=True)
-
-# Since the material is multi-elements, "tag" each inequivalent atom
-# of the unit cell with a number. The "Ti" atom is tagged 0 and "Se"
-# atoms are 1 and 2.
-foriinrange(3):
- TiSe2[i].tag=i
-
-cluster=hemispherical_cluster(TiSe2,emitter_tag=0,emitter_plane=1,planes=5)
-cluster.emitter=get_atom_index(cluster,0,0,0)
+
Activity 5: Multiple scattering in the forward scattering regime
+
+
+
+
+
+
Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
Activity 5: Multiple scattering in the forward scattering regime#
+
In photoelectron diffraction, it is well known that for high photoelectron kinetic energy (typically > 900 eV), the scattering factor is strongly peaked in the forward direction. It means that photoelectrons are almost not deviated after a scattering event.
+
Peaks of intentisity are then usually observed for dense atomic directions of the sample. This is the forward scattering approximation.
+
For such high kinetic energy, multiple scattering is needed to accurately describe the measured intensity, but the matrix inversion algorithm cannot be used since the memory needed for storing the matrix itself would be generally too large. The matrix will contain
+\((N \times (L_{max}+1)^2)^2\) elements of complex type with double precision (64 bits) where \(N\) is the number of atoms and \(L_{max}\) is the number of spherical harmonics used to expand the electron wave around each atomic center. As the kinetic energy increases, the mean free path (MFP) of the photoelectron is larger and the number of atoms in the cluster has to be greater. Lmax also increases with the kinetic energy.
+
+
+
+
Try to evaluate how much memory you would need for this matrix for a hemispherical cluster of copper 15 angströms thick (1 MFP) for \(L_{max} = 25\) ?
importnumpyasnp
+
+# lattice constant of fcc copper
+a=3.6
+# radius of the cluster
+r=15
+# volume of the cluster
+V=.5*(4/3)*np.pi*r**3
+# volume of the cell
+v=a**3
+# number of atoms in the unit cell
+n=4
+# number of atoms in the cluster
+N=int(V/v*n)
+
+Lmax=25
+M=(N*(Lmax+1)**2)**2*2*64/8
+print(f"{N:d} atoms, {M/1e12:.3f} TB")
+
+
+
+
+
606 atoms, 2.685 TB
+
+
+
+
+
+
This is too much memory. We will use another algorithm available in MsSpec: The Rehr-Albers series expansion. We already used that algorithm in activity 3 for the single scattering approach. But this time, we will explore a bit more the effect of the scattering order > 1
Complete the code snipet provided below (or here) to create a small TiSe2 cluster with Ti emitter in the 2nd plane:
+
1fromase.buildimportmx2
+ 2fromase.visualizeimportview
+ 3frommsspec.calculatorimportMSSPEC
+ 4frommsspec.utilsimporthemispherical_cluster,get_atom_index
+ 5
+ 6# Some usefull constants (a, c, d, D) for defining the structure
+ 7a=...
+ 8
+ 9# Create the TiSe2 trilayer
+10# use ase help for this function
+11TiSe2=mx2(formula=...)
+12
+13# The preious cell is 2D, let's define the c-axis to take into account
+14# the Van der Waals gap between trilayers
+15TiSe2.cell[2]=[0,0,...]
+16
+17# To be aligned like in the paper
+18TiSe2.rotate(60,'z',rotate_cell=True)
+19
+20# Since the material is multi-elements, "tag" each inequivalent atom
+21# of the unit cell with a number. The "Ti" atom is tagged 0 and "Se"
+22# atoms are 1 and 2.
+23foriinrange(3):
+24TiSe2[i].tag=i
+25
+26cluster=hemispherical_cluster(TiSe2,emitter_tag=...,emitter_plane=...,planes=5)
+27cluster.emitter=get_atom_index(cluster,0,0,0)
+28
+29view(cluster)
+
Use the line belows to create a calculator and compute a \(\theta\)-\(\phi\) scan of the Ti(2p)
+
# Create a calculator with Rehr-Albers series expansion algorithm
+calc=MSSPEC(spectroscopy='PED',algorithm='expansion')
+calc.set_atoms(cluster)
+
+data=None
+forndifinrange(1,4):
+ calc.calculation_parameters.scattering_order=ndif
+ data=calc.get_theta_phi_scan(level='2p',kinetic_energy=1030,data=data)
+
+data.view()
+
+
+
+
+
+
Compute a scan for an emitter in the first trilayer and in the second trilayer for scattering orders from 1 (single scattering) to 3 in order to complete the figure below.
+What do you conclude about the value of the calc.calculation_parameters.scattering_order ?
\(\theta\)-\(\phi\) scan of Ti(2p) at 1030 eV kinetic energy for an emitter in the first trilayer (left column) and in the second trilayer (right column). Each row correspond to a growing value for the calc.calculation_parameters.scattering_order parameter (from 1 to 5).#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity06/Activity06.html b/msspecbook/_build/html/Activity06/Activity06.html
index 10945cf..f0f55fe 100644
--- a/msspecbook/_build/html/Activity06/Activity06.html
+++ b/msspecbook/_build/html/Activity06/Activity06.html
@@ -32,7 +32,7 @@
-
+
@@ -377,7 +377,7 @@ document.write(`
The create_clusters function will build clusters with increasing number of planes, with the emitter being in the deepest plane for each cluster.
The function compute will compute the azimuthal scan for a given cluster.
-
The analysis function will sum the intensity from each plane for a given temperature. This will be the substrate total signal (more on this in the Activity 7: Large clusters and path filtering section). The function will also compute the anisotropy (equation (1)).
+
The analysis function will sum the intensity from each plane for a given temperature. This will be the substrate total signal (more on this in the Activity 7: Large clusters and path filtering section). The function will also compute the anisotropy (equation ()).
MsSpec can introduce temperature effects in two ways: either by using the Debye Waller model or by doing an average over the phase shifts. We will explore the latter in this example.
Regardless of the option chosen to model temperature effects, we need to define mean square displacement (MSD) values of the atoms in our cluster. We will use the Debye model for this. The MSD is defined as follows:
@@ -389,7 +389,7 @@ document.write(`
-
Fig. 16 Variation of MSD for copper versus temperature using equation (2)#
+
Fig. 16 Variation of MSD for copper versus temperature using equation ()#
@@ -397,7 +397,7 @@ document.write(`
With the help of the MsSpec documentation and the second paragraph p6791 of the article cited above,
-complete the hilighted lines in the following script to compute the anisotropy of Cu(2p) \(\phi\)-scans for polar angle \(\theta\)=45° and 83°.
+complete the hilighted lines in the following script to compute the anisotropy of Cu(2p) \(\phi\)-scans for polar angle \(\theta\)=45° and 83°.
How is varying the anisotropy versus the temperature. How can you qualitatively explain this variation ?
1fromase.buildimportbulk 2importnumpyasnp
@@ -529,7 +529,8 @@ complete the hilighted lines in the following script to compute the anisotropy o
In this example, we will look at the effects of the temperature on the X-Ray photoelectron diffraction from a copper substrate. We will base our python script on a paper published in 1986 by R. Trehan and S. Fadley. In their work, they performed azimutal scans of a copper(001) surface at 2 different polar angles: one at grazing incidence and one at 45° for incresing temperatures from 298K to roughly 1000K.
+
For each azimutal scan, they looked at the anisotropy of the signal, that is:
This value is representative of how clear are the modulations of the signal. They also proposed single scattering calculations that reproduced well these results.
+
We will reproduce this kind of calculations to introduce the parameters that control the vibrational damping.
Since we want to distinguish between bulk (low polar angles, \(\theta = 45°\) in the paper) and surface effects (large polar angles, \(\theta = 83°\) in the paper), we need to compute scans for different emitters and different depths in the cluster.
+
The script contains 3 functions:
+
+
The create_clusters function will build clusters with increasing number of planes, with the emitter being in the deepest plane for each cluster.
+
The function compute will compute the azimuthal scan for a given cluster.
+
The analysis function will sum the intensity from each plane for a given temperature. This will be the substrate total signal (more on this in the Activity 7: Large clusters and path filtering section). The function will also compute the anisotropy (equation ()).
+
+
MsSpec can introduce temperature effects in two ways: either by using the Debye Waller model or by doing an average over the phase shifts. We will explore the latter in this example.
+
Regardless of the option chosen to model temperature effects, we need to define mean square displacement (MSD) values of the atoms in our cluster. We will use the Debye model for this. The MSD is defined as follows:
where \(\hbar\) is the reduce Planck’s constant, \(T\) is the temperature, \(M\) is the mass of the atom, \(k_B\) is the Boltzmann’s constant and \(\Theta_D\) is the Debye temperature of the sample.
+
To get an idea of the typical order of magnitude for MSD, the figure below plots the values of MSD for copper for temperatures ranging from 300 K to 1000 K.
Variation of MSD for copper versus temperature using equation ()#
+
+
+
+
+
+
With the help of the MsSpec documentation and the second paragraph p6791 of the article cited above,
+complete the hilighted lines in the following script to compute the anisotropy of Cu(2p) \(\phi\)-scans for polar angle \(\theta\)=45° and 83°.
+
How is varying the anisotropy versus the temperature. How can you qualitatively explain this variation ?
+
1fromase.buildimportbulk
+ 2importnumpyasnp
+ 3
+ 4frommsspec.calculatorimportMSSPEC,XRaySource
+ 5frommsspec.utilsimporthemispherical_cluster,get_atom_index
+ 6
+ 7defcreate_clusters(nplanes=3):
+ 8copper=bulk('Cu',a=3.6,cubic=True)
+ 9clusters=[]
+ 10foremitter_planeinrange(nplanes):
+ 11cluster=hemispherical_cluster(copper,
+ 12emitter_plane=emitter_plane,
+ 13planes=emitter_plane+1,
+ 14diameter=27,
+ 15shape='cylindrical')
+ 16cluster.absorber=get_atom_index(cluster,0,0,0)
+ 17# This is how to store extra information with your cluster
+ 18cluster.info.update({
+ 19'emitter_plane':emitter_plane,
+ 20})
+ 21clusters.append(cluster)
+ 22returnclusters
+ 23
+ 24
+ 25defcompute(clusters,all_theta=[45.,83.],
+ 26all_T=np.arange(300.,1000.,400.)):
+ 27data=None
+ 28forclusterinclusters:
+ 29# Retrieve emitter's plane from cluster object
+ 30plane=cluster.info['emitter_plane']
+ 31
+ 32calc=MSSPEC(spectroscopy='PED',algorithm='expansion')
+ 33calc.source_parameters.energy=XRaySource.AL_KALPHA
+ 34calc.muffintin_parameters.interstitial_potential=14.1
+ 35
+ 36# In simple scattering, it is common practice to use a real potential and
+ 37# manually define a mean free path arbitrarily lower than the actual physical
+ 38# value in an attempt to reproduce multiple scattering effects.
+ 39calc.tmatrix_parameters.exchange_correlation='x_alpha_real'
+ 40calc.calculation_parameters.mean_free_path=...# -> half of the mean free
+ 41# path (see p6785)
+ 42# Parameters for temperature effects
+ 43calc.calculation_parameters.vibrational_damping='averaged_tl'
+ 44calc.calculation_parameters.use_debye_model=.....# Use the MsSpec help
+ 45calc.calculation_parameters.debye_temperature=...# and p6791 of the paper
+ 46calc.calculation_parameters.vibration_scaling=...# -> How much more do
+ 47# surface atoms vibrate
+ 48# than bulk atoms?
+ 49calc.detector_parameters.average_sampling='low'
+ 50calc.detector_parameters.angular_acceptance=5.7
+ 51
+ 52calc.calculation_parameters.scattering_order=1
+ 53
+ 54
+ 55forTinall_T:
+ 56# Define the sample temperature
+ 57calc.calculation_parameters.temperature=T
+ 58# Set the atoms and compute an azimuthal scan
+ 59calc.set_atoms(cluster)
+ 60data=calc.get_phi_scan(level='2p',theta=all_theta,
+ 61phi=np.linspace(0,100,51),
+ 62kinetic_energy=560,data=data)
+ 63# Small changes to add some details in both the title of the dataset
+ 64# and the figure
+ 65view=data[-1].views[-1]
+ 66t=view._plotopts['title']+f" (plane #{plane:d}, T={T:.0f} K)"
+ 67data[-1].title=t
+ 68view.set_plot_options(autoscale=True,title=t)
+ 69calc.shutdown()
+ 70returndata
+ 71
+ 72
+ 73defanalysis(data,all_theta,all_T,nplanes):
+ 74# Sum cross_section for all emitter's plane at a given T
+ 75# Compute the anisotropy
+ 76results=dict.fromkeys(all_T,[])
+ 77anisotropy=[]
+ 78fordsetindata:
+ 79# Retrieve temperature
+ 80T=float(dset.get_parameter('CalculationParameters','temperature')['value'])
+ 81# Update the sum in results
+ 82iflen(results[T])==0:
+ 83results[T]=dset.cross_section
+ 84else:
+ 85results[T]+=dset.cross_section
+ 86
+ 87anisotropy_dset=data.add_dset("Anisotropies")
+ 88anisotropy_dset.add_columns(temperature=all_T)
+ 89forthetainall_theta:
+ 90col_name=f"theta{theta:.0f}"
+ 91col_values=[]
+ 92i=np.where(dset.theta==theta)[0]
+ 93forTinall_T:
+ 94cs=results[T][i]
+ 95Imax=np.max(cs)
+ 96Imin=np.min(cs)
+ 97A=(Imax-Imin)/Imax
+ 98col_values.append(A)
+ 99anisotropy_dset.add_columns(**{col_name:col_values/np.max(col_values)})
+100
+101
+102anisotropy_view=anisotropy_dset.add_view('Anisotropies',
+103title='Relative anisotropies for Cu(2p)',
+104marker='o',
+105xlabel='T (K)',
+106ylabel=r'$\frac{\Delta I / I_{max}(T)}{\Delta I_{300}'
+107r'/ I_{max}(300)} (\%)$',
+108autoscale=True)
+109forthetainall_theta:
+110col_name=f"theta{theta:.0f}"
+111anisotropy_view.select('temperature',col_name,
+112legend=r'$\theta = {:.0f} \degree$'.format(theta))
+113
+114returndata
+115
+116
+117
+118if__name__=="__main__":
+119nplanes=4
+120all_theta=np.array([45,83])
+121all_theta=np.array([300.,1000.])
+122
+123clusters=create_clusters(nplanes=nplanes)
+124data=compute(clusters,all_T=all_T,all_theta=all_theta)
+125data=analysis(data,all_T=all_T,all_theta=all_theta,nplanes=nplanes)
+126data.view()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity07/Activity07.html b/msspecbook/_build/html/Activity07/Activity07.html
index fe97d2f..16825ee 100644
--- a/msspecbook/_build/html/Activity07/Activity07.html
+++ b/msspecbook/_build/html/Activity07/Activity07.html
@@ -32,7 +32,7 @@
-
+
@@ -369,7 +369,7 @@ document.write(`
Quiz
Create a cluster of Si(001) with the emitter in the subsurface, 40 Å diameter with 2 planes (since atoms below the emitter can be ignored at high kinetic energies).
The following script is almost completed, try to define path filtering options (no backscattering, accept all paths with forward angles < 40° and reject paths longer than the diameter of the cluster).
+
The following script is almost completed, try to define path filtering options (no backscattering, accept all paths with forward angles < 40° and reject paths longer than the diameter of the cluster).
So far you have seen that multiple scattering calculations with MsSpec can use two different algorithms: matrix inversion or Rehr Albers series expansion. When matrix inversion becomes impossible because the kinetic energy is too high and the number of atoms is too large, serial expansion is the alternative. This algorithm requires very little memory but it processes the scattering paths sequentially, which can lead to very long calculation times.
+
In this activity, we will explore how to configure MsSpec to reduce this calculation time to compute the signal from a deep emitter in Si(001).
To fix the idea, we will first evaluate how many scattering paths we need to compute for an emitter in the subsurface (2nd plane) or in the bulk (7th plane) of a Si(001) cluster.
+
+
+
+
Create a cluster of Si(001) with the emitter in the subsurface, 40 Å diameter with 2 planes (since atoms below the emitter can be ignored at high kinetic energies).
As you may expect, not all paths contribute significantly to the total intensity. This is why we can filter out some scattering paths and drastically reduce the computation time. MsSpec offers several filters for this. The 3 most common filters are:
+
+
the forward_scattering filter which allows all paths where each scattering angle is within a cone of defined aperture
+
the backward_scattering filter which is similar to the previous one but for backscattering direction
+
the distance filter which rejects all paths longer than a threshold distance
+
+
The following figure illustrate the effect of theses filters on scattering paths
Some examples of scattering paths with forward_scattering, backward_scattering and distance filters selected. The accepted forward angle is 45°, the accepted backscattering angle is 20° and the threshold distance is \(6a_0\) where \(a_0\) is the lattice parameter. Note that the yellow path is rejected but if the off_cone_events option is set to a value > 1, then it could have been accepted.#
The following script is almost completed, try to define path filtering options (no backscattering, accept all paths with forward angles < 40° and reject paths longer than the diameter of the cluster).
+
1# coding: utf8
+ 2
+ 3importnumpyasnp
+ 4fromase.buildimportbulk
+ 5
+ 6frommsspec.calculatorimportMSSPEC,XRaySource
+ 7frommsspec.iodataimportData
+ 8frommsspec.utilsimporthemispherical_cluster,get_atom_index
+ 9
+10
+11# Create the cluster
+12a=5.43
+13Si=bulk('Si',a=a,cubic=True)
+14cluster=hemispherical_cluster(Si,
+15diameter=30,planes=4,
+16emitter_plane=3,
+17shape='cylindrical',
+18)
+19foratomincluster:
+20atom.set('mean_square_vibration',0.006)
+21atom.set('mt_radius',1.1)
+22cluster.emitter=get_atom_index(cluster,0,0,0)
+23
+24# Create a calculator and set parameters
+25calc=MSSPEC(spectroscopy='PED',algorithm='expansion')
+26
+27calc.source_parameters.energy=XRaySource.AL_KALPHA
+28calc.source_parameters.theta=-54.7
+29calc.source_parameters.phi=90
+30calc.spectroscopy_parameters.final_state=1
+31
+32calc.calculation_parameters.scattering_order=3
+33calc.tmatrix_parameters.tl_threshold=1e-4
+34calc.calculation_parameters.vibrational_damping='averaged_tl'
+35calc.calculation_parameters.RA_cutoff=2
+36
+37# Define path filtering options such that you only
+38# accept scattering paths with a forward cone <= 40°
+39# and whose length are <= cluster diameter
+40#
+41#
+42
+43calc.set_atoms(cluster)
+44
+45# Compute and add previous data for comparison
+46data=calc.get_theta_scan(level='2p',
+47theta=np.arange(-30.,80.,0.5),
+48phi=0,
+49kinetic_energy=1382.28)
+50no_filters=Data.load('path_filtering.hdf5')
+51data[0].add_columns(**{'no_filters':no_filters[0].cross_section})
+52view=data[0].views[0]
+53view.select('theta','cross_section',index=0,legend="With path filtering")
+54view.select('theta','no_filters',legend="Without path filtering")
+55
+56data.view()
+
+
+
+
How long was your calculation ?
+
How does it compare to the calculation with all scattering paths up to order 3 ?
+
What is the proportion of scattering paths of order 3 that were actually taken into account ?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity08/Activity08.html b/msspecbook/_build/html/Activity08/Activity08.html
index 45acdc5..e85f416 100644
--- a/msspecbook/_build/html/Activity08/Activity08.html
+++ b/msspecbook/_build/html/Activity08/Activity08.html
@@ -32,7 +32,7 @@
-
+
@@ -354,14 +354,14 @@ document.write(`
Activity 8: Inequivalent emitters and the XPD of a substrate#
-
XPD can be used to study the adsorption of atoms or molecules on surfaces (Activity 3), or atomic substitutions on surfaces (Activity 2). In this case, modeling is relatively straightforward, since only one emitter atom is involved.
-
We have seen from previous examples that, for kinetic energies \(\gtrsim\) 500 eV, the use of Rehr-Albers series expansion and scattering path filtering give access to the intensity of deeper emitter atoms (Activity 7).
+
XPD can be used to study the adsorption of atoms or molecules on surfaces (Activity 3), or atomic substitutions on surfaces (Activity 2). In this case, modeling is relatively straightforward, since only one emitter atom is involved.
+
We have seen from previous examples that, for kinetic energies \(\gtrsim\) 500 eV, the use of Rehr-Albers series expansion and scattering path filtering give access to the intensity of deeper emitter atoms (Activity 7).
This is the key to computing the total photodiffraction signal of a substrate. As emitted photoelectrons originate from highly localized core levels around the atoms, the total signal corresponds to the (incoherent) sum of the intensities of all inequivalent emitters in the probed volume.
Let’s take a look at how this is done on the following example.
In this example, we will compute polar diagrams of an aluminum nitride substrate.
-
In a work published in 1999, Lebedev et al. demonstrated that Photoelectron diffraction can be used as a non invasive tool to unambiguously state the polarity of an AlN surface. Aluminium nitride cristallizes in an hexagonal cell and the authors experimentally showed that the polarity of the surface can be controlled by the annealing temperature during the growth. Both polarities are sketched in the figure below.
+
In a work published in 1999, Lebedev et al. demonstrated that Photoelectron diffraction can be used as a non invasive tool to unambiguously state the polarity of an AlN surface. Aluminium nitride cristallizes in an hexagonal cell and the authors experimentally showed that the polarity of the surface can be controlled by the annealing temperature during the growth. Both polarities are sketched in the figure below.
See also
based on this paper from V. Lebedev et al.
@@ -374,7 +374,7 @@ This is the key to computing the total photodiffraction signal of a substrat
Fig. 21 AlN hexagonal lattice. Left) N polarity with nitrogen terminated surface and AlN4 tetrahedrons pointing downward. Right) Al polarity with aluminium terminated surface and AlN4 tetrahedrons pointing upward#
-
The AlN(0001) and (00.-1) faces share the same crystallograpphic symmetry and the Al and N atoms have the same geometrical surrounding differing only in the exchange of Al and N atoms (Fig. 22).
+
The AlN(0001) and (00.-1) faces share the same crystallograpphic symmetry and the Al and N atoms have the same geometrical surrounding differing only in the exchange of Al and N atoms (Fig.%s).
It is thus expected that Al(2p) and N(1s) XPD patterns exhibit almost the same features with only small differences due to the contrast between Al and N scattering amplitudes.
The strongest differences in photoemission intensities suitable for a quick and unambiguous determination of polarity were found in the (10-10) azimuthal plane at 32° and 59° (polar scans in the inset of Fig. 22).
+
The strongest differences in photoemission intensities suitable for a quick and unambiguous determination of polarity were found in the (10-10) azimuthal plane at 32° and 59° (polar scans in the inset of Fig.%s).
These are the directions of short neighbor distances between the atoms of the same element (32°) and between Al and N atoms (58.5°), respectively.
-
Using the crystal view in Fig. 21 and assuming that we want to compute Al(2p) and N(1s) intensities for emitters located in 3 different planes to get a substrate signal. How many clusters do we need to build ?
+
Using the crystal view in Fig.%s and assuming that we want to compute Al(2p) and N(1s) intensities for emitters located in 3 different planes to get a substrate signal. How many clusters do we need to build ?
-
+
+
Solution…
@@ -401,16 +402,15 @@ This is the key to computing the total photodiffraction signal of a substrat
-
-
-
Download this script and fill in the lines indicated by the comments “FILL HERE”. Run the calculation and check that you are reproducing polar scan of Fig. 22.
+
Download this script and fill in the lines indicated by the comments “FILL HERE”. Run the calculation and check that you are reproducing polar scan of Fig.%s.
Activity 8: Inequivalent emitters and the XPD of a substrate
+
+
+
+
+
+
Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
Activity 8: Inequivalent emitters and the XPD of a substrate#
+
XPD can be used to study the adsorption of atoms or molecules on surfaces (Activity 3), or atomic substitutions on surfaces (Activity 2). In this case, modeling is relatively straightforward, since only one emitter atom is involved.
+
We have seen from previous examples that, for kinetic energies \(\gtrsim\) 500 eV, the use of Rehr-Albers series expansion and scattering path filtering give access to the intensity of deeper emitter atoms (Activity 7).
+This is the key to computing the total photodiffraction signal of a substrate. As emitted photoelectrons originate from highly localized core levels around the atoms, the total signal corresponds to the (incoherent) sum of the intensities of all inequivalent emitters in the probed volume.
+
Let’s take a look at how this is done on the following example.
In this example, we will compute polar diagrams of an aluminum nitride substrate.
+
In a work published in 1999, Lebedev et al. demonstrated that Photoelectron diffraction can be used as a non invasive tool to unambiguously state the polarity of an AlN surface. Aluminium nitride cristallizes in an hexagonal cell and the authors experimentally showed that the polarity of the surface can be controlled by the annealing temperature during the growth. Both polarities are sketched in the figure below.
AlN hexagonal lattice. Left) N polarity with nitrogen terminated surface and AlN4 tetrahedrons pointing downward. Right) Al polarity with aluminium terminated surface and AlN4 tetrahedrons pointing upward#
+
+
+
The AlN(0001) and (00.-1) faces share the same crystallograpphic symmetry and the Al and N atoms have the same geometrical surrounding differing only in the exchange of Al and N atoms (Fig.%s).
+
It is thus expected that Al(2p) and N(1s) XPD patterns exhibit almost the same features with only small differences due to the contrast between Al and N scattering amplitudes.
Side views of N- or Al- terminated surfaces showing nearest neighbours main polar crystallographic directions. The inset shows the experimental Al(2p)/N(1s) ratio versus polar angle for both AlN polarities (taken from Lebedev et al.).#
+
+
+
The strongest differences in photoemission intensities suitable for a quick and unambiguous determination of polarity were found in the (10-10) azimuthal plane at 32° and 59° (polar scans in the inset of Fig.%s).
+
These are the directions of short neighbor distances between the atoms of the same element (32°) and between Al and N atoms (58.5°), respectively.
+
+
+
+
Using the crystal view in Fig.%s and assuming that we want to compute Al(2p) and N(1s) intensities for emitters located in 3 different planes to get a substrate signal. How many clusters do we need to build ?
+
+
+
+
+
+
Download this script and fill in the lines indicated by the comments “FILL HERE”. Run the calculation and check that you are reproducing polar scan of Fig.%s.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity09/Activity09.html b/msspecbook/_build/html/Activity09/Activity09.html
index f0fa62f..deba493 100644
--- a/msspecbook/_build/html/Activity09/Activity09.html
+++ b/msspecbook/_build/html/Activity09/Activity09.html
@@ -32,7 +32,7 @@
-
+
@@ -377,7 +377,7 @@ document.write(`
Download this script and write the body of the function create_cluster. The function should return a
-small cluster of 5 Fe atoms with the CO molecule adsorbed like in figure Fig. 27 below. The function
+small cluster of 5 Fe atoms with the CO molecule adsorbed like in figure Fig.%s below. The function
will accept 4 keyword arguments to control the adsorption geometry.
defcreate_cluster(height=1.,theta=45,phi=0,bond_length=1.15):# Fill the body of this function. The 'cluster' object in built according to
@@ -440,7 +441,8 @@ Finally there is the Main part that is built in two sections:
-
+
+
Solution…
Here are the code of the nested for loops
################################################################################ Main part
@@ -490,7 +492,8 @@ Finally there is the Main part that is built in two sections:
How many R-Factors do agree that \((\theta,\phi)=(55,0)\) gives the best agreement ?
-
+
+
Solution…
6 R-factors out of 12 do agree that variable set n°30 gives the best agreement. The set n°30 corresponds to
\(\theta=55°\) and \(\phi=0°\).
Activity 9: Comparing simulation and experiment with R-factors
+
+
+
+
+
+
Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
Activity 9: Comparing simulation and experiment with R-factors#
+
In order to extract precise crystallographic information from electronic spectroscopy, we need to compare MsSpec calculations with experimental results and adjust the modelling parameters to simulate the experiment as accurately as possible.
+
R-factors (reliability factors) are commonly used for this task. In the following example, we will see how MsSpec can extract the adsorption geometry of a molecule.
The carbon monoxide molecule can be adsorbed onto a Fe(001) surface in the hollow site. It was experimentally demonstrated that the CO molecule is tilted by 55\(\pm\)2° in <100> azimuthal directions. The molecule is bonded to the Fe surface by the carbon atom and the adsorption height was estimated to be \(\sim\) 0.6 Å.
We will try to reproduce the polar scan of the figure below of CO adsorbed in the hollow site of the Fe(001) surface with simple single scattering calculations with MsSpec and by using R-Factors to find the best adsorption geometry. We will use the simple cluster displayed on the left hand side of the figure.
Small cluster used for SSC calculations (left) and (right) Normalized polar scan of the C(1s) at 1202 eV for [100] and [1-10] azimths.#
+
+
+
+
+
+
Download this script and write the body of the function create_cluster. The function should return a
+small cluster of 5 Fe atoms with the CO molecule adsorbed like in figure Fig.%s below. The function
+will accept 4 keyword arguments to control the adsorption geometry.
Now that the create_cluster function is done, look at the rest of the script. The next function is called compute_polar_scan and will obviously be used to compute the \(\theta\)-scan of the C1s for a given cluster geometry.
+Finally there is the Main part that is built in two sections:
+
+
A section containing nested for loops
+
A final section for R-Factor analysis
+
+
+
+
+
+
Complete the nested for loops in section 1) in order to compute polar scans for CO molecule tilted from 45° to 60° with a 1° step and aligned either along the [100] direction of Fe, 30° from this direction or along [110]. The adsorption height is 0.6 Å and the bond length is 1.157 Å.
+
What is the best \((\theta, \phi)\) according to the R-Factor analysis
+
+
+
+
MsSpec uses 12 different R-Factors formula to compare the calculted curve to the experimental data. The set of parameters giving the best agreement according to the majority of those 12 R-factors is assumed to be the best solution. Here are the R-factors formula used in MsSpec
The 12 R-Factors used in MsSpec. The Pendry’s R-Factor is n°11.#
+
+
+
+
+
+
How many R-Factors do agree that \((\theta,\phi)=(55,0)\) gives the best agreement ?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity10/Activity10.html b/msspecbook/_build/html/Activity10/Activity10.html
index a6f3936..2d40df8 100644
--- a/msspecbook/_build/html/Activity10/Activity10.html
+++ b/msspecbook/_build/html/Activity10/Activity10.html
@@ -32,7 +32,7 @@
-
+
@@ -405,9 +405,11 @@ can be changed).
-
In the paper discussed in Activity 9: Comparing simulation and experiment with R-factors, experimental values of the anisotropy suggest an adsorption height between 0.2 and 0.6 Å. Modify the script to add another sweep for variying the adsorption height of the CO molecule.
+
In the paper discussed in Activity 9: Comparing simulation and experiment with R-factors, experimental values of the anisotropy suggest an adsorption height between 0.2 and 0.6 Å. Modify the script to add another sweep for variying the adsorption height of the CO molecule.
+
+
Solution…
63# 1) Multiprocess calculations 64theta=Sweep(key='theta',comments="The molecule tilt angle",65start=50,stop=60,step=1,unit='degree')
@@ -434,21 +436,6 @@ can be changed).
86results=np.reshape(parameters.pop('output'),(df.shape[0]*2,-1))
-
-
-
fromIPython.displayimportMarkdown
-
-Markdown("""
-
-Hello world
-
-""")
-
Activity 10: Parallelization and multi-processing in MsSpec
+
+
+
+
+
+
Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
Activity 10: Parallelization and multi-processing in MsSpec#
+
As you can see from the previous examples, a complete simulation may require several multiple scattering calculations, for instance to calculate the total intensity of a substrate or to optimize the geometry of a system. As the calculations are often time consuming, it can be useful to distribute these tasks over several processors to make the most of hardware resources.
+Although MsSpec is not fully parallelized, the code does offer a number of features, which we will explore here.
When available during installation, MsSpec will link with the system lapack library. It will be used to invert the matrix in the inversion option of the MsSpec calculator. To allow MsSpec to use this shared memory parallelism, you need to set the number of cores to be used in the OMP_NUM_THREADS environment variable.
+
You can set this variable just for the execution of your script. For example:
+
$OMP_NUM_THREADS=12pythonmy_script.py
+
+
+
will use 12 cores for inverting the matrix in your script.
+
It is also possible to set environment variable inside your python script.
+
importos
+
+os.environ['OMP_NUM_THREADS']=12
+
+
+
It may be useful for technical reasons or to use different number of cores in some parts of your script.
Another kind of parallelization used in MsSpec is multiprocessing. Quite often, you need to run different independent calculations. MsSpec provides a simple looper that can be useful for multiprocessing. Let’s demonstrate it with the previous example CO/Fe(001).
+
This script is the multiprocessed version of the previous one. You can see that the previous nested for loops are now replaced by some declarative content (lines 63-67) and the definition of a process function (whose name
+can be changed).
+
With the msspec.looper package, the user define Sweep objects that are parameters of the calculation or of the cluster. The process function must accept as many arguments as parameters to sweep (+ the **kwargs).
+
A Looper object is created (line 76) and the process function is set to its pipeline attribute (line 77). When MsSpec will run the looper, it will combine all parameters values to unique individual sets and MsSpec will distribute the calculations over the number of processors specified in the ncpu option.
+
63# 1) Multiprocess calculations
+64theta=Sweep(key='theta',comments="The molecule tilt angle",
+65start=50,stop=60,step=1,unit='degree')
+66phi=Sweep(key='phi',comments="The molecule azimuthal angle",
+67values=[0,45],unit='degree')
+68
+69defprocess(theta,phi,**kwargs):
+70cluster=create_cluster(theta=theta,phi=phi,height=0.6,bond_length=1.157)
+71i=kwargs.get('sweep_index')
+72data=compute_polar_scan(cluster,folder=f'calc_{i:d}')
+73dset=data[-1]
+74returndset.theta,dset.cross_section
+75
+76looper=Looper()
+77looper.pipeline=process
+78df=looper.run(theta,phi,ncpu=4)
+79
+80# Black magic to convert the pandas dataframe object 'df' to the
+81# parameters dict and the resulst list (will be easier in a future
+82# version ;-) ).
+83parameters=df.to_dict('list')
+84results=np.reshape(parameters.pop('output'),(df.shape[0]*2,-1))
+
+
+
+
+
+
In the paper discussed in Activity 9: Comparing simulation and experiment with R-factors, experimental values of the anisotropy suggest an adsorption height between 0.2 and 0.6 Å. Modify the script to add another sweep for variying the adsorption height of the CO molecule.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msspecbook/_build/html/Activity11/Activity11.html b/msspecbook/_build/html/Activity11/Activity11.html
index 2d4ae80..3b854cd 100644
--- a/msspecbook/_build/html/Activity11/Activity11.html
+++ b/msspecbook/_build/html/Activity11/Activity11.html
@@ -32,7 +32,7 @@
-
+
diff --git a/msspecbook/_build/html/_downloads/1294d44b079d2ab82b330376a2530741/SbAg.py b/msspecbook/_build/html/_downloads/1294d44b079d2ab82b330376a2530741/SbAg.py
new file mode 100644
index 0000000..d376ab5
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/1294d44b079d2ab82b330376a2530741/SbAg.py
@@ -0,0 +1,55 @@
+from ase.build import bulk
+from ase.visualize import view
+
+from msspec.calculator import MSSPEC
+from msspec.utils import hemispherical_cluster, get_atom_index, cut_plane
+import numpy as np
+from matplotlib import pyplot as plt
+
+# Create the silver cell
+Ag = bulk('Ag', cubic=True)
+# Orientate the cell in the [111] direction
+Ag.rotate((1,1,1), (0,0,1), rotate_cell=True)
+# Align the azimuth to match experimental reference
+Ag.rotate(15, 'z', rotate_cell=True)
+
+# Create a cluster
+cluster = hemispherical_cluster(Ag, diameter=20, emitter_plane=0)
+cluster = cut_plane(cluster, z=-4.8)
+cluster.emitter = get_atom_index(cluster, 0,0,0)
+cluster[cluster.emitter].symbol = 'Sb'
+
+# Create a calculator
+calc = MSSPEC(spectroscopy='PED', algorithm='inversion')
+calc.set_atoms(cluster)
+
+# Define parameters
+calc.source_parameters.theta = 0
+calc.source_parameters.phi = 0
+
+calc.detector_parameters.angular_acceptance = 1
+calc.detector_parameters.average_sampling = 'low'
+
+calc.muffintin_parameters.interstitial_potential = 0
+
+# Compute an azimuthal scan
+data = calc.get_phi_scan(level='4d', theta=40, phi=np.linspace(0,240,121), kinetic_energy=45)
+
+# Normalize data between [0,1] (to ease comparison with experimental data)
+dset = data[0]
+dset.cross_section -= dset.cross_section.min()
+dset.cross_section /= dset.cross_section.max()
+
+# Add experimental data points in the dataset
+x, y = np.loadtxt('data.txt').T
+dset.add_columns(experiment=y)
+
+# Add points to view
+view = dset.views[0]
+view.select('phi', 'experiment', legend='Exp. data')
+
+# Popup GUI
+data.view()
+
+# Remove temp. files
+calc.shutdown()
diff --git a/msspecbook/_build/html/_downloads/3fdd553b457dd9aab1086c697e8ad08e/Cu_temperature.py b/msspecbook/_build/html/_downloads/3fdd553b457dd9aab1086c697e8ad08e/Cu_temperature.py
new file mode 100644
index 0000000..caac050
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/3fdd553b457dd9aab1086c697e8ad08e/Cu_temperature.py
@@ -0,0 +1,126 @@
+from ase.build import bulk
+import numpy as np
+
+from msspec.calculator import MSSPEC, XRaySource
+from msspec.utils import hemispherical_cluster, get_atom_index
+
+def create_clusters(nplanes=3):
+ copper = bulk('Cu', a=3.6, cubic=True)
+ clusters = []
+ for emitter_plane in range(nplanes):
+ cluster = hemispherical_cluster(copper,
+ emitter_plane=emitter_plane,
+ planes=emitter_plane+1,
+ diameter=27,
+ shape='cylindrical')
+ cluster.absorber = get_atom_index(cluster, 0, 0, 0)
+ # This is how to store extra information with your cluster
+ cluster.info.update({
+ 'emitter_plane': emitter_plane,
+ })
+ clusters.append(cluster)
+ return clusters
+
+
+def compute(clusters, all_theta=[45., 83.],
+ all_T=np.arange(300., 1000., 400.)):
+ data = None
+ for cluster in clusters:
+ # Retrieve emitter's plane from cluster object
+ plane = cluster.info['emitter_plane']
+
+ calc = MSSPEC(spectroscopy='PED', algorithm='expansion')
+ calc.source_parameters.energy = XRaySource.AL_KALPHA
+ calc.muffintin_parameters.interstitial_potential = 14.1
+
+ # In simple scattering, it is common practice to use a real potential and
+ # manually define a mean free path arbitrarily lower than the actual physical
+ # value in an attempt to reproduce multiple scattering effects.
+ calc.tmatrix_parameters.exchange_correlation = 'x_alpha_real'
+ calc.calculation_parameters.mean_free_path = ... # -> half of the mean free
+ # path (see p6785)
+ # Parameters for temperature effects
+ calc.calculation_parameters.vibrational_damping = 'averaged_tl'
+ calc.calculation_parameters.use_debye_model = ..... # Use the MsSpec help
+ calc.calculation_parameters.debye_temperature = ... # and p6791 of the paper
+ calc.calculation_parameters.vibration_scaling = ... # -> How much more do
+ # surface atoms vibrate
+ # than bulk atoms?
+ calc.detector_parameters.average_sampling = 'low'
+ calc.detector_parameters.angular_acceptance = 5.7
+
+ calc.calculation_parameters.scattering_order = 1
+
+
+ for T in all_T:
+ # Define the sample temperature
+ calc.calculation_parameters.temperature = T
+ # Set the atoms and compute an azimuthal scan
+ calc.set_atoms(cluster)
+ data = calc.get_phi_scan(level='2p', theta=all_theta,
+ phi=np.linspace(0, 100, 51),
+ kinetic_energy=560, data=data)
+ # Small changes to add some details in both the title of the dataset
+ # and the figure
+ view = data[-1].views[-1]
+ t = view._plotopts['title'] + f" (plane #{plane:d}, T={T:.0f} K)"
+ data[-1].title = t
+ view.set_plot_options(autoscale=True, title=t)
+ calc.shutdown()
+ return data
+
+
+def analysis(data, all_theta, all_T, nplanes):
+ # Sum cross_section for all emitter's plane at a given T
+ # Compute the anisotropy
+ results = dict.fromkeys(all_T, [])
+ anisotropy = []
+ for dset in data:
+ # Retrieve temperature
+ T = float(dset.get_parameter('CalculationParameters', 'temperature')['value'])
+ # Update the sum in results
+ if len(results[T]) == 0:
+ results[T] = dset.cross_section
+ else:
+ results[T] += dset.cross_section
+
+ anisotropy_dset = data.add_dset("Anisotropies")
+ anisotropy_dset.add_columns(temperature=all_T)
+ for theta in all_theta:
+ col_name = f"theta{theta:.0f}"
+ col_values = []
+ i = np.where(dset.theta == theta)[0]
+ for T in all_T:
+ cs = results[T][i]
+ Imax = np.max(cs)
+ Imin = np.min(cs)
+ A = (Imax - Imin)/Imax
+ col_values.append(A)
+ anisotropy_dset.add_columns(**{col_name:col_values/np.max(col_values)})
+
+
+ anisotropy_view = anisotropy_dset.add_view('Anisotropies',
+ title='Relative anisotropies for Cu(2p)',
+ marker='o',
+ xlabel='T (K)',
+ ylabel=r'$\frac{\Delta I / I_{max}(T)}{\Delta I_{300}'
+ r'/ I_{max}(300)} (\%)$',
+ autoscale=True)
+ for theta in all_theta:
+ col_name = f"theta{theta:.0f}"
+ anisotropy_view.select('temperature', col_name,
+ legend=r'$\theta = {:.0f} \degree$'.format(theta))
+
+ return data
+
+
+
+if __name__ == "__main__":
+ nplanes = 4
+ all_theta = np.array([45, 83])
+ all_theta = np.array([300., 1000.])
+
+ clusters = create_clusters(nplanes=nplanes)
+ data = compute(clusters, all_T=all_T, all_theta=all_theta)
+ data = analysis(data, all_T=all_T, all_theta=all_theta, nplanes=nplanes)
+ data.view()
diff --git a/msspecbook/_build/html/_downloads/54a8452b27a8c6284cf1a8a05665f3a4/copper.cif b/msspecbook/_build/html/_downloads/54a8452b27a8c6284cf1a8a05665f3a4/copper.cif
new file mode 100644
index 0000000..0490639
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/54a8452b27a8c6284cf1a8a05665f3a4/copper.cif
@@ -0,0 +1,51 @@
+data_image0
+_chemical_formula_structural Cu26
+_chemical_formula_sum "Cu26"
+_cell_length_a 14.4
+_cell_length_b 14.4
+_cell_length_c 7.2
+_cell_angle_alpha 90.0
+_cell_angle_beta 90.0
+_cell_angle_gamma 90.0
+
+_space_group_name_H-M_alt "P 1"
+_space_group_IT_number 1
+
+loop_
+ _space_group_symop_operation_xyz
+ 'x, y, z'
+
+loop_
+ _atom_site_type_symbol
+ _atom_site_label
+ _atom_site_symmetry_multiplicity
+ _atom_site_fract_x
+ _atom_site_fract_y
+ _atom_site_fract_z
+ _atom_site_occupancy
+ Cu Cu1 1.0 0.25 0.5 0.37500000000000017 1.0000
+ Cu Cu2 1.0 0.25 0.5 0.8750000000000001 1.0000
+ Cu Cu3 1.0 0.3750000000000001 0.37500000000000017 0.37500000000000017 1.0000
+ Cu Cu4 1.0 0.5 0.24999999999999992 0.37500000000000017 1.0000
+ Cu Cu5 1.0 0.5 0.37500000000000017 0.12499999999999996 1.0000
+ Cu Cu6 1.0 0.3750000000000001 0.37500000000000017 0.8750000000000001 1.0000
+ Cu Cu7 1.0 0.5 0.24999999999999992 0.8750000000000001 1.0000
+ Cu Cu8 1.0 0.5 0.37500000000000017 0.625 1.0000
+ Cu Cu9 1.0 0.3750000000000001 0.5 0.12499999999999996 1.0000
+ Cu Cu10 1.0 0.3750000000000001 0.6249999999999999 0.37500000000000017 1.0000
+ Cu Cu11 1.0 0.5 0.5 0.37500000000000017 1.0000
+ Cu Cu12 1.0 0.5 0.6249999999999999 0.12499999999999996 1.0000
+ Cu Cu13 1.0 0.3750000000000001 0.5 0.625 1.0000
+ Cu Cu14 1.0 0.3750000000000001 0.6249999999999999 0.8750000000000001 1.0000
+ Cu Cu15 1.0 0.5 0.5 0.8750000000000001 1.0000
+ Cu Cu16 1.0 0.5 0.6249999999999999 0.625 1.0000
+ Cu Cu17 1.0 0.5 0.7500000000000003 0.37500000000000017 1.0000
+ Cu Cu18 1.0 0.5 0.7500000000000003 0.8750000000000001 1.0000
+ Cu Cu19 1.0 0.6249999999999999 0.37500000000000017 0.37500000000000017 1.0000
+ Cu Cu20 1.0 0.6249999999999999 0.37500000000000017 0.8750000000000001 1.0000
+ Cu Cu21 1.0 0.6249999999999999 0.5 0.12499999999999996 1.0000
+ Cu Cu22 1.0 0.6249999999999999 0.6249999999999999 0.37500000000000017 1.0000
+ Cu Cu23 1.0 0.7500000000000003 0.5 0.37500000000000017 1.0000
+ Cu Cu24 1.0 0.6249999999999999 0.5 0.625 1.0000
+ Cu Cu25 1.0 0.6249999999999999 0.6249999999999999 0.8750000000000001 1.0000
+ Cu Cu26 1.0 0.7500000000000003 0.5 0.8750000000000001 1.0000
diff --git a/msspecbook/_build/html/_downloads/79fef44b9d7fb8ae298952070d9ba3ce/RhO_tofill.py b/msspecbook/_build/html/_downloads/79fef44b9d7fb8ae298952070d9ba3ce/RhO_tofill.py
new file mode 100644
index 0000000..b0ed36a
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/79fef44b9d7fb8ae298952070d9ba3ce/RhO_tofill.py
@@ -0,0 +1,23 @@
+from msspec.calculator import MSSPEC
+from ase.build import fcc111, add_adsorbate
+import numpy as np
+
+data = None
+all_z = ... # -> Define a list of z values for the adsorbate
+
+for ... # -> Complete this for-loop over z values
+ # construct the cluster
+ cluster = fcc111('Rh', size = (2,2,1))
+ cluster.pop(3)
+ add_adsorbate(... # -> Put the oxygen atom on the fcc site
+ cluster.emitter = ... # -> Oxygen is the last atom we added, so the indice is...
+
+ # Define a calculator for single scattering calculations
+ calc = MSSPEC(spectroscopy='PED', algorithm='expansion')
+ calc.calculation_parameters.scattering_order = 1
+ calc.set_atoms(cluster)
+
+ # Compute
+ data = calc.get_theta_phi_scan(level='1s', kinetic_energy=723, data=data)
+
+data.view()
diff --git a/msspecbook/_build/html/_downloads/7cc7f59f1ea682f79421b71b98d87b23/TiSe2_1_tofill.py b/msspecbook/_build/html/_downloads/7cc7f59f1ea682f79421b71b98d87b23/TiSe2_1_tofill.py
new file mode 100644
index 0000000..60bac32
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/7cc7f59f1ea682f79421b71b98d87b23/TiSe2_1_tofill.py
@@ -0,0 +1,40 @@
+from ase.build import mx2
+from ase.visualize import view
+from msspec.calculator import MSSPEC
+from msspec.utils import hemispherical_cluster, get_atom_index
+
+# Some usefull constants (a, c, d, D) for defining the structure
+a=...
+
+# Create the TiSe2 trilayer
+# use ase help for this function
+TiSe2 = mx2(formula=...)
+
+# The preious cell is 2D, let's define the c-axis to take into account
+# the Van der Waals gap between trilayers
+TiSe2.cell[2] = [0, 0, ...]
+
+# To be aligned like in the paper
+TiSe2.rotate(60, 'z', rotate_cell=True)
+
+# Since the material is multi-elements, "tag" each inequivalent atom
+# of the unit cell with a number. The "Ti" atom is tagged 0 and "Se"
+# atoms are 1 and 2.
+for i in range(3):
+ TiSe2[i].tag = i
+
+cluster = hemispherical_cluster(TiSe2, emitter_tag=..., emitter_plane=..., planes=5)
+cluster.emitter = get_atom_index(cluster, 0, 0, 0)
+
+view(cluster)
+
+# Create a calculator with Rehr-Albers series expansion algorithm
+calc = MSSPEC(spectroscopy='PED', algorithm='expansion')
+calc.set_atoms(cluster)
+
+data = None
+for ndif in range(1,4):
+ calc.calculation_parameters.scattering_order = ndif
+ data = calc.get_theta_phi_scan(level='2p', kinetic_energy=1030, data=data)
+
+data.view()
\ No newline at end of file
diff --git a/msspecbook/_build/html/_downloads/a4639febc8162e65b41b0e03dfeeaa17/cu.py b/msspecbook/_build/html/_downloads/a4639febc8162e65b41b0e03dfeeaa17/cu.py
new file mode 100644
index 0000000..749851d
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/a4639febc8162e65b41b0e03dfeeaa17/cu.py
@@ -0,0 +1,24 @@
+from ase.io import read
+from msspec.calculator import MSSPEC
+
+
+cluster = read('copper.cif')
+# view the cluster
+cluster.edit()
+
+# The "emitter" atom is located in the middle of the 3rd plane
+cluster.emitter = 10
+
+# Create a "calculator"
+calc = MSSPEC(spectroscopy='PED', algorithm='inversion')
+calc.set_atoms(cluster)
+
+data = calc.get_theta_scan(level='2p3/2')
+
+# Plot the result with the interactive GUI
+data.view()
+
+# Or plot using matplotlib directly
+from matplotlib import pyplot as plt
+data[0].views[0].plot()
+plt.show()
diff --git a/msspecbook/_build/html/_downloads/aa51bfc01de3fe879c2507956d0a2b8c/data.txt b/msspecbook/_build/html/_downloads/aa51bfc01de3fe879c2507956d0a2b8c/data.txt
new file mode 100644
index 0000000..19f61b8
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/aa51bfc01de3fe879c2507956d0a2b8c/data.txt
@@ -0,0 +1,121 @@
+0.000000000000000000e+00 2.273853352828327234e-01
+2.000000000000000000e+00 2.135876322898652424e-01
+4.000000000000000000e+00 1.925265592281927285e-01
+6.000000000000000000e+00 1.852631891594877511e-01
+8.000000000000000000e+00 1.852631891594877511e-01
+1.000000000000000000e+01 1.831705825411805155e-01
+1.200000000000000000e+01 1.636929472985219347e-01
+1.400000000000000000e+01 1.279608696063064543e-01
+1.600000000000000000e+01 1.040430509934481690e-01
+1.800000000000000000e+01 3.015378633541379930e-02
+2.000000000000000000e+01 4.106459224097607462e-03
+2.200000000000000000e+01 1.971550450495464929e-02
+2.400000000000000000e+01 7.007532033757153667e-02
+2.600000000000000000e+01 1.904879553613253451e-01
+2.800000000000000000e+01 3.101513022088481231e-01
+3.000000000000000000e+01 4.052906495585950619e-01
+3.200000000000000000e+01 3.678644926959027672e-01
+3.400000000000000000e+01 3.036757937102613214e-01
+3.600000000000000000e+01 2.214720340001324062e-01
+3.800000000000000000e+01 2.247878029385593501e-01
+4.000000000000000000e+01 2.837024903561691791e-01
+4.200000000000000000e+01 3.445713059080361962e-01
+4.400000000000000000e+01 4.114147115795538934e-01
+4.600000000000000000e+01 5.600722856829548624e-01
+4.800000000000000000e+01 6.969212581381016847e-01
+5.000000000000000000e+01 8.189179738707677014e-01
+5.200000000000000000e+01 9.080765164985155069e-01
+5.400000000000000000e+01 9.562807225028111535e-01
+5.600000000000000000e+01 9.888241305894533983e-01
+5.800000000000000000e+01 9.881336668388966959e-01
+6.000000000000000000e+01 9.873660563005683954e-01
+6.200000000000000000e+01 9.916558998680982118e-01
+6.400000000000000000e+01 9.856319679487668406e-01
+6.600000000000000000e+01 9.620117644994009565e-01
+6.800000000000000000e+01 8.930029985027734263e-01
+7.000000000000000000e+01 8.002870246239043306e-01
+7.200000000000000000e+01 6.744921153732785779e-01
+7.400000000000000000e+01 5.336319385472689802e-01
+7.600000000000000000e+01 3.958859203876436417e-01
+7.800000000000000000e+01 3.306385960364682242e-01
+8.000000000000000000e+01 2.830681723233798852e-01
+8.200000000000000000e+01 2.157622815497834690e-01
+8.400000000000000000e+01 2.239956241155102445e-01
+8.600000000000000000e+01 3.126826811826061703e-01
+8.800000000000000000e+01 3.836092948935748703e-01
+9.000000000000000000e+01 3.974940023194180050e-01
+9.200000000000000000e+01 2.890294760518045125e-01
+9.400000000000000000e+01 1.681544424688440620e-01
+9.600000000000000000e+01 5.857273428081174321e-02
+9.800000000000000000e+01 1.843518927289370876e-02
+1.000000000000000000e+02 3.948951199063644064e-03
+1.020000000000000000e+02 5.411750728699640106e-02
+1.040000000000000000e+02 1.168717046133502524e-01
+1.060000000000000000e+02 1.428170265275016670e-01
+1.080000000000000000e+02 1.770817723162995683e-01
+1.100000000000000000e+02 1.852631891594877511e-01
+1.120000000000000000e+02 1.827670619818080600e-01
+1.140000000000000000e+02 1.840805289029476266e-01
+1.160000000000000000e+02 2.023203439358092770e-01
+1.180000000000000000e+02 2.289994175203227400e-01
+1.200000000000000000e+02 2.320430725945487604e-01
+1.220000000000000000e+02 2.174983315399919570e-01
+1.240000000000000000e+02 1.903085890797567015e-01
+1.260000000000000000e+02 1.848716692115463522e-01
+1.280000000000000000e+02 1.870838533508997481e-01
+1.300000000000000000e+02 1.808923414647976846e-01
+1.320000000000000000e+02 1.656061876352601381e-01
+1.340000000000000000e+02 1.324214968752658039e-01
+1.360000000000000000e+02 8.695118016262873284e-02
+1.380000000000000000e+02 1.854769500506061805e-02
+1.400000000000000000e+02 0.000000000000000000e+00
+1.420000000000000000e+02 2.910410785429527400e-02
+1.440000000000000000e+02 1.010188969127969877e-01
+1.460000000000000000e+02 2.301799776698615074e-01
+1.480000000000000000e+02 3.527565800906127258e-01
+1.500000000000000000e+02 3.915987019538648140e-01
+1.520000000000000000e+02 3.464073994570029402e-01
+1.540000000000000000e+02 2.694669793425982229e-01
+1.560000000000000000e+02 2.158017450989128672e-01
+1.580000000000000000e+02 2.275203421614326316e-01
+1.600000000000000000e+02 3.068773854027863068e-01
+1.620000000000000000e+02 3.571336959618095497e-01
+1.640000000000000000e+02 4.706879815526597843e-01
+1.660000000000000000e+02 6.409924085632153767e-01
+1.680000000000000000e+02 7.767958277474236173e-01
+1.700000000000000000e+02 8.699880758924664059e-01
+1.720000000000000000e+02 9.465309757532142099e-01
+1.740000000000000000e+02 9.812603702158622099e-01
+1.760000000000000000e+02 9.992196602416892892e-01
+1.780000000000000000e+02 9.917162779443612353e-01
+1.800000000000000000e+02 9.978245891628175768e-01
+1.820000000000000000e+02 1.000000000000000000e+00
+1.840000000000000000e+02 9.875604662057533289e-01
+1.860000000000000000e+02 9.483868703110428511e-01
+1.880000000000000000e+02 8.713195437307523772e-01
+1.900000000000000000e+02 7.743174871902573919e-01
+1.920000000000000000e+02 6.499028625508473933e-01
+1.940000000000000000e+02 5.133872820820232219e-01
+1.960000000000000000e+02 3.854633893596886574e-01
+1.980000000000000000e+02 3.197097892137605313e-01
+2.000000000000000000e+02 2.625546271582531732e-01
+2.020000000000000000e+02 2.180674059888806082e-01
+2.040000000000000000e+02 2.313545375136863425e-01
+2.060000000000000000e+02 3.256001393270981925e-01
+2.080000000000000000e+02 3.901136262892592188e-01
+2.100000000000000000e+02 4.105052902445402441e-01
+2.120000000000000000e+02 3.039702372835895727e-01
+2.140000000000000000e+02 1.592176621398869174e-01
+2.160000000000000000e+02 6.314946746536785616e-02
+2.180000000000000000e+02 1.766902523683577114e-02
+2.200000000000000000e+02 1.012551589503468512e-02
+2.220000000000000000e+02 5.641599939516841328e-02
+2.240000000000000000e+02 1.259411667024434578e-01
+2.260000000000000000e+02 1.520177453041229865e-01
+2.280000000000000000e+02 1.775272950156810414e-01
+2.300000000000000000e+02 1.829980737518577261e-01
+2.320000000000000000e+02 1.838471170106117103e-01
+2.340000000000000000e+02 1.827520612175190795e-01
+2.360000000000000000e+02 2.068282879012685871e-01
+2.380000000000000000e+02 2.265482926355094906e-01
+2.400000000000000000e+02 2.403459956284773325e-01
diff --git a/msspecbook/_build/html/_downloads/b820873b74a9711a6b5f02470505cc1a/Si001.py b/msspecbook/_build/html/_downloads/b820873b74a9711a6b5f02470505cc1a/Si001.py
new file mode 100644
index 0000000..af37f6f
--- /dev/null
+++ b/msspecbook/_build/html/_downloads/b820873b74a9711a6b5f02470505cc1a/Si001.py
@@ -0,0 +1,56 @@
+# coding: utf8
+
+import numpy as np
+from ase.build import bulk
+
+from msspec.calculator import MSSPEC, XRaySource
+from msspec.iodata import Data
+from msspec.utils import hemispherical_cluster, get_atom_index
+
+
+# Create the cluster
+a = 5.43
+Si = bulk('Si', a=a, cubic=True)
+cluster = hemispherical_cluster(Si,
+ diameter=30, planes=4,
+ emitter_plane=3,
+ shape = 'cylindrical',
+ )
+for atom in cluster:
+ atom.set('mean_square_vibration', 0.006)
+ atom.set('mt_radius', 1.1)
+cluster.emitter = get_atom_index(cluster, 0, 0, 0)
+
+# Create a calculator and set parameters
+calc = MSSPEC(spectroscopy='PED', algorithm='expansion')
+
+calc.source_parameters.energy = XRaySource.AL_KALPHA
+calc.source_parameters.theta = -54.7
+calc.source_parameters.phi = 90
+calc.spectroscopy_parameters.final_state = 1
+
+calc.calculation_parameters.scattering_order = 3
+calc.tmatrix_parameters.tl_threshold = 1e-4
+calc.calculation_parameters.vibrational_damping = 'averaged_tl'
+calc.calculation_parameters.RA_cutoff = 2
+
+# Define path filtering options such that you only
+# accept scattering paths with a forward cone <= 40°
+# and whose length are <= cluster diameter
+#
+#
+
+calc.set_atoms(cluster)
+
+# Compute and add previous data for comparison
+data = calc.get_theta_scan(level='2p',
+ theta=np.arange(-30., 80., 0.5),
+ phi=0,
+ kinetic_energy=1382.28)
+no_filters = Data.load('path_filtering.hdf5')
+data[0].add_columns(**{'no_filters': no_filters[0].cross_section})
+view = data[0].views[0]
+view.select('theta', 'cross_section', index=0, legend="With path filtering")
+view.select('theta', 'no_filters', legend="Without path filtering")
+
+data.view()
diff --git a/msspecbook/_build/html/_images/Ni_SSCvsMI.png b/msspecbook/_build/html/_images/Ni_SSCvsMI.png
deleted file mode 100644
index 5bdb0fde37015cda5fb25ba9fc74c3a50d9f57fb..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 718517
zcmeFZc{tSj`#(NTCl#TEgrrT$TG@)Mr4q_c*_ssDvxkOCR1~GCDEq#beJoQXmF&AQ
zrbyPYk8O-oHw$Njh;_v@bKnUgF`+)OAG
zibeI*acvZesRD&s8?%-X{w8e|?^gJO!CCvHGAgrn+aUb#r=^mH5(@Pyn0XPs8h&1P
z_0&0M6zb3$1OtNW*{xtb2mR-E+&~4uGXx5QP
zA0O6!+&dl(o2w
z(-(2iHf1#B>)o8mnWF@FofT~GTz+0dM-*y@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