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

add workflow links to mat3ra #26

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 13 additions & 9 deletions docs/hands-on/bands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ title: Bandstructure Calculation
sidebar_label: Bandstructure
---

import Mat3raAdmonition from '../../src/apps/mat3ra';

<Mat3raAdmonition url="https://platform.mat3ra.com/seminar/projects/seminar-espresso-tutorials/jobs/DgNA7K8o46K6CTM6W" />

Before we can run `bands` calculation, we need to perform single-point [self
consistent field calculation](scf.mdx). We have our input `scf` file with some
new parameters:

import CodeBlock from '@theme/CodeBlock';
import si_bands_scf_in from '!!raw-loader!/src/silicon/si_bands_scf.in';
import si_bands_scf_in from '!!raw-loader!/src/silicon/pw.scf.silicon_bands.in';

<CodeBlock language="bash" title="src/silicon/si_bands_scf.in" showLineNumbers>{si_bands_scf_in}</CodeBlock>
<CodeBlock language="bash" title="src/silicon/pw.scf.silicon_bands.in" showLineNumbers>{si_bands_scf_in}</CodeBlock>

Run the `scf` calculation:

```bash
pw.x < si_bands_scf.in > si_bands_scf.out
pw.x < pw.scf.silicon_bands.in > pw.scf.silicon_bands.out
```

Next step is our band calculation (non-self consistent field) calculation. The
Expand All @@ -33,28 +37,28 @@ also in the unoccupied bands above the Fermi energy. Number of occupied bands
can be found in the `scf` output as number of Kohn-Sham states. Below is a
sample input file for the band calculation:

import si_bands_in from '!!raw-loader!/src/silicon/si_bands.in';
import si_bands_in from '!!raw-loader!/src/silicon/pw.bands.silicon.in';

<CodeBlock language="bash" title="src/silicon/si_bands.in" showLineNumbers>{si_bands_in}</CodeBlock>
<CodeBlock language="bash" title="src/silicon/pw.bands.silicon.in" showLineNumbers>{si_bands_in}</CodeBlock>

Run `pw.x` with `bands` calculation input file:

```bash
pw.x < si_bands.in > si_bands.out
pw.x < pw.bands.silicon.in > pw.bands.silicon.out
```

After the bands calculation is performed, we need some postprocessing using
`bands.x` utility in order to obtain the data in more usable format. Input file
for `bands.x` postprocessing:

import si_bands_pp_in from '!!raw-loader!/src/silicon/si_bands_pp.in';
import si_bands_pp_in from '!!raw-loader!/src/silicon/pp.bands.silicon.in';

<CodeBlock language="bash" title="src/silicon/si_bands_pp.in" showLineNumbers>{si_bands_pp_in}</CodeBlock>
<CodeBlock language="bash" title="src/silicon/pp.bands.silicon.in" showLineNumbers>{si_bands_pp_in}</CodeBlock>

Run `bands.x` from post processing (PP) module:

```bash
bands.x < si_bands_pp.in > si_bands_pp.out
bands.x < pp.bands.silicon.in > pp.bands.silicon.out
```

Finally, we run `plotband.x` to visualize bandstructure. We can either run it
Expand Down
16 changes: 10 additions & 6 deletions docs/hands-on/dos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ of DOS depends on the integration in $k$ space.
3. Finally, the DOS can be determined by integrating the electron density in $k$
space.

I have created a new input file (`si_scf_dos.in`) which is very much the same as
I have created a new input file (`pw.scf.silicon_dos.in`) which is very much the same as
our previous scf input file except some parameters are modified. You can find
all the input files in my [GitHub repository](
https://github.com/pranabdas/espresso/). We used the lattice constant value that
Expand All @@ -31,9 +31,13 @@ pseudo-potential, it might result stress in the system. We have increased the
`ecutwfc` to have better precision. We run the scf calculation:

```bash
pw.x < si_scf_dos.in > si_scf_dos.out
pw.x < pw.scf.silicon_dos.in > pw.scf.silicon_dos.out
```

import Mat3raAdmonition from '../../src/apps/mat3ra';

<Mat3raAdmonition url="https://platform.mat3ra.com/seminar/projects/seminar-espresso-tutorials/jobs/6XhvtFpEc7kmwK5Q3" />

Next, we have prepared the input file for the `nscf` calculation. Where is have
added `occupations` in the `&system` card as `tetrahedra` (appropriate for DOS
calculation). We have increased the number of k-points to 12 × 12 × 12 with
Expand All @@ -46,21 +50,21 @@ Kohn-Sham states.


```bash
pw.x < si_nscf_dos.in > si_nscf_dos.out
pw.x < pw.nscf.silicon_dos.in > pw.nscf.silicon_dos.out
```

Now our final step is to calculate the density of states. The DOS input file as
follows:

import CodeBlock from '@theme/CodeBlock';
import si_dos_in from '!!raw-loader!/src/silicon/si_dos.in';
import si_dos_in from '!!raw-loader!/src/silicon/pp.dos.silicon.in';

<CodeBlock language="bash" title="src/silicon/si_dos.in" showLineNumbers>{si_dos_in}</CodeBlock>
<CodeBlock language="bash" title="src/silicon/pp.dos.silicon.in" showLineNumbers>{si_dos_in}</CodeBlock>

We run:

```bash
dos.x < si_dos.in > si_dos.out
dos.x < pp.dos.silicon.in > pp.dos.silicon.out
```

The DOS data in the `si_dos.dat` file that we specified in our input file. We
Expand Down
4 changes: 4 additions & 0 deletions docs/hands-on/scf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ lines can be added with lines starting with a `!` like in Fortran. Also,
parameter names are not case-sensitive, i.e., `&control` and `&CONTROL` are the
same.

import ColabBadge from '../../src/apps/colab';

<ColabBadge notebook="silicon-scf.ipynb" />

import CodeBlock from '@theme/CodeBlock';
import pw_scf_silicon_in from '!!raw-loader!/src/silicon/pw.scf.silicon.in';

Expand Down
14 changes: 7 additions & 7 deletions docs/hands-on/wannier.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Wannier method

1. Perform `scf` calculation using Quantum Espresso `pw.x`

```console
```bash
QE_PATH="/workspaces/q-e-qe-7.2/bin"
mpirun -np 4 ${QE_PATH}/pw.x -i pw.scf.silicon.in > pw.scf.silicon.out
```
Expand All @@ -15,42 +15,42 @@ mpirun -np 4 ${QE_PATH}/pw.x -i pw.scf.silicon.in > pw.scf.silicon.out
to provide explicit list of k-points. Such explicit list of k-points can be
generated using perl script included in the Wannier package under utility.

```console
```bash
WANNIER_PATH="/workspaces/wannier90-3.1.0"
# directly append the k-points to the input file
${WANNIER_PATH}/utility/kmesh.pl 4 4 4 >> pw.nscf.silicon.in
```

Run `nscf` calculation:

```console
```bash
mpirun -np 4 ${QE_PATH}/pw.x -i pw.nscf.silicon.in > pw.nscf.silicon.out
```

3. Prepare input file for wannier90 (`silicon.win`). Here we need the k-points
list without the weights:

```console
```bash
${WANNIER_PATH}/utility/kmesh.pl 4 4 4 wan
```

4. Generate nnkp input:

```console
```bash
# we can just provide the seedname or seedname.win
${WANNIER_PATH}/wannier90.x -pp silicon
```

5. Create input file for `pw2wan`, and generate initial projections:

```console
```bash
mpirun -np 4 ${WANNIER_PATH}/pw2wannier90.x -i pw2wan.silicon.in > pw2
wan.silicon.out
```

6. Run wannier calculation:

```console
```bash
mpirun -np 4 ${WANNIER_PATH}/wannier90.x silicon
```

Expand Down
Loading