Skip to content

Commit

Permalink
Merge branch 'develop' into publish-gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Nov 12, 2024
2 parents 7623be1 + 0c20678 commit 18209cd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
6 changes: 3 additions & 3 deletions doc/command-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ When using `phono3py-load` (see also {ref}`phono3py_load_command`)
This specifies input unit cell filename.

```bash
% phono3py -c POSCAR-unitcell ... (options)
% phono3py -c POSCAR-unitcell [OPTIONS]
```

## Calculator interface
Expand Down Expand Up @@ -193,7 +193,7 @@ created from `FORCES_FC2` and `phono3py_disp.yaml` instead of `FORCES_FC3` and
`phono3py_disp.yaml`.

```bash
% phono3py --cfs --dim-fc2="x x x"
% phono3py --cfs --dim-fc2 4 4 4
```

(sp_option)=
Expand Down Expand Up @@ -283,7 +283,7 @@ order force constants with larger supercell size. The filename is the same as
that created in the usual phono3py run without `--dim-fc2` option.

```bash
% phono3py --dim="2 2 2" --dim_fc2="4 4 4" -c POSCAR-unitcell ... (many options)
% phono3py --dim 2 2 2 --dim_fc2 4 4 4 -c POSCAR-unitcell [OPTIONS]
```

(pa_option)=
Expand Down
6 changes: 3 additions & 3 deletions doc/cutoff-pair.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Force constants calculation with cutoff pair-distance
```{note}
Since usage of this calculation is complicated. It is recommended to try
{ref}`random-displacements` with `--fc-calc-opt "cutoff = VAL"` before trying
this option.
To reduce the computational demands of force constants or lattice thermal
conductivity calculations, it is recommended to try {ref}`pypolymlp-interface`
instead of using the `--cutoff-pair` option.
```

Here the detail of the command option {ref}`--cutoff-pair <cutoff_pair_option>`
Expand Down
39 changes: 27 additions & 12 deletions doc/pypolymlp.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ in the distribution from GitHub or PyPI.
conda-forge (recommended). Otherwise, pypolymlp can be installed from
source-code.

- [symfc](https://github.com/symfc/symfc)

Installed via pip, conda-forge, or source code.

## How to calculate

### Workflow
Expand Down Expand Up @@ -357,14 +353,6 @@ an additional 200 supercells. In total, 400 supercells are created. The forces
for these supercells are then evaluated. Finally, the force constants are
calculated using symfc.

## Convergence with respect to dataset size

In general, increasing the amount of data improves the accuracy of representing
force constants. Therefore, it is recommended to check the convergence of the
target property with respect to the number of supercells in the training
dataset. Lattice thermal conductivity may be a convenient property to monitor
when assessing convergence.

## Parameters for developing MLPs

A few parameters can be specified using the `--mlp-params` option for the
Expand Down Expand Up @@ -401,3 +389,30 @@ For parameter adjustments, it is recommended to consult the
This method provides a straightforward dataset split: the first `ntrain`
supercells from the list are used for training, while the last `ntest`
supercells are reserved for testing.

## Convergence with respect to dataset size

In general, increasing the amount of data improves the accuracy of representing
force constants. Therefore, it is recommended to check the convergence of the
target property with respect to the number of supercells in the training
dataset. Lattice thermal conductivity may be a convenient property to monitor
when assessing convergence.

For example, by preparing an initial set with 100 supercell data, calculations
can then be performed by varying the size of the training dataset while keeping
the test dataset unchanged as follows:

```bash
% phono3py-load --pypolymlp --mlp-params="ntrain=20, ntest=20" --br --mesh 40 phono3py_params.yaml | tee log-20
% phono3py-load --pypolymlp --mlp-params="ntrain=40, ntest=20" --br --mesh 40 phono3py_params.yaml | tee log-40
% phono3py-load --pypolymlp --mlp-params="ntrain=60, ntest=20" --br --mesh 40 phono3py_params.yaml | tee log-60
% phono3py-load --pypolymlp --mlp-params="ntrain=80, ntest=20" --br --mesh 40 phono3py_params.yaml | tee log-80
```

The computed lattice thermal conductivities (LTCs) are plotted against the size
of the training dataset to observe LTC convergence. If the LTC has not
converged, an additional set of supercell data (e.g., forces and energies in
the next 100 supercells) will be computed and included. With this procedure in
mind, it may be convenient to generate a sufficiently large number of supercells
with random displacements in advance, such as 1000 supercells, before starting
the LTC calculation with pypolymlp.

0 comments on commit 18209cd

Please sign in to comment.