You've activated the muon in-app guide.
In this guide, you will learn how to use the app to find the muon spin relaxation function of lithium fluoride (LiF).
Pre-requisite: This guide assumes that you already followed the Relaxation and electronic structure → Basic tutorial guide, or that you are already familiar with the app.
Click on Step 1: Select structure and follow the instructions to proceed.
In the structure selection step, we select the LiF structure by querying it from one of the OPTIMADE-compliant online database.

Tasks

Warning: If the confirmed structure is not yet stored in the AiiDA database, it will be stored automatically when you proceed to the next step.
Warning: Changes after confirmation will reset the following steps.
In the configuration step, we define the parameters needed to perform our simulation.

Tasks

  1. Select Structure as is, i.e. no relaxation (this means that we do not perform an **initial** relaxation of the unit-cell structure, before starting the muon spectroscopy workflows. In an case, the plugin will perform relaxation of each supercell during the search for muon sites).
  2. Open Step 2.1 for further instructions
Here we define the basic settings of the simulations.

Tasks

  1. Select Insulator Electronic type
  2. Select Fast protocol
  3. See further instructions in the Muon settings panel
Note: For the purpose of completing this guide in short time, we will use the Fast protocol for default parameters. However, you if dispose of enough computational resources, you can also select Balanced or Stringent. With the Fast protocol the polarization is computed with a smaller Hilbert space (maxhdim=105) than with Balanced or Stringent (5·105).
Here we select the properties to calculate. Each property is associated with a workflow that will submit one or more calculations.

Tasks

  1. Select the Muon spectroscopy checkbox
  2. Open Step 2.2 for further instructions
Here we can customize the calculation parameters. The settings are divided into several tabs. Two tabs are always present: Additionally, each plugin activated in the previous step 2.1 can add additional tabs. Note that the app pre-configures defaults for most parameters.
See further instructions in the Basic settings panel below.
In the Muon settings panel, we can customize the muon parameters. We will use value of the parameters in such a way to quickly perform simulation, not to obtain accurate results. For example, we are not going to use a large enough supercell, and we are using a much coarser k-points grid with respect to the default one.

Tasks

Warning: Changes after confirmation will reset the following steps.

In the submission step, we define the computational resources to be used in the calculations. The global resources are used to define resources across all workflow calculations. Optionally, you can override the resource settings for specific calculations.

Warning: If running locally (for example, on the AiiDAlab demo server), we recommend keeping nodes and CPUs at the default minimum of 1 each (except for the cpus-per-task of the python (undi) code, see below).

Once the resources are defined, we can optionally customize the workflow label (pre-filled according to the settings of steps 1 & 2), as well as provide a detailed description of the workflow. Once we are ready, we can submit the workflow. You first need to select which code (code executable + computer where this will run) to use for each step of the workflow. The Quantum ESPRESSO app should always install a local Quantum ESPRESSO executable that is sufficient for this tutorial, but you can setup additional codes installed on remote supercomputers. For more information on how to set up codes, please refer to the corresponding documentation.

The polarization is computed by running the command line of undi (python -m undi) as a shell job (with aiida-shell). The python (undi) code is therefore a python, with the core.shell plugin, whose environment has undi installed: it is python3-shell@localhost, created when the plugin is installed. If it is not in the list of the codes, open a terminal and run aiidalab-qe-muon setup-python3, then reload the page.

Tasks

  1. Select 1 node and 1 CPU for the pw.x and pp.x codes below
  2. Select the python (undi) code, python3-shell@localhost, with 1 node and 1 CPU, and set cpus-per-task to 4: click on the More button to see more resources settings and find the corresponding one. undi uses them as its parallel (OpenMP) threads
  3. (Optional) customize the workflow label
  4. (Optional) add a workflow description
  5. Click the Submit button to proceed
Warning: The workflow may take a moment to submit.
Below you can monitor the status of the calculation, that might take several minutes to conclude even if we are using the fast protocol. Click on the Results panel. In the results panel, each tab will open results pertaining to a specific calculation submitted by the workflow.
See further instructions below in the Muon results tab.
When muon results are available, the Load results button will become active allowing us to load the results from AiiDA.

Tasks

  1. Once the calculation is complete, click on the Load results button to load the available results
  2. Check the table and, for the lowest energy site (there will be only one site, label is A), compute the distance between the μ and the F atom, by selecting the atoms in the structure viewer below the table (just click on atoms to select/deselect them). The measured distance should be 2.21 Å, and can be found in the panel on the right with respect to the structure view.
  3. Verify that indeed closest F atoms are repelled by the muon center (at variance with the case where the muon is charged); this can be easily seen in the Distortion plot, below the structure viewer.
Here below we can plot the polarization data for all the detected muon sites (in this case, one).

Tasks

  1. Check the relaxation function for site A, and verify that the signal at zero field (ZF) is indeed different from the Kubo-Toyabe one (you will need to tick the box "Add Kubo-Toyabe in the plot" to show it). At which time does the relaxation function start to deviate from the Kubo-Toyabe one?
  2. Verify that the polarization function is converged for maxhdim > 102: the curves for maxhdim=102 and 104 are compared with the reference one (106, the largest one; with the Fast protocol the polarization plot uses 105). This can be seen in the Convergence analysis panel.

Post-guide exercises

  1. Use the app to run the same workflow but, this time, increasing the number of external magnetic fields you are computing for the polarization function.
  2. Try to use, as starting structure, the conventional cell of LiF, and see how the muon sites change.
  3. Load the full calculation (sites+polarization in supercell) from the AiiDAlab examples, as discussed below, and inspect it:
    • Click on the Download examples button at the top of this page
    • Import the example labeled Example: LiF muons, stopping sites and polarization function
    • Find it in the Calculation history page and open it
    • (you can use the filter to search for the label "sites+polarization").