Update html
This commit is contained in:
parent
94c759aa01
commit
6708ff60ef
|
@ -357,10 +357,152 @@ document.write(`
|
|||
<section class="tex2jax_ignore mathjax_ignore" id="activity-9-comparing-simulation-and-experiment-with-r-factors">
|
||||
<h1>Activity 9: Comparing simulation and experiment with R-factors<a class="headerlink" href="#activity-9-comparing-simulation-and-experiment-with-r-factors" title="Link to this heading">#</a></h1>
|
||||
<p>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.</p>
|
||||
<p><em>R-factors</em> (reliability factors) are commonly used for this task. In the following example, we will see how MsSpec can extract the adsorption geometry of molecule.</p>
|
||||
<p><em>R-factors</em> (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.</p>
|
||||
<section id="the-unusual-tilt-of-co-molecule-on-fe-001">
|
||||
<h2>The unusual tilt of CO molecule on Fe(001)<a class="headerlink" href="#the-unusual-tilt-of-co-molecule-on-fe-001" title="Link to this heading">#</a></h2>
|
||||
<p>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<span class="math notranslate nohighlight">\(\pm\)</span>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 <span class="math notranslate nohighlight">\(\sim\)</span> 0.6 Å.</p>
|
||||
<div class="admonition seealso" id="cofe-paper">
|
||||
<p class="admonition-title">See also</p>
|
||||
<p>based on this paper from R. S. Saiki <em>et al.</em>
|
||||
<a class="reference external" href="https://doi.org/10.1103/PhysRevLett.63.283">Phys. Rev. Lett. <strong>63(3)</strong> p283-6 (1989)</a></p>
|
||||
</div>
|
||||
<p>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.</p>
|
||||
<figure class="align-default" id="cofe-fig1">
|
||||
<a class="reference internal image-reference" href="../_images/COFe_fig1.jpg"><img alt="" class="align-center" src="../_images/COFe_fig1.jpg" style="width: 600px;" />
|
||||
</a>
|
||||
<figcaption>
|
||||
<p><span class="caption-number">Fig. 24 </span><span class="caption-text">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.</span><a class="headerlink" href="#cofe-fig1" title="Link to this image">#</a></p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
<div class="sd-tab-set docutils">
|
||||
<input checked="checked" id="sd-tab-item-0" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-0">
|
||||
<i class="fa-solid fa-circle-question"></i> Quiz</label><div class="sd-tab-content docutils">
|
||||
<p>Download <a class="reference download internal" download="" href="../_downloads/179b010d01a3689041dba01413ac667b/COFe.py"><span class="xref download myst">this script</span></a> and write the body of the function <code class="docutils literal notranslate"><span class="pre">create_cluster</span></code>. The function should return a
|
||||
small cluster of 5 Fe atoms with the CO molecule adsorbed like in figure <a class="reference internal" href="#cofe-fig2"><span class="std std-numref">Fig. 25</span></a> below. The function
|
||||
will accept 4 keyword arguments to control the adsorption geometry.</p>
|
||||
<figure class="align-default" id="cofe-fig2">
|
||||
<a class="reference internal image-reference" href="../_images/COFe_fig2.jpg"><img alt="CO-Fe adsorption geometry" class="align-center" src="../_images/COFe_fig2.jpg" style="width: 600px;" />
|
||||
</a>
|
||||
<figcaption>
|
||||
<p><span class="caption-number">Fig. 25 </span><span class="caption-text">Adsorption geometry of carbon monoxide on Fe(001).</span><a class="headerlink" href="#cofe-fig2" title="Link to this image">#</a></p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>Remember to use the <a class="reference external" href="https://wiki.fysik.dtu.dk/ase/ase/build/build.html#ase.build.bulk"><code class="docutils literal notranslate"><span class="pre">ase.build.bulk</span></code></a>, the <a class="reference external" href="https://msspec.cnrs.fr/faq/hemispherical_cluster/hemispherical_cluster.html#hemispherical-cluster-faq"><code class="docutils literal notranslate"><span class="pre">msspec.utils.hemispherical_cluster</span></code></a> and the <a class="reference external" href="https://wiki.fysik.dtu.dk/ase/ase/build/surface.html#ase.build.add_adsorbate"><code class="docutils literal notranslate"><span class="pre">ase.build.add_adsorbate</span></code></a>
|
||||
functions.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle docutils container">
|
||||
<p>Here is the code of the <code class="docutils literal notranslate"><span class="pre">create_cluster</span></code> function</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span><span class="w"> </span><span class="nf">create_cluster</span><span class="p">(</span><span class="n">height</span><span class="o">=</span><span class="mf">1.</span><span class="p">,</span> <span class="n">theta</span><span class="o">=</span><span class="mi">45</span><span class="p">,</span> <span class="n">phi</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">bond_length</span><span class="o">=</span><span class="mf">1.15</span><span class="p">):</span>
|
||||
<span class="c1"># Fill the body of this function. The 'cluster' object in built according to</span>
|
||||
<span class="c1"># values provided by the keyword arguments:</span>
|
||||
<span class="c1"># height (in angströms): the 'z' distance between the Fe surface and the C atom</span>
|
||||
<span class="c1"># theta and phi (in degrees): the polar and azimuthal orientation of the CP molecule</span>
|
||||
<span class="c1"># (theta=0° aligns the molecule withe the surface normal</span>
|
||||
<span class="c1"># phi=0° corresponds to the [100] direction of iron)</span>
|
||||
<span class="c1"># bond_length (in angströms): the C-O distance</span>
|
||||
|
||||
<span class="hll"> <span class="n">iron</span> <span class="o">=</span> <span class="n">bulk</span><span class="p">(</span><span class="s1">'Fe'</span><span class="p">,</span> <span class="n">cubic</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
</span><span class="hll"> <span class="n">cluster</span> <span class="o">=</span> <span class="n">hemispherical_cluster</span><span class="p">(</span><span class="n">iron</span><span class="p">,</span> <span class="n">diameter</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">planes</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">emitter_plane</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
|
||||
</span><span class="hll">
|
||||
</span><span class="hll"> <span class="n">t</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">radians</span><span class="p">(</span><span class="n">theta</span><span class="p">)</span>
|
||||
</span><span class="hll"> <span class="n">p</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">radians</span><span class="p">(</span><span class="n">phi</span><span class="p">)</span>
|
||||
</span><span class="hll">
|
||||
</span><span class="hll"> <span class="n">z</span> <span class="o">=</span> <span class="n">bond_length</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
|
||||
</span><span class="hll"> <span class="n">x</span> <span class="o">=</span> <span class="n">bond_length</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">t</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
|
||||
</span><span class="hll"> <span class="n">y</span> <span class="o">=</span> <span class="n">bond_length</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">t</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
|
||||
</span><span class="hll"> <span class="n">CO</span><span class="o">=</span><span class="n">Atoms</span><span class="p">(</span><span class="s1">'CO'</span><span class="p">,</span><span class="n">positions</span><span class="o">=</span><span class="p">[(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">),(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">)])</span>
|
||||
</span><span class="hll">
|
||||
</span><span class="hll"> <span class="n">add_adsorbate</span><span class="p">(</span><span class="n">cluster</span><span class="p">,</span><span class="n">CO</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="n">height</span><span class="p">)</span>
|
||||
</span>
|
||||
<span class="c1"># Keep those 2 lines at the end of your function</span>
|
||||
<span class="c1"># Store some information in the cluster object</span>
|
||||
<span class="n">cluster</span><span class="o">.</span><span class="n">info</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">adsorbate</span><span class="o">=</span><span class="p">{</span><span class="s1">'theta'</span><span class="p">:</span> <span class="n">theta</span><span class="p">,</span> <span class="s1">'phi'</span><span class="p">:</span> <span class="n">phi</span><span class="p">,</span> <span class="s1">'height'</span><span class="p">:</span> <span class="n">height</span><span class="p">,</span>
|
||||
<span class="s1">'bond_length'</span><span class="p">:</span> <span class="n">bond_length</span><span class="p">})</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Now that the <code class="docutils literal notranslate"><span class="pre">create_cluster</span></code> function is done, look at the rest of the script. The next function is called <code class="docutils literal notranslate"><span class="pre">compute_polar_scan</span></code> and will obviously be used to compute the <span class="math notranslate nohighlight">\(\theta\)</span>-scan of the C1s for a given cluster geometry.
|
||||
Finally there is the <em>Main part</em> that is built in two sections:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>A section containing nested <em>for loops</em></p></li>
|
||||
<li><p>A final section for <em>R-Factor analysis</em></p></li>
|
||||
</ol>
|
||||
<div class="sd-tab-set docutils">
|
||||
<input checked="checked" id="sd-tab-item-1" name="sd-tab-set-1" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-1">
|
||||
<i class="fa-solid fa-circle-question"></i> Quiz</label><div class="sd-tab-content docutils">
|
||||
<ol class="arabic simple">
|
||||
<li><p>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 Å.</p></li>
|
||||
<li><p>What is the best <span class="math notranslate nohighlight">\((\theta, \phi)\)</span> according to the R-Factor analysis</p></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle docutils container">
|
||||
<p>Here are the code of the nested <em>for loops</em></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">###############################################################################</span>
|
||||
<span class="c1"># Main part</span>
|
||||
<span class="c1">###############################################################################</span>
|
||||
<span class="n">results</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># polar angles and calculated cross_sections will be appended</span>
|
||||
<span class="c1"># to this list after each 'compute_polar_scan' call</span>
|
||||
<span class="n">parameters</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'theta'</span><span class="p">:</span> <span class="p">[],</span> <span class="s1">'phi'</span><span class="p">:</span> <span class="p">[]}</span> <span class="c1"># and corresponding parameters will also</span>
|
||||
<span class="c1"># be stored in this dictionary</span>
|
||||
|
||||
<span class="c1"># 1) Run calculations for different geometries</span>
|
||||
<span class="hll"><span class="k">for</span> <span class="n">theta</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">45</span><span class="p">,</span> <span class="mi">60</span><span class="p">,</span> <span class="mi">1</span><span class="p">):</span>
|
||||
</span><span class="hll"> <span class="k">for</span> <span class="n">phi</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">45</span><span class="p">]:</span>
|
||||
</span> <span class="c1"># Create the cluster</span>
|
||||
<span class="hll"> <span class="n">cluster</span> <span class="o">=</span> <span class="n">create_cluster</span><span class="p">(</span><span class="n">theta</span><span class="o">=</span><span class="n">theta</span><span class="p">,</span> <span class="n">phi</span><span class="o">=</span><span class="n">phi</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="mf">0.6</span><span class="p">,</span>
|
||||
</span><span class="hll"> <span class="n">bond_length</span><span class="o">=</span><span class="mf">1.157</span><span class="p">)</span>
|
||||
</span> <span class="c1"># Compute</span>
|
||||
<span class="hll"> <span class="n">data</span> <span class="o">=</span> <span class="n">compute_polar_scan</span><span class="p">(</span><span class="n">cluster</span><span class="p">)</span>
|
||||
</span>
|
||||
<span class="c1"># Update lists of results and parameters</span>
|
||||
<span class="n">results</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">theta</span><span class="o">.</span><span class="n">copy</span><span class="p">())</span>
|
||||
<span class="n">results</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">cross_section</span><span class="o">.</span><span class="n">copy</span><span class="p">())</span>
|
||||
<span class="n">parameters</span><span class="p">[</span><span class="s1">'theta'</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">theta</span><span class="p">)</span>
|
||||
<span class="n">parameters</span><span class="p">[</span><span class="s1">'phi'</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">phi</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Runing the code gives the following result. The CO molecule belongs to the (100), (010), (-100), (0-10) planes of iron and is tilted by 55° from the surface normal (<em>ie</em> 35° from the surface itself).</p>
|
||||
<figure class="align-default" id="cofe-comparison">
|
||||
<a class="reference internal image-reference" href="../_images/Comparison.png"><img alt="R-Factor result" class="align-center" src="../_images/Comparison.png" style="width: 600px;" />
|
||||
</a>
|
||||
<figcaption>
|
||||
<p><span class="caption-number">Fig. 26 </span><span class="caption-text">Best polar scan according to R-Factor analysis.</span><a class="headerlink" href="#cofe-comparison" title="Link to this image">#</a></p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
<p>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</p>
|
||||
<figure class="align-default" id="rfactors-formula">
|
||||
<a class="reference internal image-reference" href="../_images/formula.jpg"><img alt="R-Factor result" class="align-center" src="../_images/formula.jpg" style="width: 800px;" />
|
||||
</a>
|
||||
<figcaption>
|
||||
<p><span class="caption-number">Fig. 27 </span><span class="caption-text">The 12 R-Factors used in MsSpec. The Pendry’s R-Factor is n° ??</span><a class="headerlink" href="#rfactors-formula" title="Link to this image">#</a></p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
<div class="sd-tab-set docutils">
|
||||
<input checked="checked" id="sd-tab-item-2" name="sd-tab-set-2" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-2">
|
||||
<i class="fa-solid fa-circle-question"></i> Quiz</label><div class="sd-tab-content docutils">
|
||||
<p>How many R-Factors do agree that <span class="math notranslate nohighlight">\((\theta,\phi)=(55,0)\)</span> gives the best agreement ?</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle docutils container">
|
||||
<p>6 R-factors out of 12 do agree that <em>variable set n°30</em> gives the best agreement. The set n°30 corresponds to
|
||||
<span class="math notranslate nohighlight">\(\theta=55°\)</span> and <span class="math notranslate nohighlight">\(\phi=0°\)</span>.</p>
|
||||
<figure class="align-default" id="results">
|
||||
<a class="reference internal image-reference" href="../_images/results1.png"><img alt="results" class="align-center" src="../_images/results1.png" style="width: 800px;" />
|
||||
</a>
|
||||
<figcaption>
|
||||
<p><span class="caption-number">Fig. 28 </span><span class="caption-text">The number of R-Factors for which the parameter set (in abscissa) gives the best agreement.</span><a class="headerlink" href="#results" title="Link to this image">#</a></p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
from ase import Atoms
|
||||
from ase.build import add_adsorbate, bulk
|
||||
|
||||
from msspec.calculator import MSSPEC, RFACTOR
|
||||
from msspec.utils import hemispherical_cluster
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
def create_cluster(height=1., theta=45, phi=0, bond_length=1.15):
|
||||
# Fill the body of this function. The 'cluster' object in built according to
|
||||
# values provided by the keyword arguments:
|
||||
# height (in angströms): the 'z' distance between the Fe surface and the C atom
|
||||
# theta and phi (in degrees): the polar and azimuthal orientation of the CP molecule
|
||||
# (theta=0° aligns the molecule withe the surface normal
|
||||
# phi=0° corresponds to the [100] direction of iron)
|
||||
# bond_length (in angströms): the C-O distance
|
||||
|
||||
# Keep those 2 lines at the end of your function
|
||||
# Store some information in the cluster object
|
||||
cluster.info.update(adsorbate={'theta': theta, 'phi': phi, 'height': height, 'bond_length': bond_length})
|
||||
return cluster
|
||||
|
||||
|
||||
def compute_polar_scan(cluster):
|
||||
calc = MSSPEC(spectroscopy='PED', algorithm='expansion')
|
||||
calc.set_atoms(cluster)
|
||||
|
||||
# SSC calculations
|
||||
calc.calculation_parameters.scattering_order = 1
|
||||
|
||||
# Add temperature effects
|
||||
[atom.set('mean_square_vibration', 0.005) for atom in cluster]
|
||||
calc.calculation_parameters.vibrational_damping = 'averaged_tl'
|
||||
|
||||
polar_angles = np.arange(-5, 85, 0.5)
|
||||
# set the Carbon as absorber and compute the polar scan
|
||||
cluster.absorber = cluster.get_chemical_symbols().index('C')
|
||||
data = calc.get_theta_scan(level='1s', theta=polar_angles, kinetic_energy=1202)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Main part
|
||||
###############################################################################
|
||||
results = [] # polar angles and calculated cross_sections will be appended
|
||||
# to this list after each 'compute_polar_scan' call
|
||||
parameters = {'theta': [], 'phi': []} # and corresponding parameters will also
|
||||
# be stored in this dictionary
|
||||
|
||||
# 1) Run calculations for different geometries
|
||||
for theta in ...
|
||||
for phi in ...
|
||||
# Create the cluster
|
||||
cluster = ...
|
||||
|
||||
# Compute
|
||||
data = ...
|
||||
|
||||
# Update lists of results and parameters
|
||||
results.append(data[-1].theta.copy())
|
||||
results.append(data[-1].cross_section.copy())
|
||||
parameters['theta'].append(theta)
|
||||
parameters['phi'].append(phi)
|
||||
|
||||
# 2) R-Factor analysis
|
||||
# Load the experimental data
|
||||
exp_data = np.loadtxt('experimental_data.txt')
|
||||
|
||||
# Create an R-Factor calculator
|
||||
rfc = RFACTOR()
|
||||
rfc.set_references(exp_data[:,0], exp_data[:,1])
|
||||
|
||||
# Perform the R-Factor analysis
|
||||
data = rfc.run(*results, **parameters)
|
||||
data.view()
|
Binary file not shown.
After Width: | Height: | Size: 192 KiB |
Binary file not shown.
After Width: | Height: | Size: 322 KiB |
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
Binary file not shown.
After Width: | Height: | Size: 422 KiB |
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
|
@ -9,10 +9,156 @@
|
|||
"# Activity 9: Comparing simulation and experiment with R-factors\n",
|
||||
"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.\n",
|
||||
"\n",
|
||||
"*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 molecule.\n",
|
||||
"*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.\n",
|
||||
"\n",
|
||||
"## The unusual tilt of CO molecule on Fe(001)\n",
|
||||
"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 Å."
|
||||
"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 Å.\n",
|
||||
"\n",
|
||||
"(COFe-paper)=\n",
|
||||
":::{seealso}\n",
|
||||
"based on this paper from R. S. Saiki *et al.*\n",
|
||||
"[Phys. Rev. Lett. **63(3)** p283-6 (1989)](https://doi.org/10.1103/PhysRevLett.63.283)\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"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.\n",
|
||||
"\n",
|
||||
":::{figure-md} COFe-fig1\n",
|
||||
"<img src=\"COFe_fig1.jpg\" alt=\"\" width=\"600px\" align=\"center\">\n",
|
||||
"\n",
|
||||
"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.\n",
|
||||
":::"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "91c03801-b46b-4844-8c89-655700419063",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"::::{tab-set}\n",
|
||||
"\n",
|
||||
":::{tab-item} <i class=\"fa-solid fa-circle-question\"></i> Quiz\n",
|
||||
"Download [this script](./COFe.py) and write the body of the function `create_cluster`. The function should return a \n",
|
||||
"small cluster of 5 Fe atoms with the CO molecule adsorbed like in figure {numref}`Fig. %s <COFe-fig2>` below. The function\n",
|
||||
"will accept 4 keyword arguments to control the adsorption geometry.\n",
|
||||
"\n",
|
||||
"```{figure-md} COFe-fig2\n",
|
||||
"<img src=\"COFe_fig2.jpg\" alt=\"CO-Fe adsorption geometry\" width=\"600px\" align=\"center\">\n",
|
||||
"\n",
|
||||
"Adsorption geometry of carbon monoxide on Fe(001).\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"```{note}\n",
|
||||
"Remember to use the [`ase.build.bulk`](https://wiki.fysik.dtu.dk/ase/ase/build/build.html#ase.build.bulk), the [`msspec.utils.hemispherical_cluster`](https://msspec.cnrs.fr/faq/hemispherical_cluster/hemispherical_cluster.html#hemispherical-cluster-faq) and the [`ase.build.add_adsorbate`](https://wiki.fysik.dtu.dk/ase/ase/build/surface.html#ase.build.add_adsorbate) \n",
|
||||
"functions.\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"::::"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d1be5047-fb75-4e98-a6a2-fc6f678e68ff",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"```{toggle}\n",
|
||||
"Here is the code of the `create_cluster` function\n",
|
||||
"\n",
|
||||
":::{literalinclude} COFe_completed.py\n",
|
||||
":lines: 10-35\n",
|
||||
":emphasize-lines: 10-21\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c7697c4f-949b-4261-abaf-96eefaa9a6ba",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"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.\n",
|
||||
"Finally there is the *Main part* that is built in two sections:\n",
|
||||
"\n",
|
||||
"1. A section containing nested *for loops*\n",
|
||||
"2. A final section for *R-Factor analysis*\n",
|
||||
"\n",
|
||||
"::::{tab-set}\n",
|
||||
"\n",
|
||||
":::{tab-item} <i class=\"fa-solid fa-circle-question\"></i> Quiz\n",
|
||||
"1. 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 Å.\n",
|
||||
"2. What is the best $(\\theta, \\phi)$ according to the R-Factor analysis\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"::::"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "670cbd24-efd4-4c51-89e2-f1d96c53908d",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"```{toggle}\n",
|
||||
"Here are the code of the nested *for loops*\n",
|
||||
"\n",
|
||||
":::{literalinclude} COFe_completed.py\n",
|
||||
":lines: 58-79\n",
|
||||
":emphasize-lines: 10,11,13,14,16\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"Runing the code gives the following result. The CO molecule belongs to the (100), (010), (-100), (0-10) planes of iron and is tilted by 55° from the surface normal (*ie* 35° from the surface itself).\n",
|
||||
"\n",
|
||||
":::{figure-md} COFe-comparison\n",
|
||||
"<img src=\"Comparison.png\" alt=\"R-Factor result\" width=\"600px\" align=\"center\">\n",
|
||||
"\n",
|
||||
"Best polar scan according to R-Factor analysis.\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"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\n",
|
||||
"\n",
|
||||
":::{figure-md} rfactors-formula\n",
|
||||
"<img src=\"formula.jpg\" alt=\"R-Factor result\" width=\"800px\" align=\"center\">\n",
|
||||
"\n",
|
||||
"The 12 R-Factors used in MsSpec. The Pendry's R-Factor is n° ??\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f7827b3c-0cac-42e2-a587-8b30ee3632b4",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"::::{tab-set}\n",
|
||||
"\n",
|
||||
":::{tab-item} <i class=\"fa-solid fa-circle-question\"></i> Quiz\n",
|
||||
"How many R-Factors do agree that $(\\theta,\\phi)=(55,0)$ gives the best agreement ?\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"::::"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "aa8d2dc4-286a-441d-9c21-dab6bac8145c",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"```{toggle}\n",
|
||||
"\n",
|
||||
"6 R-factors out of 12 do agree that *variable set n°30* gives the best agreement. The set n°30 corresponds to\n",
|
||||
"$\\theta=55°$ and $\\phi=0°$.\n",
|
||||
"\n",
|
||||
":::{figure-md} results\n",
|
||||
"<img src=\"results.png\" alt=\"results\" width=\"800px\" align=\"center\">\n",
|
||||
"\n",
|
||||
"The number of R-Factors for which the parameter set (in abscissa) gives the best agreement.\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue