Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Aug 5, 2024
1 parent bf03ba9 commit 386f8b3
Show file tree
Hide file tree
Showing 17 changed files with 197 additions and 76 deletions.
66 changes: 53 additions & 13 deletions doc/reference/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,21 @@ The input file consists of six parameter blocks named [model], [system], [impuri
The following table shows which blocks are used by each program.

.. csv-table::
:header: "", ``dcore_pre``, ``dcore``, ``dcore_check``, ``dcore_post``
:widths: 5, 5, 5, 5, 5

[model] , Yes, Yes, Yes, Yes
[pre] , Yes, , ,
[system] , , Yes, Yes, Yes
[impurity_solver], , Yes, , Yes
[control] , , Yes
[tool] , , , Yes, Yes
[mpi] , , Yes, , Yes
:header: "", ``dcore_pre``, ``dcore``, ``dcore_check``, ``dcore_anacont``, ``dcore_spectrum``
:widths: 5, 5, 5, 5, 5, 5

[model] , Yes, Yes, Yes, Yes, Yes
[pre] , Yes, , , ,
[system] , , Yes, Yes, Yes, Yes
[impurity_solver] , , Yes, , , Yes
[control] , , Yes
[post] , , , Yes, Yes, Yes
[post.check] , , , Yes, ,
[post.anacont] , , , , Yes,
[post.anacont.pade] , , , , Yes,
[post.anacont.spm] , , , , Yes,
[post.spectrum] , , , , , Yes
[mpi] , , Yes, , , Yes

For example, we can see that ``dcore_pre`` reads only [model] and [pre] blocks. Therefore, ``dcore_pre`` needs to be re-executed only when the parameters in [model] and [pre] blocks are changed.

Expand Down Expand Up @@ -112,14 +117,49 @@ This block includes parameters that control the self-consistency loop of DMFT.
.. include:: control_desc.txt

[tool] block
[post] block
------------

This block includes parameters that are solely used by ``dcore_post``.
This block includes parameters that are solely used by ``dcore_anacont`` and ``dcore_spectrum``.

.. ``dcore_check`` and ``dcore_post`` read this block.
.. include:: tool_desc.txt
.. include:: post_desc.txt

[post.anacont] block
-----------------------

This block includes parameters that are solely used by ``dcore_anacont``.

.. include:: post.anacont_desc.txt

[post.anacont.pade] block
---------------------------

This block includes parameters that are solely used by ``dcore_anacont``.

.. include:: post.anacont.pade_desc.txt

[post.anacont.spm] block
---------------------------

This block includes parameters that are solely used by ``dcore_anacont``.

.. include:: post.anacont.spm_desc.txt

[post.spectrum] block
-----------------------

This block includes parameters that are solely used by ``dcore_spectrum``.

.. include:: post.spectrum_desc.txt

[post.check] block
-----------------------

This block includes parameters that are solely used by ``dcore_check``.

.. include:: post.check_desc.txt

[mpi] block
------------
Expand Down
26 changes: 17 additions & 9 deletions doc/tools/akw_converter/akw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ An auxiliary tool ``akw_converter`` converts these data into three-dimensional v
How to use
----------

The following steps should be done after all calculations are finished, namely, self-consistent calculation by ``dcore`` and even post calculations by ``dcore_post``.
The following steps should be done after all calculations are finished, namely, self-consistent calculation by ``dcore`` and even post calculations by ``dcore_spectrum``.

#. **Modifying ini file**

A parameter ``nk_mesh`` is added to the ini file
To change the output directory from the default value (``post``), ``dir_post`` is added to the ini file as

::

[tools]
[post]
dir_post = post_grd

Then, to activate the grid calculation, the following block is added to the ini file

::

[post.spectrum]
nk_mesh = 100

This parameter activates a grid calculation.
Expand All @@ -24,7 +31,7 @@ The following steps should be done after all calculations are finished, namely,

::

[tools]
[post.spectrum]
nk0_mesh = 100
nk1_mesh = 100
nk2_mesh = 4
Expand All @@ -35,23 +42,24 @@ The following steps should be done after all calculations are finished, namely,

::

[post.anacont]
Nomega = 3
omega_max = 1.0
omega_min = -1.0

Then, :math:`\omega=0` and two additional points are selected (``Nomega = 1`` is not allowed).
In this way, the data points are reduced to :math:`100^2 \times 4 \times 3`.

#. **Executing dcore\_post**
#. **Executing dcore\_anacont and dcore\_spectrum**

Now, ``dcore_post`` is (re-)executed by
Now, ``dcore_anacont`` and ``dcore_spectrum`` are (re-)executed by

::

dcore_post --np 4 --prefix post_grd/ square.ini
dcore_anacont square.ini
dcore_spectrum --np 4 square.ini

The number of processes in the ``--np`` option (4 above) should be changed according to your environment.
An output directory is specified by the ``--prefix`` option (default is 'post/').
In this case, the data are saved in 'post_grd' directory.
We recommend to use this option to have k-path data and k-grid data in separate directories.

Expand All @@ -67,7 +75,7 @@ The following steps should be done after all calculations are finished, namely,
akw_converter.py --omega 0.0 post_grd/square_akw_mesh_up.dat post_grd/akw_up.grd

The value of :math:`\omega` is given by the ``--omega`` option. If data do not exist just on this :math:`\omega`, :math:`A(\boldsymbol{k},\omega)` is interpolated using 2 points nearby (depending on the kind of interpolation method).
The first argument is the path to the four-dimensional data generated by ``dcore_post``. The second argument is the output file name. The default format is **GRD**, and the output filename should have extension 'grd'.
The first argument is the path to the four-dimensional data generated by ``dcore_spectrum``. The second argument is the output file name. The default format is **GRD**, and the output filename should have extension 'grd'.

The full option of ``akw_converter`` can be seen by the command
::
Expand Down
4 changes: 3 additions & 1 deletion doc/tools/akw_converter/dmft_square_akw.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ max_step = 20
sigma_mix = 0.5
time_reversal = True

[tool]
[post.spectrum]
broadening = 0.0
knode = [(G,0,0,0),(X,0.5,0,0),(M,0.5,0.5,0),(G,0,0,0)]
nk_line = 100
Expand All @@ -41,6 +41,8 @@ nk_line = 100
nk0_mesh = 100
nk1_mesh = 100
nk2_mesh = 4

[post.anacont]
omega_max = 1.0
omega_min = -1.0
Nomega = 3
4 changes: 3 additions & 1 deletion doc/tutorial/afm/square_afm.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ max_step = 30
sigma_mix = 0.5
initial_static_self_energy = {0: 'init_se_up.txt', 1: 'init_se_down.txt'}

[tool]
[post.spectrum]
broadening = 0.0
knode = [(G,0.0,0.0,0.0),(X,0.5,0.0,0.0),(M,0.5,0.5,0.0),(G,0.0,0.0,0.0)]
# knode = [(G,0,0,0),(X,1,0,0),(M,1,1,0),(G,0,0,0)]
nk_line = 100

[post.anacont]
omega_max = 6.0
omega_min = -6.0
Nomega = 401
2 changes: 1 addition & 1 deletion doc/tutorial/bethe-t2g/dmft_bethe.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ max_step = 40
sigma_mix = 1.0
restart = False

[tool]
[post.anacont]
omega_max = 15.0
omega_min =-15.0
Nomega = 100
17 changes: 13 additions & 4 deletions doc/tutorial/square/dmft_square_ctseg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,19 @@ max_step = 20
sigma_mix = 0.5
time_reversal = True

[tool]
broadening = 0.0
knode = [(G,0.0,0.0,0.0),(X,0.5,0.0,0.0),(M,0.5,0.5,0.0),(G,0.0,0.0,0.0)]
nk_line = 100
[post.anacont]
solver = pade
omega_max = 6.0
omega_min = -6.0
Nomega = 401

[post.anacont.pade]
n_min = 20
n_max = 1000
iomega_max = 1e+20
eta = 0.1

[post.spectrum]
knode = [(G,0.0,0.0,0.0),(X,0.5,0.0,0.0),(M,0.5,0.5,0.0),(G,0.0,0.0,0.0)]
nk_line = 100
broadening = 0.0
15 changes: 12 additions & 3 deletions doc/tutorial/square/dmft_square_pomerol.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ max_step = 100
sigma_mix = 0.5
converge_tol = 1e-5

[tool]
knode = [(G,0,0,0),(X,0.5,0,0),(M,0.5,0.5,0),(G,0,0,0)]
nk_line = 100
[post.anacont]
solver = pade
omega_max = 6.0
omega_min = -6.0
Nomega = 401

[post.anacont.pade]
n_min = 20
n_max = 1000
iomega_max = 1e+20
eta = 0.1

[post.spectrum]
knode = [(G,0,0,0),(X,0.5,0,0),(M,0.5,0.5,0),(G,0,0,0)]
nk_line = 100
broadening = 0.4
39 changes: 29 additions & 10 deletions doc/tutorial/square/square.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,28 @@ For instance, ``check/iter_sigma-ish0.png`` shows how the renormalization factor

The iteration is terminated when the diff (lower figure) reaches ``converge_tol = 1e-5`` at the 13th iteration.

Spectral function : ``dcore_post``
----------------------------------
We can calculate real-frequency quantities such as the density of states and the momentum-dependent single-particle excitations using ``dcore_post`` program.
The analytical continuation from Matsubara frequency to real frequencies is performed using the Pade approximation.
Analytical continuation of the self-energy : ``dcore_anacont``
---------------------------------------------------------------------

The self-energy is calculated in the imaginary-time domain in the DMFT loop and saved as ``seedname_sigma_iw.npz``.
The analytical continuation from Matsubara frequency to real frequencies is required to calculate the spectral function.
DCore provides a program ``dcore_anacont`` for this purpose.
Parameters for the analytical continuation are specified in the ``[post.anacont]`` block in the input file.
``omega_min`` and ``omega_max`` is the minimum and maximum frequency for the output.
``Nomega`` is the number of frequency points.
``solver`` is the solver for the analytical continuation; "pade" is the Pade approximation and "spm" is the sparse modeling method.
Hyperparameters for the solver can be specified in the ``[post.anacont.pade]`` or ``[post.anacont.spm]`` block.

.. code-block:: bash
$ dcore_anacont dmft_square.ini
The result is stored in ``post/sigma_w.npz``.

Spectral function : ``dcore_spectrum``
---------------------------------------

After calculating the self-energy on the real-frequency axis, we can also calculate other real-frequency quantities such as the density of states and the momentum-dependent single-particle excitations using ``dcore_spectrum`` program.

.. In the Hubbard-I solver, the self-energy on the real-frequency axis can be directly computed (no analytical continuation is required).
.. Hence, the impurity problem is solved once more in ``dcore_post``.
Expand All @@ -109,18 +127,19 @@ The calculation is done by the following command:

.. code-block:: bash
$ dcore_post dmft_square.ini --np 1
$ dcore_spectrum dmft_square.ini --np 1
After finishing the calculation,
results are stored in ``post`` directory.
The data of momentum-resolved spectral functions are output into ``square_akw.dat``.
We can easily plot the result by using the script file ``square_akw.gp`` for gnuplot:
The data of momentum-resolved spectral functions are output into ``akw.dat``.
We can easily plot the result by using the script file ``akw.gp`` for gnuplot:

.. ``square_akw.dat``, ``square_akw.gp`` and ``square_dos.dat`` are generated.
.. code-block:: bash
$ gnuplot square_akw.gp
$ cd post
$ gnuplot akw.gp
In the graph shown below, the left and right panels correspond to up-spin and down-spin components, respectively.

Expand All @@ -131,14 +150,14 @@ In the graph shown below, the left and right panels correspond to up-spin and do
Here, we have tuned the range of the coloar bar by the command ``set cbrange[0:0.8]`` to get better figure.
The band width seems reduced than the noninteracting one, 8, but the artificial structure around E=1 and -1 makes it difficult to judge.

The numerical result for the density of states is stored in ``square_dos.dat``.
The numerical result for the density of states is stored in ``dos.dat``.
We can plot it using gnuplot as follows:

.. code-block:: gnuplot
set xlabel "Energy"
set ylabel "DOS"
plot "square_dos.dat" w l
plot "dos.dat" w l
The result is shown below.

Expand Down
12 changes: 7 additions & 5 deletions doc/tutorial/srvo3/openmx/openmx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ Running self-consistent DMFT calculation: dcore
$ dcore srvo3.ini
Post-processing and data analysis: dcore_post
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Post-processing and data analysis: dcore_anacont and dcore_spectrum
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block :: bash
$ dcore_post srvo3.ini
$ sed -e "s/every 10/every 1/g" srvo3_akw.gp
$ gnuplot nis_akw.gp
$ dcore_anacont srvo3.ini
$ dcore_spectrum srvo3.ini
$ cd post
$ sed -e "s/every 10/every 1/g" akw.gp
$ gnuplot akw.gp
.. image:: akw_srvo3.png
:width: 500
Expand Down
11 changes: 8 additions & 3 deletions doc/tutorial/srvo3/openmx/srvo3_openmx.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ move_double{bool} = True
[control]
max_step = 8

[tool]
[post.spectrum]
broadening = 0.1
nk_line = 50
nnode = 5
knode=[(G,0.0,0.0,0.0),(X,0.5,0.0,0.0),(M,0.5,0.5,0.0),(G,0.0,0.0,0.0),(R,0.5,0.5,0.5)]

[post.anacont]
omega_max =2.0
omega_min =-2.0
Nomega = 400

[post.anacont.pade]
iomega_max = 5.0

[post.check]
omega_check = 30.0
omega_pade = 5.0
11 changes: 8 additions & 3 deletions doc/tutorial/srvo3/srvo3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ max_step = 12
time_reversal = True
sigma_mix = 0.8

[tool]
[post.spectrum]
broadening = 0.1
nk_line = 50
nnode = 5
knode=[(G,0.0,0.0,0.0),(X,0.5,0.0,0.0),(M,0.5,0.5,0.0),(G,0.0,0.0,0.0),(R,0.5,0.5,0.5)]

[post.anacont]
omega_max =2.0
omega_min =-2.0
Nomega = 400

[post.anacont.pade]
iomega_max = 2.0

[post.check]
omega_check = 30.0
omega_pade = 2.0
Loading

0 comments on commit 386f8b3

Please sign in to comment.