Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOF-7063: new documentation on DFT+U and Hubbard parameter calculation #262

Merged
merged 6 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "esse"]
path = data/esse
url = https://github.com/Exabyte-io/exabyte-esse.git
url = https://github.com/Exabyte-io/esse.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Leave more than one empty line (2-3) when "coming back" to higher-level header f

#### Admonition Styles

There are multiple [admonition](https://squidfunk.github.io/mkdocs-material/extensions/admonition/) classes available in MKDocs: tip (green), warning (orange), error (red), note (blue), and many others. To insert them in documentation pages, enter them with the following style:
There are multiple [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) classes available in MKDocs: tip (green), warning (orange), error (red), note (blue), and many others. To insert them in documentation pages, enter them with the following style:

```text
!!!tip "Unused credits"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added images/tutorials/hubbard/hubbard-09-result.webp
Binary file not shown.
153 changes: 153 additions & 0 deletions lang/en/docs/tutorials/dft/electronic/hubbard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"descriptionLinks": [
"DFT+U and Hubbard parameter Calculation in Quantum Espresso: https://docs.mat3ra.com/tutorials/dft/electronic/hubbard/"
],
"description": "In this tutorial, we demonstrate calculation of Hubbard U parameters from the first principles, using Quantum Espresso hp.x implementation of linear response theorem. First we create a workflow unit to run DFT+U calculation, then we add another unit to run hp.x calculation. We have chosen FeO as our material for this example. We first run pw scf calculation using default values U values (1 eV) for Fe 3d and O 2p orbitals. After the job is finished, the obtained Hubbard parameters are shown in the Results tab of our web interface.",
"tags": [
{
"...": "../../../metadata/general.json#/tags"
},
{
"...": "../../../models-directory/dft.json#/tags"
},
{
"...": "../../../software-directory/modeling/quantum-espresso.json#/tags"
},
"correlation",
"Hubbard"
],
"title": "Mat3ra Tutorial: DFT+U and Hubbard parameter Calculation in Quantum Espresso",
"youTubeCaptions": [
{
"text": "Tutorial on Hubbard parameter calculation",
"startTime": "00:00:00.000",
"endTime": "00:00:02.000"
},
{
"text": "First navigate to workflow page and create new workflow",
"startTime": "00:00:02.250",
"endTime": "00:00:05.500"
},
{
"text": "Expand details pane",
"startTime": "00:00:08.000",
"endTime": "00:00:09.500"
},
{
"text": "Select Quantum Espresso version 7.2",
"startTime": "00:00:10.000",
"endTime": "00:00:12.500"
},
{
"text": "Click edit unit",
"startTime": "00:00:13.000",
"endTime": "00:00:14.000"
},
{
"text": "Expand details and select Hubbard U template",
"startTime": "00:00:14.500",
"endTime": "00:00:17.500"
},
{
"text": "Close unit modal",
"startTime": "00:00:18.000",
"endTime": "00:00:19.500"
},
{
"text": "Add new execution unit",
"startTime": "00:00:20.000",
"endTime": "00:00:22.000"
},
{
"text": "Edit second unit",
"startTime": "00:00:23.000",
"endTime": "00:00:24.500"
},
{
"text": "Expand details and select HP dot X executable",
"startTime": "00:00:26.000",
"endTime": "00:00:29.000"
},
{
"text": "Close unit modal",
"startTime": "00:00:29.500",
"endTime": "00:00:31.000"
},
{
"text": "Let's rename workflow to Hubbard",
"startTime": "00:00:31.500",
"endTime": "00:00:34.000"
},
{
"text": "Save and exit workflow",
"startTime": "00:00:35.000",
"endTime": "00:00:37.000"
},
{
"text": "Navigate to jobs page",
"startTime": "00:00:41.000",
"endTime": "00:00:43.000"
},
{
"text": "Create new job",
"startTime": "00:00:45.500",
"endTime": "00:00:47.000"
},
{
"text": "Select material",
"startTime": "00:00:50.500",
"endTime": "00:00:51.500"
},
{
"text": "Here we choose iron oxide",
"startTime": "00:00:54.000",
"endTime": "00:00:56.500"
},
{
"text": "Select workflow",
"startTime": "00:00:59.000",
"endTime": "00:00:60.000"
},
{
"text": "Navigate to important settings tab",
"startTime": "00:01:07.000",
"endTime": "00:01:09.500"
},
{
"text": "Scroll down to Hubbard section",
"startTime": "00:01:10.000",
"endTime": "00:01:11.500"
},
{
"text": "Add or modify atomic species, orbital, and initial Hubbard U values",
"startTime": "00:01:12.000",
"endTime": "00:01:16.000"
},
{
"text": "Go to compute tab",
"startTime": "00:01:17.000",
"endTime": "00:01:18.500"
},
{
"text": "Select at least two cores",
"startTime": "00:01:20.500",
"endTime": "00:01:22.000"
},
{
"text": "Save and exit job",
"startTime": "00:01:22.500",
"endTime": "00:01:24.500"
},
{
"text": "Submit job to run calculation",
"startTime": "00:01:28.000",
"endTime": "00:01:29.250"
},
{
"text": "Once job is complete, Hubbard parameters are shown in results tab",
"startTime": "00:01:29.500",
"endTime": "00:01:31.000"
}
],
"youTubeId": "33PykNO8QlQ"
}
98 changes: 98 additions & 0 deletions lang/en/docs/tutorials/dft/electronic/hubbard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# DFT+U and Hubbard parameter calculation in Quantum Espresso

In this tutorial, we demonstrate how to perform DFT+U calculation, followed by
calculation of Hubbard parameters using Quantum Espresso on our web platform.

## Create DFT+U workflow

First, we need to create PWscf workflow with DFT+U enabled.

### Add pw.x unit

A PWscf calculation
(using `pw.x`) is a prerequisite for the Hubbard parameter (using `hp.x`) calculation.

- Navigate to the workflows page from the sidebar and create a new workflow. Expand
details section and select Quantum Espresso version `7.2` from the drop-down.

![Navigation sidebar](/images/tutorials/hubbard/hubbard-01-navigation-sidebar.webp "Navigation sidebar")

![Select application version and build](/images/tutorials/hubbard/hubbard-02-select-ver-build.webp "Select application version and build")

- Click **Edit** button on the default **pw_scf** workflow unit. Expand the details
pane in the unit modal, and select **pw_scf_dft_u** flavor/ template. Close the
unit modal.

![Select executable and flavor](/images/tutorials/hubbard/hubbard-03-select-executable-flavor.webp "Select executable and flavor")

!!!warning
Here we follow the latest DFT+U syntax and method introduced in Quantum
Espresso version `7.1`. The new template (syntax) **pw_scf_dft_u** is only
available to Quantum Espresso version `7.1` or above. If the user would like
to use old syntax, please select Quantum Espresso version `7.0` or below
and use **pw_scf_dft_u_legacy**.


### Add hp.x unit to the workflow

Hubbard parameters can be obtained from the *first principles*. We will use
Quantum Espresso `hp.x` implementation of Linear Response theorem[^1].

We can add the `hp.x` workflow to the previous PWscf (DFT+U) workflow by adding a new
execution unit. Click the edit unit button on the second unit, and select `hp.x`
executable. The `q`-grid for `hp.x` can be modified in the important settings
tab.

![Add new unit](/images/tutorials/hubbard/hubbard-04-add-new-unit.webp "Add new unit")


## Create and submit job

After the above:

- Navigate to the jobs page via the sidebar menu and create a new job.
- Select material. Here, we have selected FeO. You can import new material from
banks or upload structure files.
- Select workflow, here, we select the Hubbard workflow that we just created.

![Select material and workflow](/images/tutorials/hubbard/hubbard-05-select-mat-workflow.webp "Select material and workflow")

- Navigate to **Important Settings** tab, and scroll down to **hubbard**
section. Here we are able to specify the Hubbard U values specific to atomic
species and orbital (Hubbard manifold). You can add new or delete a row in the
Hubbard card.

![Important settings](/images/tutorials/hubbard/hubbard-06-imp-settings.webp "Important settings")

![Edit Hubbard card](/images/tutorials/hubbard/hubbard-07-card-values.webp "Edit Hubbard card")

- Go to **Compute** tab, and select the number of processors and other compute
parameters.

![Set compute parameters](/images/tutorials/hubbard/hubbard-08-compute-parameters.webp "Set compute parameters")

!!!warning
As of 20/Dec/2023, there is a bug in our platform that prevents running MPI
jobs in a single processor when the Intel (default) build of Quantum Espresso is
used. Please select at least two processors/ cores when using Intel
build as a workaround. Alternatively, you may use the GNU build of Quantum
Espresso.

- Now, we are ready to submit the job for running the calculation.

![Results](/images/tutorials/hubbard/hubbard-09-result.webp "Results")

Once the job is finished, the Hubbard U values are shown in the **Results** tab.

## Step-by-step screenshare video

In the below animation, we go through an example calculation.

<div class="video-wrapper">
<iframe class="gifffer" width="100%" height="100%" src="https://www.youtube.com/embed/33PykNO8QlQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>


## References

[^1]: [HP – A code for the calculation of Hubbard parameters using density-functional perturbation theory, I. Timrov, N. Marzari, M. Cococcioni, Computer Physics Communications, **279**, 108455 (2022)](https://doi.org/10.1016/j.cpc.2022.108455).
10 changes: 8 additions & 2 deletions lang/en/docs/tutorials/dft/electronic/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ We review the steps involved in the calculation and visualization of the [Fermi

## [HSE Calculations](hse-vasp-bg.md)

[In other tutorial](hse-vasp-bg.md), we demonstrate how the use of the hybrid HSE functional can yield more accurate results for the example case of a band-gap computation with [VASP](../../../software-directory/modeling/vasp/overview.md).
[In other tutorial](hse-vasp-bg.md), we demonstrate how the use of the hybrid HSE functional can yield more accurate results for the example case of a band-gap computation with [VASP](../../../software-directory/modeling/vasp/overview.md).

A similar Band Gap calculation with Quantum ESPRESSO is [available here](hse-qe-bg.md). And for the Band Structure - in [this tutorial](hse-qe-bs.md).

## GW Calculations

This [tutorial](gw-vasp-bg.md) illustrates how the results for the Band Gap can be more accurate through the use of the [GW Approximation](../../../models-directory/dft/notes.md#the-gw-approximation).

## Valence Band Offset

We show how to calculate the [valence band offset](../../../properties-directory/scalar/valence-band-offset.md) for a
heterostructure using the potential lineup method in [this tutorial](valence-band-offset.md).

## DFT+U calculation and Hubbard Parameters

In [this tutorial](hubbard.md) we show how to perform DFT+U calculation in
Quantum Espresso. We also show calculation of Hubbard parameters from the
*first principles*.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ nav:
- Electronic density mesh: tutorials/dft/electronic/electronic-density-mesh.md
- Fermi Surface: tutorials/dft/electronic/fermi-surface.md
- Valence Band Offset: tutorials/dft/electronic/valence-band-offset.md
- Hubbard U (QE): tutorials/dft/electronic/hubbard.md
- Vibrational Prop.:
- Overview: tutorials/dft/vibrational/overview.md
- Zero Point Energy: tutorials/dft/vibrational/zero-point-energy.md
Expand Down
2 changes: 1 addition & 1 deletion scripts/video-manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_text_to_speech_api_client():
"""
Returns TextToSpeech API client.
"""
return texttospeech.TextToSpeechClient.from_service_account_file(SERVICE_ACCOUNT_KEY_FILE.name)
return texttospeech.TextToSpeechClient.from_service_account_file(SERVICE_ACCOUNT_KEY_FILE)


def get_youtube_api_client():
Expand Down
Loading