{ "cells": [ { "cell_type": "markdown", "id": "42cfa8b1-20d2-47e4-a1f0-161c4517df2c", "metadata": {}, "source": [ "(path-filtering)=\n", "# Activity 7: Large clusters and path filtering" ] }, { "cell_type": "markdown", "id": "2f802e59-3ebc-4c5d-a034-42a706044d87", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "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.\n", "\n", "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).\n", "\n", "\n", "\n", ":::" ] }, { "cell_type": "markdown", "id": "2a2f7c01-3a7e-46d4-90aa-6ba2eada6337", "metadata": {}, "source": [ "## The number of scattering paths\n", "\n", "To fix the idea, we will first evaluate how many scattering paths we need to compute for an emitter in the subsurface (2{sup}`nd` plane) or in the bulk (7{sup}`th` plane) of a Si(001) cluster." ] }, { "cell_type": "markdown", "id": "0f78af28-335e-4f6b-9b98-929f9e6965f8", "metadata": {}, "source": [ "::::{tab-set}\n", "\n", ":::{tab-item} Quiz\n", "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).\n", "\n", "1. For an emitter in the subsurface, we can use single scattering (see {ref}`forward-scattering`). How many paths would be generated for this calculation ?\n", "\n", "2. Same question for an emitter in the 7{sup}`th` plane. If we were able to treat each scattering path within only 1 µs. How long would be such calculation ?\n", "\n", "```{note}\n", "Remember that \n", "1. for an emitter in plane $p$, the scattering order has to be at least the number of planes `above` the emitter\n", "2. The number of scattering paths of order $n$ corresponds to the number of possibilities of arranging up to $n$ atoms (taking order into account).\n", "```\n", "\n", "\n", "::::" ] }, { "cell_type": "markdown", "id": "a83ee1b8-dc25-4db9-a3bd-c5ba8443f758", "metadata": {}, "source": [ ":::{toggle}\n", "\n", "To get the total number of paths generated by a cluster of $N$ atoms up to order $M$, use the following formula:\n", "\n", "```{math}\n", ":label: eq-nbpaths\n", "\\sum_{i=0}^{i=M} (N-1)^i\n", "```\n", "\n", ":::{figure-md} nbpaths-fig\n", "\"path\n", "\n", "The time for computing all scattering path for increasing cluster size and scattering order (up to 6{sup}`th` order with 739 atoms. (One path is assumed to be calculated within 1 µs)\n", ":::\n", "\n", ":::" ] }, { "cell_type": "markdown", "id": "5de975f5-8f3d-432e-bfcc-8455bc50a862", "metadata": {}, "source": [ "## Paths filtering in MsSpec\n", "\n", "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:\n", "1. the `forward_scattering` filter which allows all paths where each scattering angle is within a cone of defined aperture\n", "2. the `backward_scattering` filter which is similar to the previous one but for backscattering direction\n", "3. the `distance` filter which rejects all paths longer than a threshold distance\n", "\n", "The following figure illustrate the effect of theses filters on scattering paths\n", "\n", ":::{figure-md} filters-fig\n", "\"path\n", "\n", "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." ] }, { "cell_type": "markdown", "id": "28aae2f7-2af9-4630-b89d-ab634725ad79", "metadata": {}, "source": [ "## Application to a deep plane in a Si(001) sample\n", "\n", "The following script will compute contribution of all the planes of a Si(001) substrate to get the total photoelectron intensity of a Si(2s) polar scan. \n", "\n", "::::{tab-set}\n", "\n", ":::{tab-item} Quiz\n", "\n", "The script is almost completed, try to define path filtering options and compare results with and without filtering for emitter in plane n° 3 at scattering order 2.\n", "\n", "Compute the contribution of plane n° 7\n", "\n", ":::\n", "\n", "::::" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.3" } }, "nbformat": 4, "nbformat_minor": 5 }