Updated document toward v2 release

This commit is contained in:
Atsushi Togo 2021-07-21 10:39:47 +09:00
parent ffff9e61f1
commit 7561c4c878
12 changed files with 538 additions and 548 deletions

1
.gitignore vendored
View File

@ -35,6 +35,7 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject
.vscode
# Doc
.buildinfo

View File

@ -40,14 +40,16 @@ How to use ``phono3py-kaccum``
Let's computer lattice thermal conductivity of Si using the ``Si-PBEsol``
example found in the example directory.
::
.. code-block:: shell
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="11 11 11" --sym-fc --br
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="11 11 11" --sym-fc --br
Then using the output file, ``kappa-m111111.hdf5``, run
``phono3py-kaccum`` as follows::
``phono3py-kaccum`` as follows:
% phono3py-kaccum --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell kappa-m111111.hdf5 |tee kaccum.dat
.. code-block:: shell
% phono3py-kaccum --pa="F" -c POSCAR-unitcell kappa-m111111.hdf5 |tee kaccum.dat
Here ``--pa`` is optional. The definition of ``--pa`` option is same
as :ref:`pa_option`. ``POSCAR-unitcell`` is the unit cell filename
@ -66,7 +68,7 @@ temperatures calculated.
To plot the output by gnuplot at temperature index 30 that may
correspond to 300 K,
::
.. code-block:: shell
% gnuplot
...
@ -106,9 +108,11 @@ POSCAR-unitcell``.
^^^^^^^^
Let ``phono3py-kaccum`` read a QE (pw) unit cell file with ``-c``
option, for example::
option, for example:
phono3py-kaccum --qe --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c Si.in kappa-m191919.hdf5
.. code-block:: bash
phono3py-kaccum --qe --pa="F" -c Si.in kappa-m191919.hdf5
.. |ipwscf| image:: Si-kaccum-pwscf.png
:width: 25%
@ -201,25 +205,25 @@ convergence.
``--gv``
^^^^^^^^^
^^^^^^^^
Outer product of group velocities :math:`\mathbf{v}_\lambda \otimes
\mathbf{v}_\lambda` divided by primitive cell volume (in :math:`\text{THz}^2 /
\text{Angstrom}`)
``--average``
^^^^^^^^^^^^^^
^^^^^^^^^^^^^
Output the traces of the tensors divided by 3 rather than the unique
elements.
``--trace``
^^^^^^^^^^^^
^^^^^^^^^^^
Output the traces of the tensors rather than the unique elements.
Options for scalar properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For the following properties, those values are normalized by the
number of full grid points. This is understood as normalized for one
@ -230,31 +234,36 @@ frequency, cumulative property, and derivative of cumulative property
such like DOS.
``--gamma``
^^^^^^^^^^^^
^^^^^^^^^^^
:math:`\Gamma_\lambda(\omega_\lambda)` (in THz)
``--tau``
^^^^^^^^^^^
^^^^^^^^^
Lifetime :math:`\tau_\lambda = \frac{1}{2\Gamma_\lambda(\omega_\lambda)}` (in ps)
``--cv``
^^^^^^^^^
^^^^^^^^
Modal heat capacity :math:`C_\lambda` (in eV/K)
``--gv-norm``
^^^^^^^^^^^^^^
^^^^^^^^^^^^^
Absolute value of group velocity :math:`|\mathbf{v}_\lambda|` (in
:math:`\text{THz}\cdot\text{Angstrom}`)
``--pqj``
^^^^^^^^^^^^^^
^^^^^^^^^
Averaged phonon-phonon interaction :math:`P_{\mathbf{q}j}` (in :math:`\text{eV}^2`)
``--dos``
^^^^^^^^^
Constant value of 1. This results in phonon DOS.
.. _auxiliary_tools_kdeplot:
``phono3py-kdeplot``
@ -271,7 +280,9 @@ Then (frequency, lifetime)-data points are superimposed on the density
plot.
``phono3py-kdeplot`` reads a result of the thermal conductivity
calculation as the first argument::
calculation as the first argument:
.. code-block:: shell
% phono3py-kdeplot kappa-m111111.hdf5
@ -318,7 +329,7 @@ This option controls the resolution of the density plot. The default
value is 100. With larger nbins, the resolution of the plot becomes
better, but the computation will take more time.
::
.. code-block:: shell
% phono3py-kdeplot --nbins=200 kappa-m111111.hdf5
@ -342,7 +353,7 @@ respectively.
of drawing region along y-axis, therefore as a side effect, the
computation will be roughly twice faster.
::
.. code-block:: shell
% phono3py-kdeplot --ymax=60 kappa-m111111.hdf5
@ -363,7 +374,7 @@ maximum density. Normally smaller value results in larger drawing
region. The default value is 0.1. When ``--ymax`` is specified
together, this option is ignored.
::
.. code-block:: shell
% phono3py-kdeplot --dr=0.01 kappa-m111111.hdf5
@ -375,7 +386,7 @@ presented at the matplotlib documentation,
https://matplotlib.org/users/colormaps.html. The default colormap
depends on your matplotlib environment.
::
.. code-block:: shell
% phono3py-kdeplot --cmap="OrRd" kappa-m111111.hdf5

View File

@ -13,7 +13,9 @@ instead of and together with the command options. The setting tags are
mostly equivalent to the respective most command options, but when
both are set simultaneously, the command options are preferred. An
example of configuration (e.g., saved in a file ``setting.conf``) is
as follow::
as follow:
.. code-block:: bash
DIM = 2 2 2
DIM_FC2 = 4 4 4
@ -27,13 +29,13 @@ as follow::
where the setting tag names are case insensitive. This is run by
::
.. code-block:: bash
% phono3py setting.conf [comannd options]
or
::
.. code-block:: bash
% phono3py [comannd options] -- setting.conf
@ -50,7 +52,7 @@ Input cell file name
This specifies input unit cell filename.
::
.. code-block:: bash
% phono3py -c POSCAR-unitcell ... (many options)
@ -83,18 +85,18 @@ These options have no respective configuration file tags.
``--cf3`` (command option only)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is used to create ``FORCES_FC3`` from ``disp_fc3.yaml`` and
force calculator outputs containing forces in supercells. ``disp_fc3.yaml``
This is used to create ``FORCES_FC3`` from ``phono3py_disp.yaml`` and
force calculator outputs containing forces in supercells. ``phono3py_disp.yaml``
has to be located at the current directory. Calculator interface has
to be specified except for VASP (default) case.
::
.. code-block:: bash
% phono3py --cf3 disp-{00001..00755}/vasprun.xml
::
.. code-block:: bash
% phono3py --qe --cf3 supercell_out/disp-{00001..00111}/Si.out
% phono3py --cf3 supercell_out/disp-{00001..00111}/Si.out
.. _cf3_file_option:
@ -102,16 +104,18 @@ to be specified except for VASP (default) case.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is used to create ``FORCES_FC3`` from a text file containing a
list of calculator output file names. ``disp_fc3.yaml`` has to be
list of calculator output file names. ``phono3py_disp.yaml`` has to be
located at the current directory. Calculator interface has to be
specified except for VASP (default) case.
::
.. code-block:: bash
% phono3py --cf3-file file_list.dat
where ``file_list.dat`` contains file names that can be recognized
from the current directory and is expected to be like::
from the current directory and is expected to be like:
.. code-block:: bash
disp-00001/vasprun.xml
disp-00002/vasprun.xml
@ -128,12 +132,12 @@ to be used together with ``--cutoff-pair`` option.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is used to create ``FORCES_FC2`` similarly to ``--cf3``
option. ``disp_fc2.yaml`` has to be located at the current
option. ``phono3py_disp.yaml`` has to be located at the current
directory. This is optional. Calculator interface has to be specified
except for VASP (default) case. ``FORCES_FC2`` is necessary to run
with ``--dim-fc2`` option.
::
.. code-block:: bash
% phono3py --cf2 disp_fc2-{00001..00002}/vasprun.xml
@ -153,7 +157,7 @@ the forces of the perfect supercells. In ideal case, these forces are
zero, but often they are not. Here, this is called "residual
forces". Sometimes quality of force constants is improved in this way.
::
.. code-block:: bash
% phono3py --cf3 disp3-{00001..01254}/vasprun.xml --cfz disp3-00000/vasprun.xml
% phono3py --cf2 disp2-{00001..00006}/vasprun.xml --cfz disp2-00000/vasprun.xml
@ -163,10 +167,10 @@ forces". Sometimes quality of force constants is improved in this way.
``--fs2f2`` or ``--force-sets-to-forces-fc2`` (command option only)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``FORCES_FC2`` and ``disp_fc2.yaml`` are created
from phonopy's ``FORCE_SETS`` file.
``FORCES_FC2`` is created from phonopy's ``FORCE_SETS`` file.
Necessary yaml lines for ``phono3py_disp.yaml`` is displayed as text.
::
.. code-block:: bash
% phono3py --fs2f2
@ -176,17 +180,17 @@ from phonopy's ``FORCE_SETS`` file.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Phonopy's ``FORCE_SETS`` is created from
``FORCES_FC3`` and ``disp_fc3.yaml``.
``FORCES_FC3`` and ``phono3py_disp.yaml``.
::
.. code-block:: bash
% phono3py --cfs
In conjunction with :ref:`--dim-fc2 <dim_fc2_option>`, phonopy's
``FORCE_SETS`` is created from ``FORCES_FC2`` and ``disp_fc2.yaml``
instead of ``FORCES_FC3`` and ``disp_fc3.yaml``.
``FORCE_SETS`` is created from ``FORCES_FC2`` and ``phono3py_disp.yaml``
instead of ``FORCES_FC3`` and ``phono3py_disp.yaml``.
::
.. code-block:: bash
% phono3py --cfs --dim-fc2="x x x"
@ -199,7 +203,9 @@ Supercell and primitive cell
~~~~~~~~~~~~~~~~~~~
Supercell dimension is specified. See the
detail at http://phonopy.github.io/phonopy/setting-tags.html#dim .
detail at http://phonopy.github.io/phonopy/setting-tags.html#dim.
When a proper ``phono3py_disp.yaml`` exists in the current directory,
this is unnecessary to be specified.
.. _dim_fc2_option:
@ -208,6 +214,8 @@ detail at http://phonopy.github.io/phonopy/setting-tags.html#dim .
Supercell dimension for 2nd order force constants (for harmonic
phonons) is specified. This is optional.
When a proper ``phono3py_disp.yaml`` exists in the current directory,
this is unnecessary to be specified.
A larger and different supercell size for 2nd order force constants
than that for 3rd order force constants can be specified with this
@ -218,31 +226,31 @@ order force constants may be a good idea.
Using this option with ``-d`` option, the structure files
(e.g. ``POSCAR_FC2-xxxxx`` or equivalent files for the other
interfaces) and ``disp_fc2.yaml`` are created. These are used to
interfaces) and ``phono3py_disp.yaml`` are created. These are used to
calculate 2nd order force constants for the larger supercell size and
these force calculations have to be done in addition to the usual
force calculations for 3rd order force constants.
::
.. code-block:: bash
phono3py -d --dim="2 2 2" --dim-fc2="4 4 4" -c POSCAR-unitcell
After the force calculations, ``--cf2`` option is used to create
``FORCES_FC2``.
::
.. code-block:: bash
phono3py --cf2 disp-{001,002}/vasprun.xml
To calculate 2nd order force constants for the larger supercell size,
``FORCES_FC2`` and ``disp_fc2.yaml`` are necessary. Whenever running
``FORCES_FC2`` and ``phono3py_disp.yaml`` are necessary. Whenever running
phono3py for the larger 2nd order force constants, ``--dim-fc2``
option has to be specified. ``fc2.hdf5`` created as a result of
running phono3py contains the 2nd order force constants with
larger supercell size. The filename is the same as that created in the
usual phono3py run without ``--dim-fc2`` option.
::
.. code-block:: bash
phono3py --dim="2 2 2" --dim_fc2="4 4 4" -c POSCAR-unitcell ... (many options)
@ -253,7 +261,9 @@ usual phono3py run without ``--dim-fc2`` option.
Transformation matrix from a non-primitive cell to the primitive
cell. See phonopy ``PRIMITIVE_AXES`` tag (``--pa`` option) at
http://phonopy.github.io/phonopy/setting-tags.html#primitive-axis
http://phonopy.github.io/phonopy/setting-tags.html#primitive-axis.
When a proper ``phono3py_disp.yaml`` exists in the current directory,
this is unnecessary to be specified.
Displacement creation
---------------------
@ -265,8 +275,10 @@ Displacement creation
Supercell with displacements are created. Using with ``--amplitude``
option, atomic displacement distances are controlled. With this
option, files for supercells with displacements and ``disp_fc3.yaml``
file are created.
option, files for supercells with displacements and ``phono3py_disp.yaml``
file are created. ``--pa`` should be specified if the input unit cell
structure is not a primitive cell, e.g., ``--pa="F"`` if the input
unit cell has F-centring.
.. _amplitude_option:
@ -304,9 +316,9 @@ using with ``--sym-fc``, the calculated results will become slightly
different due to imperfect symmetrization scheme that phono3py
employs.
::
.. code-block:: bash
% phono3py --dim="2 2 2" --cfc --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell
% phono3py --dim="2 2 2" --cfc --pa="F" -c POSCAR-unitcell
.. _symmetrization_option:
@ -398,9 +410,9 @@ Indices of grid points are specified by space or comma (``,``)
separated numbers. The mapping table between grid points to its
indices is obtained by running with ``--loglevel=2`` option.
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --write-gamma --gp="0 1 2 3 4 5"
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --write-gamma --gp="0 1 2 3 4 5"
where ``--gp="0 1 2 3 4 5"`` can be also written
``--gp="0,1,2,3,4,5"``. ``--ga`` option below can be used similarly
@ -432,7 +444,7 @@ indices used to be averaged. The calculated values at indices
separated by space are averaged, and those separated by comma are
separately calculated.
::
.. code-block:: bash
% phono3py --fc3 --fc2 --dim="2 2 2" --mesh="16 16 16" -c POSCAR-unitcell --nac --gp="34" --bi="4 5, 6"
@ -457,9 +469,9 @@ grid points and their grid addresses in integers. Q-points
corresponding to grid points are calculated divided these integers by
sampling mesh numbers for respective reciprocal axes.
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --wgp
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --wgp
.. _stp_option:
@ -471,9 +483,9 @@ points for specified sampling mesh numbers are shown. This can be used
to estimate how large a calculation is. Only those for specific grid
points are shown by using with ``--gp`` or ``--ga`` option.
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --stp --gp 20
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --stp --gp 20
Brillouin zone integration
---------------------------
@ -585,7 +597,7 @@ parameters are read from database of the natural abundance data for
elements, which refers Laeter *et al.*, Pure Appl. Chem., **75**, 683
(2003).
::
.. code-block:: bash
% phono3py --dim="3 3 2" -v --mesh="32 32 20" -c POSCAR-unitcell --br --isotope
@ -599,11 +611,15 @@ option. For example of GaN, this may be set like ``--mv="1.97e-4
of atoms in the primitive cell.
Isotope effect to thermal conductivity may be checked first running
without isotope calculation::
without isotope calculation:
.. code-block:: bash
% phono3py --dim="3 3 2" -v --mesh="32 32 20" -c POSCAR-unitcell --br
Then running with isotope calculation::
Then running with isotope calculation:
.. code-block:: bash
% phono3py --dim="3 3 2" -v --mesh="32 32 20" -c POSCAR-unitcell --br --read-gamma --mv="1.97e-4 1.97e-4 0 0"
@ -660,13 +676,13 @@ together with ``-o`` option is strongly recommended.
First, run full conductivity calculation,
::
.. code-block:: bash
% phono3py --dim="3 3 2" -v --mesh="32 32 20" -c POSCAR-unitcell --br
Then
::
.. code-block:: bash
% phono3py --dim="3 3 2" -v --mesh="32 32 20" -c POSCAR-unitcell --br --read-gamma --ave-pp -o ave_pp
@ -680,7 +696,7 @@ conductivity calculation. This option works only when ``--br`` options
are activated. Therefore third-order force constants are not necessary
to input. The physical unit of the value is :math:`\text{eV}^2`.
::
.. code-block:: bash
% phono3py --dim="3 3 2" -v --mesh="32 32 20" -c POSCAR-unitcell --br --const-ave-pp=1e-10
@ -702,9 +718,9 @@ accessed by ``gamma_N`` and ``gamma_U`` keys. The shape of the arrays
is the same as that of ``gamma`` (see
:ref:`kappa_hdf5_file_gamma`). An example (Si-PBEsol) is shown below:
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="11 11 11" --fc3 --fc2 --br --nu
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="11 11 11" --fc3 --fc2 --br --nu
...
% ipython
@ -748,7 +764,7 @@ Temperature
Specific temperatures are specified by ``--ts``.
::
.. code-block:: bash
% phono3py --fc3 --fc2 --dim="2 2 2" -v --mesh="11 11 11" -c POSCAR-unitcell --br --ts="200 300 400"
@ -760,7 +776,7 @@ Temperatures at equal interval are specified by ``--tmax``,
http://phonopy.github.io/phonopy/setting-tags.html#tprop-tmin-tmax-tstep
.
::
.. code-block:: bash
% phono3py --fc3 --fc2 --dim="2 2 2" -v --mesh="11 11 11" -c POSCAR-unitcell --br --tmin=100 --tmax=1000 --tstep=50
@ -782,7 +798,7 @@ first line of ``BORN`` file.
This is used with ``--nac`` to specify reciprocal-space direction
at :math:`\mathbf{q}\rightarrow \mathbf{0}`. See the detail
at http://phonopy.github.io/phonopy/setting-tags.html#q-direction .
at http://phonopy.github.io/phonopy/setting-tags.html#q-direction.
.. _write_gamma_option:
@ -800,7 +816,7 @@ calculated with respect to :math:`\omega`. The output is written to
with respect to frequency in THz (without :math:`2\pi`). Frequency sampling
points can be specified by :ref:`freq_sampling_option`.
::
.. code-block:: bash
% phono3py --fc3 --fc2 --dim="2 2 2" --mesh="16 16 16" -c POSCAR-unitcell --nac --q-direction="1 0 0" --gp=0 --ise --bi="4 5, 6"
@ -832,9 +848,9 @@ are the values given as follows, respectively,
\Delta(-\mathbf{q}+\mathbf{q}'+\mathbf{q}'') \delta(\omega-\omega_{\lambda'}
-\omega_{\lambda''}).
::
.. code-block:: bash
% phono3py --fc2 --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="16 16 16" --jdos --ga="0 0 0 8 8 8"
% phono3py --fc2 --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="16 16 16" --jdos --ga="0 0 0 8 8 8"
When temperatures are specified, two classes of weighted JDOS are
calculated. The result is written into
@ -856,9 +872,9 @@ the values given as follows, respectively,
(n_{\lambda'}+ n_{\lambda''}+1) \delta( \omega - \omega_{\lambda'} -
\omega_{\lambda''}).
::
.. code-block:: bash
% phono3py --fc2 --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="16 16 16" --jdos --ga="0 0 0 8 8 8" --ts=300
% phono3py --fc2 --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="16 16 16" --jdos --ga="0 0 0 8 8 8" --ts=300
This is an example of ``Si-PBEsol``.
@ -891,11 +907,15 @@ Mode-Gruneisen parameter from 3rd order force constants
Mode-Gruneisen-parameters are calculated from fc3.
Mesh sampling mode::
Mesh sampling mode:
.. code-block:: bash
% phono3py --fc3 --fc2 --dim="2 2 2" -v --mesh="16 16 16" -c POSCAR-unitcell --nac --gruneisen
Band path mode::
Band path mode:
.. code-block:: bash
% phono3py --fc3 --fc2 --dim="2 2 2" -v -c POSCAR-unitcell --nac --gruneisen --band="0 0 0 0 0 1/2"
@ -1015,9 +1035,9 @@ Phonon frequencies, eigenvectors, and grid point addresses are stored
in ``phonon-mxxx.hdf5`` file. :ref:`--pa <pa_option>` and :ref:`--nac
<nac_option>` may be required depending on calculation setting.
::
.. code-block:: bash
% phono3py --fc2 --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --mesh="11 11 11" -c POSCAR-unitcell --nac --write-phoonon
% phono3py --fc2 --dim="2 2 2" --pa="F" --mesh="11 11 11" -c POSCAR-unitcell --nac --write-phoonon
Contents of ``phonon-mxxx.hdf5`` are watched by::
@ -1065,9 +1085,9 @@ different eigenvalue solvers or different CPU
architectures. :ref:`--pa <pa_option>` and :ref:`--nac <nac_option>`
may be required depending on calculation setting.
::
.. code-block:: bash
% phono3py --fc2 --fc3 --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --mesh="11 11 11" -c POSCAR-unitcell --nac --read-phoonon --br
% phono3py --fc2 --fc3 --dim="2 2 2" --pa="F" --mesh="11 11 11" -c POSCAR-unitcell --nac --read-phoonon --br
.. _write_read_pp_option:
@ -1086,13 +1106,13 @@ conductivity calculation, in writing and reading, ph-ph interaction
strength has to be stored in memory, so there is overhead in memory
than usual RTA calculation.
::
.. code-block:: bash
% phono3py --fc2 --fc3 --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --mesh="11 11 11" -c POSCAR-unitcell --nac --write-pp --br --gp=1
% phono3py --fc2 --fc3 --dim="2 2 2" --pa="F" --mesh="11 11 11" -c POSCAR-unitcell --nac --write-pp --br --gp=1
::
.. code-block:: bash
% phono3py --fc2 --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --mesh="11 11 11" -c POSCAR-unitcell --nac --read-pp --br --gp=1
% phono3py --fc2 --dim="2 2 2" --pa="F" --mesh="11 11 11" -c POSCAR-unitcell --nac --read-pp --br --gp=1
.. _hdf5_compression_option:
@ -1125,8 +1145,6 @@ This rule is applied to
- ``kappa-xxx.hdf5``
- ``phonon-xxx.hdf5``
- ``pp-xxx.hdf5``
- ``disp_fc3.yaml``
- ``disp_fc2.yaml``
- ``gamma_detail-xxx.hdf5`` (write only)
.. _input_filename_option:
@ -1147,8 +1165,6 @@ This rule is applied to
- ``kappa-xxx.hdf5``
- ``phonon-xxx.hdf5``
- ``pp-xxx.hdf5``
- ``disp_fc3.yaml``
- ``disp_fc2.yaml``
``--io`` (command option only)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
"""Sphinx phono3py configuration file."""
#
# phono3py documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 26 13:13:14 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
# This file is execfile()d with the current directory set to its containing
# dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
@ -11,22 +12,23 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# -- General configuration ----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
#extensions = ['sphinx.ext.imgmath']
extensions = ['sphinx.ext.mathjax']
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# extensions = ['sphinx.ext.imgmath']
extensions = ['sphinx.ext.mathjax', 'myst_parser']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -35,7 +37,7 @@ templates_path = ['_templates']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
@ -49,52 +51,53 @@ copyright = u'2015, Atsushi Togo'
# built documents.
#
# The short X.Y version.
version = '1.22'
version = '2.0'
# The full version, including alpha/beta/rc tags.
release = '1.22.3'
release = '2.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
# html_theme = 'default'
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []
################
# guzzle theme #
@ -145,102 +148,24 @@ pygments_style = 'sphinx'
# # "globaltoc_includehidden": False,
# }
###################
# bootstrap theme #
###################
import sphinx_bootstrap_theme
html_theme = 'bootstrap'
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
# Navigation bar title. (Default: ``project`` value)
'navbar_title': "Phono3py",
# Tab name for entire site. (Default: "Site")
'navbar_site_name': "Site",
# A list of tuples containing pages or urls to link to.
# Valid tuples should be in the following forms:
# (name, page) # a link to a page
# (name, "/aa/bb", 1) # a link to an arbitrary relative url
# (name, "http://example.com", True) # arbitrary absolute url
# Note the "1" or "True" value above as the third argument to indicate
# an arbitrary url.
# 'navbar_links': [
# ("Examples", "examples"),
# ("Link", "http://example.com", True),
# ],
# 'navbar_links': [
# ("Options", "command-options"),
# ],
# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': True,
# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': True,
# Global TOC depth for "site" navbar tab. (Default: 1)
# Switching to -1 shows all levels.
'globaltoc_depth': 2,
# Include hidden TOCs in Site navbar?
#
# Note: If this is "false", you cannot have mixed ``:hidden:`` and
# non-hidden ``toctree`` directives in the same page, or else the build
# will break.
#
# Values: "true" (default) or "false"
'globaltoc_includehidden': "true",
# HTML navbar class (Default: "navbar") to attach to <div> element.
# For black navbar, do "navbar navbar-inverse"
# 'navbar_class': "navbar navbar-inverse",
'navbar_class': "navbar",
# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "true",
# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
# 'source_link_position': "nav",
'source_link_position': "footer",
# Bootswatch (http://bootswatch.com/) theme.
#
# Options are nothing with "" (default) or the name of a valid theme
# such as "amelia" or "cosmo".
# 'bootswatch_theme': "united",
'bootswatch_theme': "cerulean",
# Choose Bootstrap version.
# Values: "3" (default) or "2" (in quotes)
'bootstrap_version': "3",
'nosidebar': "true",
}
html_theme = 'sphinx_book_theme'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None
html_title = 'Phono3py v.%s' % release
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@ -249,64 +174,65 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'phono3pydoc'
# -- Options for LaTeX output --------------------------------------------------
# -- Options for LaTeX output -------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# (source start file, target name, title, author, documentclass [howto/manual])
# .
latex_documents = [
('index', 'phono3py.tex', u'phono3py manual',
u'Atsushi Togo', 'manual'),
@ -314,26 +240,26 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# -- Options for manual page output -------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
@ -343,10 +269,10 @@ man_pages = [
]
# If true, show URL addresses after external links.
#man_show_urls = False
# man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# -- Options for Texinfo output -----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
@ -358,10 +284,10 @@ texinfo_documents = [
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'

View File

@ -52,28 +52,21 @@ Creating supercells with displacements
``--cutoff-pair`` option is employed when creating supercells with
displacements, therefore this option must be used with ``-d`` option
when running phono3py, for example for the Si example::
when running phono3py, for the Si-PBEsol example:
.. code-block:: bash
% phono3py --cutoff-pair=5 -d --dim="2 2 2" -c POSCAR-unitcell
_ _____
_ __ | |__ ___ _ __ ___|___ / _ __ _ _
| '_ \| '_ \ / _ \| '_ \ / _ \ |_ \| '_ \| | | |
| |_) | | | | (_) | | | | (_) |__) | |_) | |_| |
| .__/|_| |_|\___/|_| |_|\___/____/| .__/ \__, |
|_| |_| |___/
1.11.11
Run mode: displacements
...
Unit cell was read from "POSCAR-unitcell".
Displacement distance: 0.03
Number of displacements: 111
Cutoff distance for displacements: 5.0
Number of displacement supercell files created: 51
_
___ _ __ __| |
/ _ \ '_ \ / _` |
| __/ | | | (_| |
\___|_| |_|\__,_|
Displacement dataset was written in "phono3py_disp.yaml".
...
% ls POSCAR-0*
POSCAR-00001 POSCAR-00032 POSCAR-00043 POSCAR-00080 POSCAR-00097
@ -95,12 +88,12 @@ displacements when this is run without ``--cutoff-pair``
option. ``Number of displacement supercell files created: 51`` gives
the contracted number of supercells with displacements by
``--cutoff-pair`` option. There number of ``POSCAR-0xxxx`` files is found
51. At this step, a special ``disp_fc3.yaml`` is created. This
1. At this step, a special ``phono3py_disp.yaml`` is created. This
contains information on this contraction and used in the other
calculation step, therefore this file must be kept carefully.
Supercell files
^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^
``POSCAR-xxxxx`` (in the other calculator interface, the prefix of the
filename is different) are not generated if distance between a pair of
@ -112,13 +105,13 @@ displacements but ``POSCAR-xxxxx`` files not being included are not
generated. The reason of this indexing is that it can be useful when
changing the cutoff-pair-distance.
Special ``disp_fc3.yaml``
^^^^^^^^^^^^^^^^^^^^^^^^^^
Special ``phono3py_disp.yaml``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Using ``--cutoff-pair`` option together with ``-d`` option, a special
``disp_fc3.yaml`` is created. This contains information on distances
``phono3py_disp.yaml`` is created. This contains information on distances
between displaced atomic-pairs and whether those pairs are to be
computed or not. This special ``disp_fc3.yaml`` is necessary to create
computed or not. This special ``phono3py_disp.yaml`` is necessary to create
fc3, therefore be careful not to overwrite it by running the option
``-d`` without ``--cutoff-pair`` or with different ``--cutoff-pair``
with different value.
@ -128,7 +121,7 @@ Making ``FORCES_FC3``
To create ``FORCES_FC3``, only output files of the supercells created
using ``--cutoff-pair`` option are passed to ``phono3py`` as the
arguments. The special ``disp_fc3.yaml`` file is necessary to be
arguments. The special ``phono3py_disp.yaml`` file is necessary to be
located at current directory.
An example is shown below for the Si example. Here, it is supposed
@ -137,146 +130,150 @@ directories. After running force calculations, there should be the
output file containing forces in each directory (for VASP
``vasprun.xml``).
::
.. code-block:: bash
% phono3py --cf3 disp-{00001,00002,00003,00016,00017,00018,00019,00024,00025,00026,00027,00032,00033,00034,00035,00036,00037,00038,00039,00040,00041,00042,00043,00070,00071,00072,00073,00074,00075,00076,00077,00078,00079,00080,00081,00082,00083,00084,00085,00086,00087,00088,00089,00096,00097,00098,00099,00100,00101,00102,00103}/vasprun.xml
_ _____
_ __ | |__ ___ _ __ ___|___ / _ __ _ _
| '_ \| '_ \ / _ \| '_ \ / _ \ |_ \| '_ \| | | |
| |_) | | | | (_) | | | | (_) |__) | |_) | |_| |
| .__/|_| |_|\___/|_| |_|\___/____/| .__/ \__, |
|_| |_| |___/
1.11.7
...
Displacement dataset is read from disp_fc3.yaml.
Displacement dataset is read from phono3py_disp.yaml.
counter (file index): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
FORCES_FC3 has been created.
_
___ _ __ __| |
/ _ \ '_ \ / _` |
| __/ | | | (_| |
\___|_| |_|\__,_|
Using :ref:`--cf3_file option <cf3_file_option>` may be recommended
when the number of force files is large. ::
Using :ref:`--cf3-file option <cf3_file_option>` may be recommended
when the number of force files is large.
.. code-block:: bash
% for i in `ls POSCAR-0*|sed s/POSCAR-//`;do echo disp-$i/vasprun.xml;done > file_list.dat
% phono3py --cf3_file file_list.dat
% phono3py --cf3-file file_list.dat
Using a python script, ``disp_fc3.yaml`` is easily parsed. So
Using a python script, ``phono3py_disp.yaml`` is easily parsed. So
it is also easy to create the file list by a python
script:
.. code-block:: python
#!/usr/bin/env python
import yaml
from phono3py.interface.phono3py_yaml import Phono3pyYaml
p3yaml = Phono3pyYaml()
p3yaml.read("phono3py_disp.yaml")
dds = p3yaml.dataset
file_name_tmpl = "disp-%05d/vasprun.xml"
dds = yaml.load(open("disp_fc3.yaml"))
count = 1
for d1 in dds['first_atoms']:
print(file_name_tmpl % count)
count += 1
for d1 in dds['first_atoms']:
for d2 in d1['second_atoms']:
for d in d2['displacements']:
if d2['included']:
print(file_name_tmpl % count)
count += 1
if d2['included']:
print(file_name_tmpl % count)
count += 1
Running phonon-phonon interaction calculation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To create fc3, ``--cutoff-pair`` option is not necessary but the
special ``disp_fc3.yaml`` is required.
special ``phono3py_disp.yaml`` is required.
::
.. code-block:: bash
% phono3py --dim="2 2 2" -c POSCAR-unitcell
% phono3py
...
Displacement dataset is read from disp_fc3.yaml.
Sets of supercell forces are read from FORCES_FC3.
Solving fc3[ 1, x, x ] with a displacement:
----------------------------- General settings -----------------------------
Run mode: None
HDF5 data compression filter: gzip
Crystal structure was read from "phono3py_disp.yaml".
Supercell (dim): [2 2 2]
Primitive matrix:
[0. 0.5 0.5]
[0.5 0. 0.5]
[0.5 0.5 0. ]
Spacegroup: Fd-3m (227)
Use -v option to watch primitive cell, unit cell, and supercell structures.
----------------------------- Force constants ------------------------------
Imposing translational and index exchange symmetry to fc2: False
Imposing translational and index exchange symmetry to fc3: False
Imposing symmetry of index exchange to fc3 in reciprocal space: False
Displacement dataset for fc3 was read from "phono3py_disp.yaml".
Sets of supercell forces were read from "FORCES_FC3".
Computing fc3[ 1, x, x ] using numpy.linalg.pinv with a displacement:
[ 0.0300 0.0000 0.0000]
Expanding fc3
Expanding fc3.
Cutting-off fc3 (cut-off distance: 5.000000)
Building atom mapping table...
Creating contracted fc3...
Writing fc3 to fc3.hdf5
max drift of fc3: 0.043921 (zyx) 0.043921 (yzx) 0.043921 (yxz)
Solving fc2
Writing fc2 to fc2.hdf5
max drift of fc2: -0.000001 (xx) -0.000001 (xx)
*************** None of ph-ph interaction was calculated. ****************
_
___ _ __ __| |
/ _ \ '_ \ / _` |
| __/ | | | (_| |
\___|_| |_|\__,_|
Writing fc3 to "fc3.hdf5".
Max drift of fc3: 0.047748 (yxz) 0.047748 (xyz) 0.047748 (xzy)
Displacement dataset for fc2 was read from "phono3py_disp.yaml".
Sets of supercell forces were read from "FORCES_FC3".
Writing fc2 to "fc2.hdf5".
Max drift of fc2: -0.000001 (zz) -0.000001 (zz)
----------- None of ph-ph interaction calculation was performed. -----------
Summary of calculation was written in "phono3py.yaml".
...
Once ``fc3.hdf5`` and ``fc2.hdf5`` are created, ``--cutoff-pair``
option and the special ``disp_fc3.yaml`` are not needed anymore.
option and the special ``phono3py_disp.yaml`` are not needed anymore.
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="11 11 11" --fc3 --fc2 --br
% phono3py --mesh="11 11 11" --fc3 --fc2 --br
...
300.0 118.778 118.778 118.778 -0.000 -0.000 0.000
300.0 108.051 108.051 108.051 0.000 0.000 -0.000
...
A script extract supercell IDs from ``disp_fc3.yaml``
-----------------------------------------------------
A script extract supercell IDs from ``phono3py_disp.yaml``
----------------------------------------------------------
The following script is an example to collect supercell IDs
with the cutoff-pair distance, for which ``included: true`` is used
to hook. ``duplicates`` in ``disp_fc3.yaml`` gives the pairs of
to hook them. ``duplicates`` in ``phono3py_disp.yaml`` gives the pairs of
exactly same supercells having different IDs. Therefore one of each
pair is necessary to calculate. As a ratio, the number is not many,
but if we want to save very much the computational demand, it is good
to consider.
::
.. code-block:: python
#!/usr/bin/env python
import yaml
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
from phono3py.interface.phono3py_yaml import Phono3pyYaml
with open("disp_fc3.yaml", 'r') as f:
data = yaml.load(f, Loader=Loader)
p3yaml = Phono3pyYaml()
p3yaml.read("phono3py_disp.yaml")
data = p3yaml.dataset
disp_ids = []
for data1 in data['first_atoms']:
disp_ids.append(data1['displacement_id'])
disp_ids.append(data1['id'])
for data1 in data['first_atoms']:
for data2 in data1['second_atoms']:
if data2['included']:
disp_ids += data2['displacement_ids']
disp_ids.append(data2['id'])
# # To remove duplicates
# duplicates = data['duplicates']
# print(len(duplicates))
# To remove duplicates
# duplicates = dict(data['duplicates'])
# disp_ids_nodup = [i for i in disp_ids if i not in duplicates]
print(" ".join(["%05d" % i for i in disp_ids]))
Even for the case that ``disp_fc3.yaml`` was created without
``--cutoff-pair`` option, if we replace the line in the above script::
Even for the case that ``phono3py_disp.yaml`` was created without
``--cutoff-pair`` option, if we replace the line in the above script:
.. code-block:: python
if data2['included']:
by
::
.. code-block:: python
if data2['distance'] < 5.0: # 5.0 is cutoff-pair distance
@ -293,11 +290,11 @@ Si-PBE
For testing, thermal conductivities with respect to ``--cutoff-pair``
values are calculated as follows. Note that if ``FORCES_FC3`` for full
fc3 elements exists, the same ``FORCES_FC3`` file can be used for
generating contracted fc3 for each special ``disp_fc3.yaml``.
generating contracted fc3 for each special ``phono3py_disp.yaml``.
::
.. code-block:: bash
% egrep '^\s+distance' disp_fc3.yaml|awk '{print $2}'|sort|uniq
% egrep '^\s+pair_distance' phono3py_disp.yaml|awk '{print $2}'|sort|uniq
0.000000
2.366961
3.865232
@ -308,50 +305,53 @@ generating contracted fc3 for each special ``disp_fc3.yaml``.
7.100884
7.730463
9.467845
% for i in {2..10};do d=`grep distance disp_fc3.yaml|awk '{print $2}'|sort|uniq|sed "${i}q;d"`; d=$((d+0.1)); phono3py --cutoff-pair=$d -o $i -d --dim="2 2 2" -c POSCAR-unitcell ;done
% ls disp_fc3.*.yaml
disp_fc3.10.yaml disp_fc3.4.yaml disp_fc3.7.yaml
disp_fc3.2.yaml disp_fc3.5.yaml disp_fc3.8.yaml
disp_fc3.3.yaml disp_fc3.6.yaml disp_fc3.9.yaml
% for i in {2..10};do grep num_displacements_created disp_fc3.$i.yaml;done
num_displacements_created: 11
num_displacements_created: 31
num_displacements_created: 51
num_displacements_created: 56
num_displacements_created: 76
num_displacements_created: 96
num_displacements_created: 104
num_displacements_created: 109
num_displacements_created: 111
% for i in {2..10};do phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="11 11 11" --br --io=$i|tee std.$i.out;done
% cp phono3py_disp.yaml phono3py_disp.orig.yaml
% for i in {2..10};do d=`grep pair_distance phono3py_disp.orig.yaml|awk '{print $2}'|sort|uniq|sed "${i}q;d"`; d=$((d+0.1)); phono3py --cutoff-pair=$d -o $i -d --pa="F" --dim="2 2 2" -c POSCAR-unitcell; mv phono3py_disp.yaml phono3py_disp.$i.yaml; done
% ls phono3py_disp.*.yaml
% ls phono3py_disp.*.yaml
phono3py_disp.10.yaml phono3py_disp.5.yaml phono3py_disp.9.yaml
phono3py_disp.2.yaml phono3py_disp.6.yaml phono3py_disp.orig.yaml
phono3py_disp.3.yaml phono3py_disp.7.yaml
phono3py_disp.4.yaml phono3py_disp.8.yaml
% for i in {2..10};do grep number_of_pairs_in_cutoff phono3py_disp.$i.yaml;done
number_of_pairs_in_cutoff: 10
number_of_pairs_in_cutoff: 30
number_of_pairs_in_cutoff: 50
number_of_pairs_in_cutoff: 55
number_of_pairs_in_cutoff: 75
number_of_pairs_in_cutoff: 95
number_of_pairs_in_cutoff: 103
number_of_pairs_in_cutoff: 108
number_of_pairs_in_cutoff: 110
% for i in {2..10};do cp phono3py_disp.$i.yaml phono3py_disp.yaml; phono3py --mesh="11 11 11" --br|tee std.$i.out;done
% for i in {2..10};do egrep '^\s+300' std.$i.out;done
300.0 123.559 123.559 123.559 -0.000 -0.000 0.000
300.0 118.586 118.586 118.586 -0.000 -0.000 0.000
300.0 118.778 118.778 118.778 -0.000 -0.000 0.000
300.0 118.839 118.839 118.839 -0.000 -0.000 0.000
300.0 119.433 119.433 119.433 -0.000 -0.000 0.000
300.0 119.453 119.453 119.453 -0.000 -0.000 0.000
300.0 119.466 119.466 119.466 -0.000 -0.000 0.000
300.0 119.447 119.447 119.447 -0.000 -0.000 0.000
300.0 119.445 119.445 119.445 -0.000 -0.000 0.000
% for i in {2..10};do phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="11 11 11" --sym-fc --br -i $i -o sym-$i|tee std.sym-$i.out;done
300.0 123.606 123.606 123.606 -0.000 -0.000 0.000
300.0 118.617 118.617 118.617 -0.000 -0.000 0.000
300.0 118.818 118.818 118.818 -0.000 -0.000 0.000
300.0 118.879 118.879 118.879 -0.000 -0.000 0.000
300.0 119.468 119.468 119.468 -0.000 -0.000 0.000
300.0 119.489 119.489 119.489 -0.000 -0.000 0.000
300.0 119.501 119.501 119.501 -0.000 -0.000 0.000
300.0 119.483 119.483 119.483 -0.000 -0.000 0.000
300.0 119.481 119.481 119.481 -0.000 -0.000 0.000
% for i in {2..10};do cp phono3py_disp.$i.yaml phono3py_disp.yaml; phono3py --sym-fc --mesh="11 11 11" --br|tee std.sym-$i.out;done
% for i in {2..10};do egrep '^\s+300' std.sym-$i.out;done
300.0 124.626 124.626 124.626 -0.000 0.000 0.000
300.0 119.721 119.721 119.721 -0.000 0.000 0.000
300.0 118.806 118.806 118.806 -0.000 0.000 0.000
300.0 118.741 118.741 118.741 -0.000 0.000 0.000
300.0 119.446 119.446 119.446 -0.000 0.000 0.000
300.0 119.339 119.339 119.339 -0.000 0.000 0.000
300.0 119.323 119.323 119.323 -0.000 0.000 0.000
300.0 119.313 119.313 119.313 -0.000 0.000 0.000
300.0 119.311 119.311 119.311 -0.000 0.000 0.000
300.0 124.650 124.650 124.650 -0.000 -0.000 0.000
300.0 119.765 119.765 119.765 -0.000 -0.000 0.000
300.0 118.847 118.847 118.847 -0.000 -0.000 0.000
300.0 118.782 118.782 118.782 -0.000 -0.000 0.000
300.0 119.471 119.471 119.471 -0.000 -0.000 0.000
300.0 119.366 119.366 119.366 -0.000 -0.000 0.000
300.0 119.350 119.350 119.350 -0.000 -0.000 0.000
300.0 119.339 119.339 119.339 -0.000 -0.000 0.000
300.0 119.337 119.337 119.337 -0.000 -0.000 0.000
AlN-LDA
~~~~~~~
::
.. code-block:: bash
% egrep '^\s+distance' disp_fc3.yaml|awk '{print $2}'|sort|uniq
% egrep '^\s+pair_distance' phono3py_disp.yaml|awk '{print $2}'|sort|uniq
0.000000
1.889907
1.901086
@ -374,72 +374,70 @@ AlN-LDA
6.205027
6.469591
7.335901
% for i in {2..22};do d=`egrep '^\s+distance' disp_fc3.yaml|awk '{print $2}'|sort|uniq|sed "${i}q;d"`; d=$((d+0.0001)); phono3py --cutoff-pair=$d -o $i -d --dim="3 3 2" -c POSCAR-unitcell ;done
% for i in {2..22};do grep num_displacements_created disp_fc3.$i.yaml;done
num_displacements_created: 78
num_displacements_created: 98
num_displacements_created: 202
num_displacements_created: 222
num_displacements_created: 318
num_displacements_created: 370
num_displacements_created: 466
num_displacements_created: 570
num_displacements_created: 666
num_displacements_created: 718
num_displacements_created: 718
num_displacements_created: 770
num_displacements_created: 790
num_displacements_created: 894
num_displacements_created: 934
num_displacements_created: 986
num_displacements_created: 1026
num_displacements_created: 1122
num_displacements_created: 1162
num_displacements_created: 1214
num_displacements_created: 1254
% for i in {2..22};do phono3py --dim="3 3 2" -c POSCAR-unitcell --mesh="13 13 9" --br --nac --io $i|tee std.$i.out; done
% for i in {2..22};do egrep '^\s+300\.0' std.$i.out;done
300.0 201.530 201.530 192.685 -0.000 -0.000 -0.000
300.0 212.963 212.963 204.362 -0.000 -0.000 -0.000
300.0 208.005 208.005 196.684 -0.000 -0.000 -0.000
300.0 212.213 212.213 200.778 -0.000 -0.000 -0.000
300.0 223.019 223.019 214.702 -0.000 -0.000 -0.000
300.0 223.181 223.181 214.351 -0.000 -0.000 -0.000
300.0 222.360 222.360 213.924 -0.000 -0.000 -0.000
300.0 223.245 223.245 214.561 -0.000 -0.000 -0.000
300.0 223.812 223.812 215.359 -0.000 -0.000 -0.000
300.0 223.959 223.959 215.701 -0.000 -0.000 -0.000
300.0 223.959 223.959 215.701 -0.000 -0.000 -0.000
300.0 224.507 224.507 215.384 -0.000 -0.000 -0.000
300.0 224.278 224.278 215.396 -0.000 -0.000 -0.000
300.0 223.551 223.551 212.671 -0.000 -0.000 -0.000
300.0 224.732 224.732 214.463 -0.000 -0.000 -0.000
300.0 224.291 224.291 213.270 -0.000 -0.000 -0.000
300.0 224.805 224.805 214.771 -0.000 -0.000 -0.000
300.0 224.834 224.834 215.025 -0.000 -0.000 -0.000
300.0 224.645 224.645 215.260 -0.000 -0.000 -0.000
300.0 224.769 224.769 215.220 -0.000 -0.000 -0.000
300.0 224.650 224.650 215.090 -0.000 -0.000 -0.000
% for i in {2..22};do phono3py --dim="3 3 2" -c POSCAR-unitcell --mesh="13 13 9" --sym-fc --br --nac -i $i -o sym-$i|tee std.sym-$i.out; done
% for i in {2..22};do egrep '^\s+300\.0' std.sym-$i.out;done
300.0 224.122 224.122 213.086 0.000 -0.000 0.000
300.0 225.394 225.394 215.683 0.000 -0.000 0.000
300.0 223.748 223.748 213.682 0.000 -0.000 0.000
300.0 223.973 223.973 213.543 0.000 -0.000 0.000
300.0 224.876 224.876 216.489 0.000 -0.000 0.000
300.0 224.603 224.603 216.204 0.000 -0.000 0.000
300.0 223.773 223.773 214.657 0.000 -0.000 0.000
300.0 224.173 224.173 215.517 0.000 -0.000 0.000
300.0 224.596 224.596 215.896 0.000 -0.000 0.000
300.0 224.401 224.401 215.955 0.000 -0.000 0.000
300.0 224.401 224.401 215.955 0.000 -0.000 0.000
300.0 224.077 224.077 215.565 0.000 -0.000 0.000
300.0 224.285 224.285 215.654 0.000 -0.000 0.000
300.0 224.136 224.136 215.053 0.000 -0.000 0.000
300.0 224.469 224.469 215.462 0.000 -0.000 0.000
300.0 224.109 224.109 215.011 0.000 -0.000 0.000
300.0 224.108 224.108 215.447 0.000 -0.000 0.000
300.0 224.592 224.592 215.046 0.000 -0.000 0.000
300.0 224.640 224.640 215.113 0.000 -0.000 0.000
300.0 224.344 224.344 215.203 0.000 -0.000 0.000
300.0 224.481 224.481 214.936 0.000 -0.000 0.000
% cp phono3py_disp.yaml phono3py_disp.orig.yaml
% for i in {2..21};do d=`grep pair_distance phono3py_disp.orig.yaml|awk '{print $2}'|sort|uniq|sed "${i}q;d"`; d=$((d+0.0001)); phono3py --cutoff-pair=$d -o $i -d --dim="3 3 2" -c POSCAR-unitcell; mv phono3py_disp.yaml phono3py_disp.$i.yaml; done
% for i in {2..21};do grep number_of_pairs_in_cutoff phono3py_disp.$i.yaml;done
number_of_pairs_in_cutoff: 72
number_of_pairs_in_cutoff: 92
number_of_pairs_in_cutoff: 196
number_of_pairs_in_cutoff: 216
number_of_pairs_in_cutoff: 312
number_of_pairs_in_cutoff: 364
number_of_pairs_in_cutoff: 460
number_of_pairs_in_cutoff: 564
number_of_pairs_in_cutoff: 660
number_of_pairs_in_cutoff: 712
number_of_pairs_in_cutoff: 764
number_of_pairs_in_cutoff: 784
number_of_pairs_in_cutoff: 888
number_of_pairs_in_cutoff: 928
number_of_pairs_in_cutoff: 980
number_of_pairs_in_cutoff: 1020
number_of_pairs_in_cutoff: 1116
number_of_pairs_in_cutoff: 1156
number_of_pairs_in_cutoff: 1208
number_of_pairs_in_cutoff: 1248
% for i in {2..21};do cp phono3py_disp.$i.yaml phono3py_disp.yaml; phono3py --mesh="13 13 9" --br --nac --io $i|tee std.$i.out; done
% for i in {2..21};do egrep '^\s+300\.0' std.$i.out;done
300.0 205.550 205.550 193.665 -0.000 -0.000 -0.000
300.0 218.963 218.963 204.942 -0.000 -0.000 -0.000
300.0 213.624 213.624 193.863 -0.000 -0.000 -0.000
300.0 219.932 219.932 199.819 -0.000 -0.000 -0.000
300.0 235.516 235.516 218.843 -0.000 -0.000 -0.000
300.0 234.750 234.750 217.384 -0.000 -0.000 -0.000
300.0 234.355 234.355 218.030 -0.000 -0.000 -0.000
300.0 235.381 235.381 218.609 -0.000 -0.000 -0.000
300.0 235.996 235.996 219.785 -0.000 -0.000 -0.000
300.0 236.220 236.220 219.867 -0.000 -0.000 -0.000
300.0 236.161 236.161 219.298 -0.000 -0.000 -0.000
300.0 236.096 236.096 219.313 -0.000 -0.000 -0.000
300.0 234.602 234.602 217.064 -0.000 -0.000 -0.000
300.0 235.914 235.914 218.689 -0.000 -0.000 -0.000
300.0 235.049 235.049 217.935 -0.000 -0.000 -0.000
300.0 235.877 235.877 219.065 -0.000 -0.000 -0.000
300.0 236.133 236.133 219.364 -0.000 -0.000 -0.000
300.0 236.207 236.207 219.595 -0.000 -0.000 -0.000
300.0 236.035 236.035 219.463 -0.000 -0.000 -0.000
300.0 236.104 236.104 219.348 -0.000 -0.000 -0.000
% for i in {2..21};do cp phono3py_disp.$i.yaml phono3py_disp.yaml; phono3py --mesh="13 13 9" --br --nac --io $i|tee std.$i.out; done|tee std.sym-$i.out; done
% for i in {2..21};do egrep '^\s+300\.0' std.sym-$i.out;done
300.0 232.964 232.964 216.333 0.000 -0.000 -0.000
300.0 235.442 235.442 219.602 0.000 -0.000 -0.000
300.0 235.521 235.521 217.767 0.000 -0.000 -0.000
300.0 235.581 235.581 217.687 0.000 -0.000 -0.000
300.0 236.837 236.837 219.933 0.000 -0.000 -0.000
300.0 236.020 236.020 219.324 0.000 -0.000 -0.000
300.0 235.482 235.482 218.633 0.000 -0.000 -0.000
300.0 236.313 236.313 219.677 0.000 -0.000 -0.000
300.0 236.308 236.308 219.955 0.000 -0.000 -0.000
300.0 236.074 236.074 219.882 0.000 -0.000 -0.000
300.0 235.520 235.520 219.450 0.000 -0.000 -0.000
300.0 235.769 235.769 219.562 0.000 -0.000 -0.000
300.0 235.441 235.441 219.168 0.000 -0.000 -0.000
300.0 235.892 235.892 219.590 0.000 -0.000 -0.000
300.0 235.509 235.509 219.167 0.000 -0.000 -0.000
300.0 235.646 235.646 219.521 0.000 -0.000 -0.000
300.0 235.783 235.783 219.311 0.000 -0.000 -0.000
300.0 235.887 235.887 219.301 0.000 -0.000 -0.000
300.0 235.642 235.642 219.348 0.000 -0.000 -0.000
300.0 235.728 235.728 219.102 0.000 -0.000 -0.000

View File

@ -19,12 +19,14 @@ memory space. When running multiple temperature points, simply the
memory space needed is multiplied by the number of the temperature
points. Therefore it is normally recommended to specify :ref:`--ts
option <ts_option>`. An example to run with the direct solution of
LBTE for ``example/Si-PBEsol`` is as follows::
LBTE for ``example/Si-PBEsol`` is as follows:
.. code-block:: bash
% phono3py --dim="2 2 2" --sym-fc -c POSCAR-unitcell
...
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="11 11 11" --fc3 --fc2 --lbte --ts=300
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="11 11 11" --fc3 --fc2 --lbte --ts=300
...
=================== End of collection of collisions ===================
@ -41,11 +43,8 @@ LBTE for ``example/Si-PBEsol`` is as follows::
Thermal conductivity and related properties were written into
"kappa-m111111.hdf5".
Eigenvalues of collision matrix were written into "coleigs-m111111.hdf5"
_
___ _ __ __| |
/ _ \ '_ \ / _` |
| __/ | | | (_| |
\___|_| |_|\__,_|
...
Memory usage
-------------
@ -69,9 +68,11 @@ memory space is consumed in total.
When phono3py runs with :ref:`--wgp option <wgp_option>` together with
``--lbte`` option, estimated memory space needed for storing collision
matrix is presented. An example for ``example/Si-PBEsol`` is as follows::
matrix is presented. An example for ``example/Si-PBEsol`` is as follows:
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="40 40 40" --wgp --lbte
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="40 40 40" --wgp --lbte
...
Memory requirements:
@ -149,19 +150,26 @@ The summary of the procedure is as follows:
file names of the results at different temperatures.
Examples of command options are shown below using ``Si-PBE`` example.
Irreducible grid point indices are obtained by :ref:`--wgp option<wgp_option>`::
Irreducible grid point indices are obtained by :ref:`--wgp option<wgp_option>`:
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --lbte --wgp
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --lbte --wgp
and the information is given in ``ir_grid_points.yaml``. For
distribution of collision matrix calculation (see also :ref:`workload_distribution`)::
distribution of collision matrix calculation
(see also :ref:`workload_distribution`):
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --write-collision --gp="grid_point_numbers..."
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --write-collision --gp="grid_point_numbers..."
To collect distributed pieces of the collision matrix::
To collect distributed pieces of the collision matrix:
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --read-collision=0
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --read-collision=0
Distribution of phonon-phonon interaction strengths
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -203,20 +211,26 @@ The summary of the procedure is as follows:
temperatures.
Examples of command options are shown below using ``Si-PBE`` example.
Irreducible grid point indices are obtained by :ref:`--wgp option<wgp_option>`::
Irreducible grid point indices are obtained by :ref:`--wgp option<wgp_option>`
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --lbte --wgp
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --lbte --wgp
and the grid point information is provided in
``ir_grid_points.yaml``. All phonons on mesh grid points are saved
by::
by
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc2 --write-phonon
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc2 --write-phonon
For distribution of ph-ph interaction strength calculation (see also
:ref:`workload_distribution`)::
:ref:`workload_distribution`)
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --write-pp --gp="grid_point_numbers..." --read-phonon
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --write-pp --gp="grid_point_numbers..." --read-phonon
Here one temperature has to be specified but any one of temperatures
is OK since ph-ph interaction strength computed here is assumed to be
@ -224,9 +238,9 @@ temperature independent. Then the computed ph-ph interaction strengths
are read and used to compute collision matrix and lattice thermal
conductivity at a temperature by
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --read-pp --read-phonon
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --lbte --ts=300 --read-pp --read-phonon
This last command is repeated at different temperatures to obtain the
properties at multiple temperatures.
@ -246,7 +260,9 @@ is clear gap between non-zero eigenvalue and nearly-zero eigenvalues.
After running the direct solution of LBTE, ``coleigs-mxxx.hdf5`` is
created. This contains the eigenvalues of the collision matrix (either
symmetrized or non-symmetrized). The eigenvalues are plotted using
``phono3py-coleigplot`` in the phono3py package::
``phono3py-coleigplot`` in the phono3py package:
.. code-block:: bash
phono3py-coleigplot coleigs-mxxx.hdf5

View File

@ -325,18 +325,33 @@ For example, :math:`\kappa_{\lambda,{xx}}` is calculated by::
array([ 1.02050201e+03, 1.02050201e+03, 1.02050201e+03,
4.40486209e-15, 0.00000000e+00, -4.40486209e-15])
How to know grid point number corresponding to grid address
------------------------------------------------------------
How to know grid point index number corresponding to grid address
-----------------------------------------------------------------
Runngin with ``--write-gamma``, hdf5 files are written out file names
with grid point numbers such as ``kappa-m202020-g4200.hdf5``. You may
want to know the grid point number with given grid address. This is
done using ``get_grid_point_from_address`` as follows::
Runngin with ``--write-gamma``, hdf5 files are written out with file names
such as ``kappa-m202020-g4448.hdf5``. You may want to know the grid point
index number with given grid address. This is done as follows:
In [1]: from phono3py.phonon3.triplets import get_grid_point_from_address
.. code-block:: python
In [2]: get_grid_point_from_address([0, 10, 10], [20, 20, 20])
Out[2]: 4200
In [1]: import phono3py
Here the first argument of this method is the grid address and the
second argument is the mesh numbers.
In [2]: ph3 = phono3py.load("phono3py_disp.yaml")
In [3]: ph3.mesh_numbers = [20, 20, 20]
In [4]: ph3.grid.get_indices_from_addresses([0, 10, 10])
Out[4]: 4448
This index number is different between phono3py version 1.x and 2.x.
To get the number corresponding to the phono3py version 1.x,
``store_dense_gp_map=False`` should be specified in ``phono3py.load``,
.. code-block:: python
In [5]: ph3 = phono3py.load("phono3py_disp.yaml", store_dense_gp_map=False)
In [6]: ph3.mesh_numbers = [20, 20, 20]
In [7]: ph3.grid.get_indices_from_addresses([0, 10, 10])
Out[7]: 4200

View File

@ -18,17 +18,11 @@ The following files are not compatible with phonopy. But phonopy's
``FORCE_SETS`` file can be created using phono3py command options from
the following files. See the detail at :ref:`file_format_compatibility`.
``disp_fc3.yaml``
^^^^^^^^^^^^^^^^^^
``phono3py_disp.yaml``
^^^^^^^^^^^^^^^^^^^^^^
This is created with ``-d`` option. See :ref:`create_displacements_option`.
``disp_fc2.yaml``
^^^^^^^^^^^^^^^^^^
This is created with ``-d`` option with ``--dim_fc2`` option. See
:ref:`dim_fc2_option`.
``FORCES_FC3``
^^^^^^^^^^^^^^^

View File

@ -10,8 +10,10 @@ phono3py, i.e., using the finite displacement and supercell approach.
An example for QE (pw) is found in the ``example-phono3py/Si-QE`` directory.
To invoke the QE (pw) interface, ``--qe`` option has to be always
specified::
Unless a proper ``phono3py_disp.yaml`` containing calculator information,
to invoke the QE (pw) interface, ``--qe`` option has to be specified,
.. code-block:: bash
% phono3py --qe [options] [arguments]
@ -29,15 +31,15 @@ Workflow
1. Create supercells with displacements
::
.. code-block:: bash
% phono3py --qe -d --dim="2 2 2" -c Si.in
% phono3py --qe -d --dim="2 2 2" --pa="F" -c Si.in
In this example, probably 111 different supercells with
displacements are created. Supercell files (``supercell-xxx.in``)
are created but they contain only the crystal
structures. Calculation setting has to be added before running the
calculation.
calculation. In this step, the option ``--qe`` is necessary.
2. Run QE (pw) for supercell force calculations
@ -49,24 +51,33 @@ Workflow
3. Collect forces
``FORCES_FC3`` is obtained with ``--cf3`` options collecting the
forces on atoms in QE (pw) calculation results::
forces on atoms in QE (pw) calculation results:
% phono3py --qe --cf3 disp-00001/Si-supercell.out disp-00002/Si-supercell.out ...
.. code-block:: bash
or in recent bash or zsh::
% phono3py --cf3 disp-00001/Si-supercell.out disp-00002/Si-supercell.out ...
% phono3py --qe --cf3 disp-{00001..00111}/Si-supercell.out
or in recent bash or zsh:
``disp_fc3.yaml`` is used to create ``FORCES_FC3``, therefore it
.. code-block:: bash
% phono3py --cf3 disp-{00001..00111}/Si-supercell.out
``phono3py_disp.yaml`` is used to create ``FORCES_FC3``, therefore it
must exist in current directory.
4) Calculate 3rd and 2nd order force constants
``fc3.hdf5`` and ``fc2.hdf5`` files are created by::
``fc3.hdf5`` and ``fc2.hdf5`` files are created by:
% phono3py --qe --dim="2 2 2" -c Si.in --sym-fc
.. code-block:: bash
5) Calculate lattice thermal conductivity, e.g., by::
% phono3py --sym-fc
% phono3py --qe --dim="2 2 2" -c Si.in --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" \
--mesh="11 11 11" --fc3 --fc2 --br
where ``--sym-fc`` symmetrizes fc3 and fc2.
5) Calculate lattice thermal conductivity, e.g., by:
.. code-block:: bash
% phono3py --mesh="11 11 11" --fc3 --fc2 --br

View File

@ -112,14 +112,12 @@ higher order anharmonicity is involved (renormalized) into fc3 and fc2.
File format compatibility with phonopy
---------------------------------------
- ``disp_fc3.yaml`` and ``disp_fc2.yaml`` are not compatible with
phonopy's ``phonopy_disp.yaml``.
- ``FORCES_FC3`` and ``FORCES_FC2`` are not
compatible with phonopy's ``FORCE_SETS``.
- ``FORCE_SETS`` can be created using :ref:`--cfs <cfs_option>` from
``FORCES_FC3`` and ``disp_fc3.yaml`` or ``FORCES_FC2`` and
``disp_fc2.yaml`` (needs to specify ``--dim-fc2``).
- ``FORCES_FC2`` and ``disp_fc2.yaml`` can be created using :ref:`--fs2f2
``FORCES_FC3`` and ``phono3py_disp.yaml`` or ``FORCES_FC2`` and
``phono3py_disp.yaml`` (needs to specify ``--dim-fc2``).
- ``FORCES_FC2`` can be created using :ref:`--fs2f2
<fs2f2_option>` from ``FORCE_SETS``.
- ``fc2.hdf5`` can be used in phonopy in the ``hdf5`` mode when it is
renamed to ``force_constants.hdf5``. In the previous combinations of

View File

@ -10,22 +10,25 @@ Workflow
1. Create POSCARs with displacements
This is the same way as usual phonopy::
This is the same way as usual phonopy:
% phono3py -d --dim="2 2 2" -c POSCAR-unitcell
.. code-block:: bash
``disp_fc3.yaml`` and ``POSCAR-xxxxx`` files are created.
% phono3py -d --dim="2 2 2" --pa="F" -c POSCAR-unitcell
``phono3py_disp.yaml`` and ``POSCAR-xxxxx`` files are created.
If you want to use larger supercell size for
second-order force constants (fc2) calculation than that
for third-order force constants (fc3) calculation::
for third-order force constants (fc3) calculation:
% phono3py -d --dim_fc2="4 4 4" --dim="2 2 2" -c POSCAR-unitcell
.. code-block:: bash
In this case, ``disp_fc2.yaml`` and ``POSCAR_FC2-xxxxx`` files are
also created.
% phono3py -d --dim-fc2="4 4 4" --dim="2 2 2" --pa="F" -c POSCAR-unitcell
2. Run VASP for supercell force calculations
In this case, ``POSCAR_FC2-xxxxx`` files are also created.
1. Run VASP for supercell force calculations
To calculate forces on atoms in supercells, ``POSCAR-xxxxx`` (and
``POSCAR_FC2-xxxxx`` if they exist) are used as VASP (or any force
@ -35,54 +38,48 @@ Workflow
directory named ``disp-xxxxx`` (and ``disp_fc2-xxxxx``), where
``xxxxx`` is sequential number.
3. Collect ``vasprun.xml``'s
2. Collect ``vasprun.xml``'s
When VASP is used as the force calculator, force sets to calculate
fc3 and fc2 are created as follows.
::
.. code-block:: bash
% phono3py --cf3 disp-{00001..00755}/vasprun.xml
where 0755 is an example of the index of the last displacement
supercell. To perform this collection, ``disp_fc3.yaml`` created at
supercell. To perform this collection, ``phono3py_disp.yaml`` created at
step 1 is required. Then ``FORCES_FC3`` is created.
When you use larger supercell for fc2 calculation::
When you use larger supercell for fc2 calculation:
.. code-block:: bash
% phono3py --cf2 disp_fc2-{00001..00002}/vasprun.xml
``disp_fc2.yaml`` is necessary in this case and ``FORCES_FC2`` is
``phono3py_displ.yaml`` is necessary in this case and ``FORCES_FC2`` is
created.
4. Create fc2.hdf and fc3.hdf
3. Create fc2.hdf and fc3.hdf
::
.. code-block:: bash
% phono3py --dim="2 2 2" -c POSCAR-unitcell
% phono3py --sym-fc
``fc2.hdf5`` and ``fc3.hdf5`` are created from ``FORCES_FC3`` and
``disp_fc3.yaml``. This step is not mandatory, but you can avoid
calculating fc2 and fc3 at every run time.
``--sym-fc`` symmetrizes fc3 and fc2. ``fc2.hdf5`` and ``fc3.hdf5``
are created from ``FORCES_FC3`` (and
optionally ``FORCES_FC2``) and ``phono3py_disp.yaml``. This step is
not mandatory, but you can avoid calculating fc2 and fc3 at every
run time when reading force constants from these files with
``--fc3`` and ``--fc2`` options.
When you use larger supercell for fc2 calculation::
4. Thermal conductivity calculation
% phono3py --dim_fc2="4 4 4" --dim="2 2 2" -c POSCAR-unitcell
An example of thermal conductivity calculation is:
Similarly ``fc2.hdf5`` and ``fc3.hdf5`` are created from ``FORCES_FC3``,
``FORCES_FC2``, ``disp_fc3.yaml``, and ``disp_fc2.yaml``.
.. code-block:: bash
5. Thermal conductivity calculation
An example of thermal conductivity calculation is::
% phono3py --fc3 --fc2 --dim="2 2 2" --mesh="11 11 11" \
-c POSCAR-unitcell --br
or with larger supercell for fc2::
% phono3py --fc3 --fc2 --dim_fc2="4 4 4" --dim="2 2 2" --mesh="11 11 11" \
-c POSCAR-unitcell --br
% phono3py --mesh="11 11 11" --br
This calculation may take very long time. ``--thm`` invokes a
tetrahedron method for Brillouin zone integration for phonon
@ -95,23 +92,26 @@ Workflow
are independent and no communication is necessary at the
computation. The procedure is as follows:
First run the same command with the addition option of ``--wgp``::
First run the same command with the addition option of ``--wgp``:
% phono3py --fc3 --fc2 --dim="2 2 2" --mesh="11 11 11" \
-c POSCAR-unitcell --br --wgp
.. code-block:: bash
% phono3py --fc3 --fc2 --mesh="11 11 11" --br --wgp
``ir_grid_points.yaml`` is obtained. In this file, irreducible
q-points are shown. Then distribute calculations of phonon
lifetimes on grid points with ``--write_gamma`` option by::
lifetimes on grid points with ``--write-gamma`` option by:
% phono3py --fc3 --fc2 --dim="2 2 2" --mesh="11 11 11" \
-c POSCAR-unitcell --br --write_gamma --gp="[grid ponit(s)]"
.. code-block:: bash
% phono3py --mesh="11 11 11" --br --write-gamma --gp="[grid ponit(s)]"
After finishing all distributed calculations, run with
``--read_gamma`` option::
``--read-gamma`` option:
% phono3py --fc3 --fc2 --dim="2 2 2" --mesh="11 11 11" \
-c POSCAR-unitcell --br --read_gamma
.. code-block:: bash
% phono3py --fc3 --fc2 --mesh="11 11 11" --br --read-gamma
Once this calculation runs without problem, separately calculated
hdf5 files on grid points are no more necessary and may be deleted.

View File

@ -30,20 +30,22 @@ How to do it
The following example is executed in the ``Si-PBE`` example.
To avoid re-calculating fc3 and fc2, ``fc3.hdf5`` and ``fc2.hdf5`` are
created on a single node::
created on a single node:
.. code-block:: bash
% phono3py --dim="2 2 2" --sym-fc -c POSCAR-unitcell
The indices of the irreducible grid-points neccesarry to specify
``--ga`` option are found by :ref:`--wgp option <wgp_option>`
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --wgp
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --wgp
and they are stored in ``ir_grid_points.yaml``.
::
.. code-block:: bash
% egrep '^- grid_point:' ir_grid_points.yaml|awk '{printf("%d,",$3)}'
0,1,2,3,4,5,6,7,8,9,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,60,61,62,63,64,65,66,67,68,69,70,71,72,73,80,81,82,83,84,85,86,87,88,89,90,91,100,101,102,103,104,105,106,107,108,109,120,121,122,123,124,125,126,127,140,141,142,143,144,145,160,161,162,163,180,181,402,403,404,405,406,407,408,409,422,423,424,425,426,427,428,429,430,431,432,433,434,435,442,443,444,445,446,447,448,449,450,451,452,453,462,463,464,465,466,467,468,469,470,471,482,483,484,485,486,487,488,489,502,503,504,505,506,507,522,523,524,525,542,543,804,805,806,807,808,809,824,825,826,827,828,829,830,831,832,833,844,845,846,847,848,849,850,851,864,865,866,867,868,869,884,885,886,887,904,905,1206,1207,1208,1209,1226,1227,1228,1229,1230,1231,1246,1247,1248,1249,1266,1267,1608,1609,1628,1629,
@ -51,9 +53,11 @@ and they are stored in ``ir_grid_points.yaml``.
The calculated data on all the grid points shown above as indices are
necessary to obtain lattice thermal conductivity. To distribute
computational demands into computer nodes, a set of the grid-point
indices are chosen and executed as follows::
indices are chosen and executed as follows:
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --gp="0,1,2,3,4,5,6,7,8,9,20,21,22,23,24,25" --write-gamma
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --gp="0,1,2,3,4,5,6,7,8,9,20,21,22,23,24,25" --write-gamma
Then many ``kappa-m191919-gx.hdf5`` files are generated. These file
names should not be altered because in reading the data by phono3py,
@ -64,9 +68,9 @@ options. After completing calculations for all irreducible grid-point
indices, the RTA thermal conductivity is computed by another run in a
short time from the stored data:
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --read-gamma
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --read-gamma
A convenient script
--------------------
@ -98,9 +102,9 @@ indices for workload distribution.
Supposed that this script is saved as ``divide_gps.py``,
::
.. code-block:: bash
% phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --wgp
% phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --wgp
...
% python divide_gps.py 20
0,30,52,82,120,402,434,468,524,844,1206
@ -127,13 +131,13 @@ Supposed that this script is saved as ``divide_gps.py``,
For example distributing into 20 computer nodes using a queueing
system,
.. code-block:: shell
.. code-block:: bash
% j=1; for i in `python divide_gps.py 20`;do echo $i; sed -e s/gps/$i/g -e s/num/$j/g job.sh|qsub; j=$((j+1)); done
with ``job.sh`` (here for grid-engine):
.. code-block:: shell
.. code-block:: bash
#$ -S /bin/zsh
#$ -cwd
@ -142,4 +146,4 @@ with ``job.sh`` (here for grid-engine):
#$ -e err-phono3py-num.log
#$ -o std-phono3py-num.log
phono3py --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --gp="gps" --write-gamma
phono3py --dim="2 2 2" --pa="F" -c POSCAR-unitcell --mesh="19 19 19" --fc3 --fc2 --br --gp="gps" --write-gamma