Skip to content

Commit

Permalink
deploy: b0a5193
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Jan 5, 2025
1 parent 312e639 commit 3b7a1df
Show file tree
Hide file tree
Showing 25 changed files with 671 additions and 261 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Binary file modified .doctrees/velph-command.doctree
Binary file not shown.
Binary file added .doctrees/velph-init-template.doctree
Binary file not shown.
Binary file modified .doctrees/velph-init.doctree
Binary file not shown.
Binary file modified .doctrees/velph-subcommands.doctree
Binary file not shown.
1 change: 1 addition & 0 deletions _sources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ workflow
phelel-command
velph-command
velph-init
velph-init-template
velph-subcommands
velph-example
changelog
Expand Down
23 changes: 11 additions & 12 deletions _sources/velph-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ The `velph` command is a convenient tool for systematically performing
electron-phonon interaction calculations using the VASP code and for analyzing
the resulting data.

## What does the `velph` command do?

The `velph` command orchestrates the electron-phonon (el-ph) calculation
workflow {ref}`workflow <workflow>` by running a series of subcommands in a
specific sequence. These subcommands can:
specific sequence.

- Execute `phelel`.
- Generate VASP input files for:
- Dielectric constant calculations
- Born effective charge calculations
- Electronic band structure and density of states calculations
(all of which are required for subsequent electron-phonon interaction calculations)
- Generate VASP input files for phonon and lattice thermal conductivity calculations using phonopy and phono3py.
## `velph` subcommands

## Listing `velph` subcommands
The `velph` command includes a variety of subcommands. To initiate an
electron–phonon (el-ph) calculation, run `velph init` to generate the
`velph.toml` file. Command options for `velph init` are detailed in
{ref}`velph_init`. Once the `velph.toml` file is prepared, other `velph`
subcommands generate VASP input files, post-process VASP calculation results,
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`.

You can see a list of supported subcommands by simply typing:
A list of supported subcommands is displayed by typing:

```
% velph
Expand Down
104 changes: 104 additions & 0 deletions _sources/velph-init-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
(velph_init_template)=
# `velph init` template

`velph init` is the command to prepare `velph.toml`. Without specifying a
velph-toml-template, the default template is used. Custom template can be
specified as follows:

```
% velph init [OPTIONS] CELL_FILENAME PROJECT_FOLDER --template-toml velph-tmpl.toml
```

The `velph-tmpl.toml` (arbitrary file name) is almost like the `velph.toml`
file. It means that the `velph-tmpl.toml` may be created modifying
`velph.toml`. The sections that exist only in the `velph-tmpl.toml` but not in
`velph.toml` is `[init.options]`. This can be used as alternatives of command
options of `velph-init`, e.g.,

```toml
[init.options]
kspacing = 0.2
kspacing_dense = 0.1
max_num_atoms = 120
```

These `[init.options]` keywords can be found along with the list of the command
options by

```
% velph init --help
```

## Settings in sections of `velph.toml`

Note that the same can be applied to `velph-tmpl.toml`.

### Default INCAR settings

The default INCAR settins are written in `[vasp.incar]`. These settings are
overwritten by `[vasp.CALC_TYPE.incar]` (`CALC_TYPE` can be `phelel`, `relax`,
`nac`, `transport`, `phono3py`, `phono3py.phonon`, etc).

### Scheduler settings

The parameters used for generating the job submission script are specified as
strings in `[scheduler]`. If `[vasp.CALC_TYPE.scheduler]` is
specified, `[scheduler]` settings are overwritten by the settings for
`[vasp.CALC_TYPE]`. The content in this section operates through [Python string
formatting](https://docs.python.org/3/library/stdtypes.html#str.format), using
replacement fields named after keyword arguments. Each parameter line in the
`[scheduler]` section is treated as a keyword argument, which is then inserted
into the string format.

In the `[scheduler]` section, the parameters `scheduler_name` and
`scheduler_template` have special roles:

- `scheduler_name`: Specifies the template type, with options `slurm`, `sge`, or
`custom`. For `slurm` and `sge`, the template string (i.e.,
`scheduler_template`) is
[hard-coded](https://github.com/phonopy/phelel/blob/develop/src/phelel/velph/utils/scheduler.py).
If `custom` is selected, the string provided by `scheduler_template` is used,
into which the parameters are inserted.
- `scheduler_template`: The string template where parameters defined in this
section are inserted.

An example is shown below.

```toml
[scheduler]
scheduler_name = "sge"
job_name = "PbTe"
mpirun_command = "mpirun"
vasp_binary = "/usr/local/cluster-1/bin/vasp_std"
pe = "vienna 32"
prepend_text = '''
source /opt/intel/oneapi/setvars.sh --config="/home/togo/.oneapi-config"
'''

...
[vasp.phelel.scheduler]
pe = "paris 24"

...
[vasp.phonopy.scheduler]
scheduler_template = '''#!/bin/bash
#QSUB2 core 192
#QSUB2 mpi 192
#QSUB2 smp 1
#QSUB2 wtime 48:00:00
#PBS -N {job_name}
cd $PBS_O_WORKDIR
{prepend_text}
{mpirun_command} {vasp_binary} | tee vasp_output
{append_text}
'''
job_name = "PbTe"
mpirun_command = "mpijob"
vasp_binary = "/usr/local/cluster-2/bin/vasp_std"
prepend_text = '''
. /etc/profile.d/modules.sh
module load inteloneapi22u3
'''
append_text = ""
```
109 changes: 2 additions & 107 deletions _sources/velph-init.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(velph_init)=
# `velph init`

`velph init` with command options will generate modified `velph.toml` from the
Expand All @@ -10,7 +11,7 @@ template.
be specified, POSCAR-format crystal structure and directory name that is created
where `velph.toml` is stored. The available options are explained below. Some
options can be specified in `[init.options]` section of the velph-toml template
file (see {ref}`velph-init-template`).
file (see {ref}`velph_init_template`).

## `velph init` options

Expand Down Expand Up @@ -79,109 +80,3 @@ String corresponding to INCAR MAGMOM tag value for unit cell, e.g., "24*1" or "0
0 1". This is similar to `MAGMOM` tag in phonopy, see
https://phonopy.github.io/phonopy/setting-tags.html#magmom. In velph, the
asterisk symbol (`*`) is supported.


(velph-init-template)=
## `velph init` template

`velph init` is the command to prepare `velph.toml`. Without specifying a
velph-toml-template, the default template is used. Custom template can be
specified as follows:

```
% velph init [OPTIONS] CELL_FILENAME PROJECT_FOLDER --template-toml velph-tmpl.toml
```

The `velph-tmpl.toml` (arbitrary file name) is almost like the `velph.toml`
file. It means that the `velph-tmpl.toml` may be created modifying
`velph.toml`. The sections that exist only in the `velph-tmpl.toml` but not in
`velph.toml` is `[init.options]`. This can be used as alternatives of command
options of `velph-init`, e.g.,

```toml
[init.options]
kspacing = 0.2
kspacing_dense = 0.1
max_num_atoms = 120
```

These `[init.options]` keywords can be found along with the list of the command
options by

```
% velph init --help
```

## Settings in sections of `velph.toml`

Note that the same can be applied to `velph-tmpl.toml`.

### Default INCAR settings

The default INCAR settins are written in `[vasp.incar]`. These settings are
overwritten by `[vasp.CALC_TYPE.incar]` (`CALC_TYPE` can be `phelel`, `relax`,
`nac`, `transport`, `phono3py`, `phono3py.phonon`, etc).

### Scheduler settings

The parameters used for generating the job submission script are specified as
strings in `[scheduler]`. If `[vasp.CALC_TYPE.scheduler]` is
specified, `[scheduler]` settings are overwritten by the settings for
`[vasp.CALC_TYPE]`. The content in this section operates through [Python string
formatting](https://docs.python.org/3/library/stdtypes.html#str.format), using
replacement fields named after keyword arguments. Each parameter line in the
`[scheduler]` section is treated as a keyword argument, which is then inserted
into the string format.

In the `[scheduler]` section, the parameters `scheduler_name` and
`scheduler_template` have special roles:

- `scheduler_name`: Specifies the template type, with options `slurm`, `sge`, or
`custom`. For `slurm` and `sge`, the template string (i.e.,
`scheduler_template`) is
[hard-coded](https://github.com/phonopy/phelel/blob/develop/src/phelel/velph/utils/scheduler.py).
If `custom` is selected, the string provided by `scheduler_template` is used,
into which the parameters are inserted.
- `scheduler_template`: The string template where parameters defined in this
section are inserted.

An example is shown below.

```toml
[scheduler]
scheduler_name = "sge"
job_name = "PbTe"
mpirun_command = "mpirun"
vasp_binary = "/usr/local/cluster-1/bin/vasp_std"
pe = "vienna 32"
prepend_text = '''
source /opt/intel/oneapi/setvars.sh --config="/home/togo/.oneapi-config"
'''

...
[vasp.phelel.scheduler]
pe = "paris 24"

...
[vasp.phonopy.scheduler]
scheduler_template = '''#!/bin/bash
#QSUB2 core 192
#QSUB2 mpi 192
#QSUB2 smp 1
#QSUB2 wtime 48:00:00
#PBS -N {job_name}
cd $PBS_O_WORKDIR
{prepend_text}
{mpirun_command} {vasp_binary} | tee vasp_output
{append_text}
'''
job_name = "PbTe"
mpirun_command = "mpijob"
vasp_binary = "/usr/local/cluster-2/bin/vasp_std"
prepend_text = '''
. /etc/profile.d/modules.sh
module load inteloneapi22u3
'''
append_text = ""
```
3 changes: 3 additions & 0 deletions _sources/velph-subcommands.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
(velph_subcommands)=
# `velph` subcommands

`velph init` is

## `velph phelel`

This command calculates the derivatives of local potentials and PAW strengths
Expand Down
1 change: 1 addition & 0 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<li class="toctree-l1"><a class="reference internal" href="phelel-command.html"><code class="docutils literal notranslate"><span class="pre">phelel</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-command.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init-template.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code> template</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-subcommands.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> subcommands</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-example.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> example</a></li>
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Change Log</a></li>
Expand Down
1 change: 1 addition & 0 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<li class="toctree-l1"><a class="reference internal" href="phelel-command.html"><code class="docutils literal notranslate"><span class="pre">phelel</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-command.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init-template.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code> template</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-subcommands.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> subcommands</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-example.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> example</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change Log</a></li>
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
<li class="toctree-l1"><a class="reference internal" href="phelel-command.html"><code class="docutils literal notranslate"><span class="pre">phelel</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-command.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init-template.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code> template</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-subcommands.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> subcommands</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-example.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> example</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change Log</a></li>
Expand Down
1 change: 1 addition & 0 deletions install.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
<li class="toctree-l1"><a class="reference internal" href="phelel-command.html"><code class="docutils literal notranslate"><span class="pre">phelel</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-command.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init-template.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code> template</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-subcommands.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> subcommands</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-example.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> example</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change Log</a></li>
Expand Down
Binary file modified objects.inv
Binary file not shown.
1 change: 1 addition & 0 deletions phelel-command.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
<li class="toctree-l1 current active"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">phelel</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-command.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init-template.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code> template</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-subcommands.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> subcommands</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-example.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> example</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change Log</a></li>
Expand Down
1 change: 1 addition & 0 deletions search.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
<li class="toctree-l1"><a class="reference internal" href="phelel-command.html"><code class="docutils literal notranslate"><span class="pre">phelel</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-command.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> command</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-init-template.html"><code class="docutils literal notranslate"><span class="pre">velph</span> <span class="pre">init</span></code> template</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-subcommands.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> subcommands</a></li>
<li class="toctree-l1"><a class="reference internal" href="velph-example.html"><code class="docutils literal notranslate"><span class="pre">velph</span></code> example</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change Log</a></li>
Expand Down
Loading

0 comments on commit 3b7a1df

Please sign in to comment.