Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Jan 10, 2025
1 parent d97ab1d commit 1f89249
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 74 deletions.
66 changes: 66 additions & 0 deletions doc/velph-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ and calculate derivatives of the local potential and PAW strengths with respect
to atomic displacement, resulting in the `phelel_params.hdf5` file. Most of the
`velph` subcommands are explained in {ref}`velph_subcommands`.

A typical workflow of velph subcommands for transport property calculation is
illustrated below.

```{mermaid}
graph LR
A[velph-init] --> B[velph-relax]
B --> C[velph-init]
C --> D[velph-nac]
C --> E[velph-el_bands]
F[velph-phelel]
D --> F
E --> F
F --> G[velph-transport]
```

A list of supported subcommands is displayed by typing:

```bash
Expand All @@ -46,6 +61,57 @@ Commands:
transport Choose transport options.
```

In the following example, two `velph init` command operations generate two
different directories. The first operation performs crystal structure relaxation
in the `relax` directory. The second operation, using the relaxed crystal
structure, carries out additional calculations required for electron-phonon
interactions in the `calc` directory. Details about `velph-tmpl.toml` are
described in {ref}`velph_init_template`.

```bash
% ls
POSCAR-unitcell POTCAR velph-tmpl.toml
% velph init --template-toml velph-tmpl.toml POSCAR-unitcell relax
...
% cd relax
% velph relax generate
...
# Run VASP relaxation calculation
...
% cd ..
% ls
POSCAR-unitcell POTCAR relax/ velph-tmpl.toml
% velph init --template-toml velph-tmpl.toml `ls relax/relax/iter*/CONTCAR|tail -n 1` calc
...
% cd calc
% ls
POTCAR velph.toml
% velph nac generate
VASP input files were made in "nac".
% ls
POTCAR nac/ velph.toml
...
# Run NAC calculation
...
% velph phelel init
Found "nac" directory. Read NAC params.
"phelel/phelel_disp.yaml" was generated.
VASP input files will be generated by "velph phelel generate".
% velph phelel generate
VASP input files were generated in "phelel/disp-000".
VASP input files were generated in "phelel/disp-001".
VASP input files were generated in "phelel/disp-002".
VASP input files were generated in "phelel/disp-003".
VASP input files were generated in "phelel/disp-004".
% ls
POTCAR nac/ phelel/ velph.toml
% velph phelel init
Found "nac" directory. Read NAC params.
"phelel/phelel_disp.yaml" was generated.
VASP input files will be generated by "velph phelel generate".
...
```

(velph_hints)=
## `velph hints`

Expand Down
157 changes: 83 additions & 74 deletions doc/velph-subcommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,80 +9,6 @@ The following subcommands must be executed in the directory containing the
properly organized relative to the current directory where `velph.toml` is
located.

A typical workflow of velph subcommands for transport property calculation is
illustrated below.

```{mermaid}
graph LR
A[velph-init] --> B[velph-relax]
B --> C[velph-init]
C --> D[velph-nac]
C --> E[velph-el_bands]
F[velph-phelel]
D --> F
E --> F
F --> G[velph-transport]
```

In the following example, two `velph init` command operations generate two
different directories. The first operation performs crystal structure relaxation
in the `relax` directory. The second operation, using the relaxed crystal
structure, carries out additional calculations required for electron-phonon
interactions in the `calc` directory. Details about `velph-tmpl.toml` are
described in {ref}`velph_init_template`.

```bash
% ls
POSCAR-unitcell POTCAR velph-tmpl.toml
% velph init --template-toml velph-tmpl.toml POSCAR-unitcell relax
...
% cd relax
% velph relax generate
...
# Run VASP relaxation calculation
...
% cd ..
% ls
POSCAR-unitcell POTCAR relax/ velph-tmpl.toml
% velph init --template-toml velph-tmpl.toml `ls relax/relax/iter*/CONTCAR|tail -n 1` calc
...
% cd calc
% ls
POTCAR velph.toml
% velph nac generate
VASP input files were made in "nac".
% ls
POTCAR nac/ velph.toml
...
# Run NAC calculation
...
% velph phelel init
Found "nac" directory. Read NAC params.
"phelel/phelel_disp.yaml" was generated.
VASP input files will be generated by "velph phelel generate".
% velph phelel generate
VASP input files were generated in "phelel/disp-000".
VASP input files were generated in "phelel/disp-001".
VASP input files were generated in "phelel/disp-002".
VASP input files were generated in "phelel/disp-003".
VASP input files were generated in "phelel/disp-004".
% ls
POTCAR nac/ phelel/ velph.toml
% velph phelel init
Found "nac" directory. Read NAC params.
"phelel/phelel_disp.yaml" was generated.
VASP input files will be generated by "velph phelel generate".
...
```

## `velph init`

See {ref}`velph_init`.

## `velph hints`

See {ref}`velph_hints`.

## `velph relax`

It is recommended to create a project directory secific for relaxation
Expand Down Expand Up @@ -338,12 +264,95 @@ Phonon band structure plot was saved in "ph_bands/ph_bands.pdf".

## `velph phono3py`

This subcommand facilitates lattice thermal conductivity calculations using the
phono3py code. To use this subcommand, the `velph.toml` file must include a
`[phono3py]` section configured as shown below:

```toml
[phono3py]
supercell_dimension = [2, 2, 2]
amplitude = 0.03
diagonal = false
plusminus = true
```

### `velph phono3py init`

The `phono3py_disp.yaml` file, which contains displacement information, is
generated by this subcommand. It is recommended to use the `--rd` option with a
sufficiently large argument to create supercells with random directional
displacements. Note that it is not necessary to calculate forces for all
supercells to ultimately generate the `phono3py_params.yaml` file.

```bash
% velph phono3py init --rd 2000
Displacement distance: 0.03
Number of displacements: 2000
Found "nac" directory. Read NAC params.
"phono3py/phono3py_disp.yaml" was generated.
VASP input files will be generated by "velph phono3py generate".
```

### `velph phono3py generate`

VASP input files for supercell force calculations are generated, with each
directory corresponding to a specific supercell displacement configuration. The
perfect supercell (i.e., without displacements) is labeled as `disp-00000`.

For example:

```bash
% velph phono3py generate
VASP input files were generated in "phono3py/disp-0000".
VASP input files were generated in "phono3py/disp-0001".
...
```

After completing supercell force calculations using the VASP code, the
`phono3py_params.yaml` file can be created with the following command:

```bash
% phono3py --cfz phono3py/disp-00000/vasprun.xml --cf3 phono3py/disp-{00001..00120}/vasprun.xml --sp
```

In this step, forces from 120 supercells are collected, and the corresponding
data are stored in the `phono3py_params.yaml` file.

## `velph phonopy`

The purpose of this subcommand is nearly identical to that of `velph phono3py`.

```toml
[phonopy]
supercell_dimension = [2, 2, 2]
amplitude = 0.03
diagonal = false
plusminus = true
```

### `velph phonopy init`

```bash
% velph phonopy init --rd 10
Displacement distance: 0.03
Number of displacements: 10
Found "nac" directory. Read NAC params.
"phonopy/phonopy_disp.yaml" was generated.
VASP input files will be generated by "velph phonopy generate".
```

### `velph phonopy generate`

```bash
% velph phonopy generate
VASP input files were generated in "phonopy/disp-000".
VASP input files were generated in "phonopy/disp-001".
...
```

After completing supercell force calculations using the VASP code, the
`phonopy_params.yaml` file can be created with the following command:

```bash
% phonopy --fz phonopy/disp-{00000..00010}/vasprun.xml --sp
```

0 comments on commit 1f89249

Please sign in to comment.