Skip to content

Commit

Permalink
chore: rename bands and dos calculation files according to convention
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Dec 26, 2023
1 parent 4edfde3 commit d4befe3
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions docs/hands-on/bands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ consistent field calculation](scf). 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 +33,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
2 changes: 1 addition & 1 deletion docs/hands-on/convergence.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Now we can plot the total energy with respect to ecutwfc. The data is in

We will use matplotlib to make the plots. Here is the python code for plotting:

```python title="notebooks/si-plots.ipynb" showLineNumbers
```python title="notebooks/silicon-scf.ipynb" showLineNumbers
import matplotlib.pyplot as plt
from matplotlib import rcParamsDefault
import numpy as np
Expand Down
12 changes: 6 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,7 +31,7 @@ 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
```

Next, we have prepared the input file for the `nscf` calculation. Where is have
Expand All @@ -46,21 +46,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
2 changes: 1 addition & 1 deletion docs/hands-on/scf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ have to provide the full path where the `pw.x` executable is located.

:::

Now lets look at the output file `pw.scf.silicon.out` and see how the
Now let's look at the output file `pw.scf.silicon.out` and see how the
convergence is reached:

```bash
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
restart_mode = 'from_scratch',
prefix = 'silicon',
outdir = './tmp/'
pseudo_dir = './pseudos/'
pseudo_dir = '../pseudos/'
verbosity = 'high'
/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
restart_mode = 'from_scratch',
prefix = 'silicon',
outdir = './tmp/'
pseudo_dir = './pseudos/'
pseudo_dir = '../pseudos/'
verbosity = 'high'
/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
restart_mode = 'from_scratch',
prefix = 'silicon',
outdir = './tmp/'
pseudo_dir = './pseudos/'
pseudo_dir = '../pseudos/'
verbosity = 'high'
/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
restart_mode = 'from_scratch',
prefix = 'silicon',
outdir = './tmp/'
pseudo_dir = './pseudos/'
pseudo_dir = '../pseudos/'
verbosity = 'high'
/

Expand Down

0 comments on commit d4befe3

Please sign in to comment.