From 4654467a8179401e490512236ecea46397707235 Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Tue, 27 Feb 2024 14:51:54 -0500 Subject: [PATCH] update tutorials --- doc/tutorials/Ce2O3_csc_w90/dmft_config.ini | 44 ------------------- doc/tutorials/Ce2O3_csc_w90/dmft_config.toml | 44 +++++++++++++++++++ doc/tutorials/Ce2O3_csc_w90/tutorial.ipynb | 43 +++++++++--------- .../{config.ini => config.toml} | 26 +++++------ .../ref/{config.ini => config.toml} | 26 +++++------ doc/tutorials/NNO_os_plo_mag/tutorial.ipynb | 37 ++++++++-------- .../{dmft_config.ini => dmft_config.toml} | 38 ++++++++-------- .../PrNiO3_csc_vasp_plo_cthyb/tutorial.ipynb | 18 ++++---- 8 files changed, 137 insertions(+), 139 deletions(-) delete mode 100644 doc/tutorials/Ce2O3_csc_w90/dmft_config.ini create mode 100644 doc/tutorials/Ce2O3_csc_w90/dmft_config.toml rename doc/tutorials/NNO_os_plo_mag/{config.ini => config.toml} (55%) rename doc/tutorials/NNO_os_plo_mag/ref/{config.ini => config.toml} (55%) rename doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/2_dmft_csc/{dmft_config.ini => dmft_config.toml} (53%) diff --git a/doc/tutorials/Ce2O3_csc_w90/dmft_config.ini b/doc/tutorials/Ce2O3_csc_w90/dmft_config.ini deleted file mode 100644 index 7bb8c2c8..00000000 --- a/doc/tutorials/Ce2O3_csc_w90/dmft_config.ini +++ /dev/null @@ -1,44 +0,0 @@ -[general] -seedname = ce2o3 -jobname = b10-U6.46-J0.46 -csc = True -#dft_mu = 0. -solver_type = hubbardI -n_l = 15 -eta = 0.5 -n_iw = 100 -n_tau = 5001 - -n_iter_dmft_first = 2 -n_iter_dmft_per = 1 -n_iter_dmft = 5 - -block_threshold = 1e-03 - -h_int_type = density_density -U = 6.46 -J = 0.46 -beta = 10 -prec_mu = 0.1 - -sigma_mix = 1.0 -g0_mix = 1.0 -dc_type = 0 -dc = True -dc_dmft = True -calc_energies = True - -h5_save_freq = 1 - -[solver] -store_solver = False -measure_G_l = False -measure_density_matrix = True - -[dft] -dft_code = qe -n_cores = 10 -mpi_env = default -projector_type = w90 -dft_exec = pw.x -w90_tolerance = 1.e-1 diff --git a/doc/tutorials/Ce2O3_csc_w90/dmft_config.toml b/doc/tutorials/Ce2O3_csc_w90/dmft_config.toml new file mode 100644 index 00000000..e5c29961 --- /dev/null +++ b/doc/tutorials/Ce2O3_csc_w90/dmft_config.toml @@ -0,0 +1,44 @@ +[general] +seedname = "ce2o3" +jobname = "b10-U6.46-J0.46" +csc = true + +eta = 0.5 +n_iw = 100 +n_tau = 5001 + +n_iter_dmft_first = 2 +n_iter_dmft_per = 1 +n_iter_dmft = 5 + +block_threshold = 1e-03 + +h_int_type = "density_density" +U = 6.46 +J = 0.46 +beta = 10 +prec_mu = 0.1 + +sigma_mix = 1.0 +g0_mix = 1.0 +dc_type = 0 +dc = true +dc_dmft = true +calc_energies = true + +h5_save_freq = 1 + +[solver] +type = "hubbardI" +n_l = 15 +store_solver = false +measure_G_l = false +measure_density_matrix = true + +[dft] +dft_code = "qe" +n_cores = 10 +mpi_env = "default" +projector_type = "w90" +dft_exec = "pw.x" +w90_tolerance = 1.e-1 diff --git a/doc/tutorials/Ce2O3_csc_w90/tutorial.ipynb b/doc/tutorials/Ce2O3_csc_w90/tutorial.ipynb index 65a50578..ea56664b 100644 --- a/doc/tutorials/Ce2O3_csc_w90/tutorial.ipynb +++ b/doc/tutorials/Ce2O3_csc_w90/tutorial.ipynb @@ -124,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "id": "165c087b", "metadata": {}, "outputs": [ @@ -133,12 +133,10 @@ "output_type": "stream", "text": [ "[general]\n", - "seedname = ce2o3\n", - "jobname = b10-U6.46-J0.46\n", - "csc = True\n", - "#dft_mu = 0.\n", - "solver_type = hubbardI\n", - "n_l = 15\n", + "seedname = \"ce2o3\"\n", + "jobname = \"b10-U6.46-J0.46\"\n", + "csc = true\n", + "\n", "eta = 0.5\n", "n_iw = 100\n", "n_tau = 5001\n", @@ -149,7 +147,7 @@ "\n", "block_threshold = 1e-03\n", "\n", - "h_int_type = density_density\n", + "h_int_type = \"density_density\"\n", "U = 6.46\n", "J = 0.46\n", "beta = 10\n", @@ -158,30 +156,31 @@ "sigma_mix = 1.0\n", "g0_mix = 1.0\n", "dc_type = 0\n", - "dc = True\n", - "dc_dmft = True\n", - "calc_energies = True\n", + "dc = true\n", + "dc_dmft = true\n", + "calc_energies = true\n", "\n", "h5_save_freq = 1\n", "\n", "[solver]\n", - "store_solver = False\n", - "measure_G_l = False\n", - "measure_density_matrix = True\n", + "type = \"hubbardI\"\n", + "n_l = 15\n", + "store_solver = false\n", + "measure_G_l = false\n", + "measure_density_matrix = true\n", "\n", "[dft]\n", - "dft_code = qe\n", + "dft_code = \"qe\"\n", "n_cores = 10\n", - "mpi_env = default\n", - "projector_type = w90\n", - "dft_exec = \n", - "w90_exec = wannier90.x\n", + "mpi_env = \"default\"\n", + "projector_type = \"w90\"\n", + "dft_exec = \"pw.x\"\n", "w90_tolerance = 1.e-1\n" ] } ], "source": [ - "!cat ./dmft_config.ini" + "!cat ./dmft_config.toml" ] }, { @@ -509,7 +508,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -523,7 +522,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.10" } }, "nbformat": 4, diff --git a/doc/tutorials/NNO_os_plo_mag/config.ini b/doc/tutorials/NNO_os_plo_mag/config.toml similarity index 55% rename from doc/tutorials/NNO_os_plo_mag/config.ini rename to doc/tutorials/NNO_os_plo_mag/config.toml index 26d4237d..b11ee1bf 100644 --- a/doc/tutorials/NNO_os_plo_mag/config.ini +++ b/doc/tutorials/NNO_os_plo_mag/config.toml @@ -1,47 +1,47 @@ [general] -seedname = nno -jobname = NNO_lowT +seedname = "nno" +jobname = "NNO_lowT" -enforce_off_diag = False +enforce_off_diag = false block_threshold = 0.001 -solver_type = cthyb n_iw = 2001 n_tau = 20001 prec_mu = 0.001 -h_int_type = density_density +h_int_type = "density_density" U = 8.0 J = 1.0 # temperature ~290 K beta = 40 -magnetic = True +magnetic = true magmom = -0.3, 0.3 -afm_order = True +afm_order = true n_iter_dmft = 14 g0_mix = 0.9 dc_type = 0 -dc = True -dc_dmft = False +dc = true +dc_dmft = false -load_sigma = False -path_to_sigma = pre_AFM.h5 +load_sigma = false +path_to_sigma = "pre_AFM.h5" [solver] +type = "cthyb" length_cycle = 2000 n_warmup_cycles = 5e+3 n_cycles_tot = 1e+7 imag_threshold = 1e-5 -perform_tail_fit = True +perform_tail_fit = true fit_max_moment = 6 fit_min_w = 10 fit_max_w = 16 -measure_density_matrix = True +measure_density_matrix = true diff --git a/doc/tutorials/NNO_os_plo_mag/ref/config.ini b/doc/tutorials/NNO_os_plo_mag/ref/config.toml similarity index 55% rename from doc/tutorials/NNO_os_plo_mag/ref/config.ini rename to doc/tutorials/NNO_os_plo_mag/ref/config.toml index 26d4237d..b11ee1bf 100644 --- a/doc/tutorials/NNO_os_plo_mag/ref/config.ini +++ b/doc/tutorials/NNO_os_plo_mag/ref/config.toml @@ -1,47 +1,47 @@ [general] -seedname = nno -jobname = NNO_lowT +seedname = "nno" +jobname = "NNO_lowT" -enforce_off_diag = False +enforce_off_diag = false block_threshold = 0.001 -solver_type = cthyb n_iw = 2001 n_tau = 20001 prec_mu = 0.001 -h_int_type = density_density +h_int_type = "density_density" U = 8.0 J = 1.0 # temperature ~290 K beta = 40 -magnetic = True +magnetic = true magmom = -0.3, 0.3 -afm_order = True +afm_order = true n_iter_dmft = 14 g0_mix = 0.9 dc_type = 0 -dc = True -dc_dmft = False +dc = true +dc_dmft = false -load_sigma = False -path_to_sigma = pre_AFM.h5 +load_sigma = false +path_to_sigma = "pre_AFM.h5" [solver] +type = "cthyb" length_cycle = 2000 n_warmup_cycles = 5e+3 n_cycles_tot = 1e+7 imag_threshold = 1e-5 -perform_tail_fit = True +perform_tail_fit = true fit_max_moment = 6 fit_min_w = 10 fit_max_w = 16 -measure_density_matrix = True +measure_density_matrix = true diff --git a/doc/tutorials/NNO_os_plo_mag/tutorial.ipynb b/doc/tutorials/NNO_os_plo_mag/tutorial.ipynb index 4b938604..1d3cd1f9 100644 --- a/doc/tutorials/NNO_os_plo_mag/tutorial.ipynb +++ b/doc/tutorials/NNO_os_plo_mag/tutorial.ipynb @@ -395,51 +395,52 @@ "source": [ "## 3. Running the AFM calculation\n", "\n", - "now we run the calculation at around 290 K, which should be below the ordering temperature of NdNiO2 in DMFT. The config file [config.ini](config.ini) for solid_dmft looks like this: \n", + "now we run the calculation at around 290 K, which should be below the ordering temperature of NdNiO2 in DMFT. The config file [config.toml](config.toml) for solid_dmft looks like this: \n", "\n", " [general]\n", - " seedname = nno\n", - " jobname = NNO_lowT\n", + " seedname = \"nno\"\n", + " jobname = \"NNO_lowT\"\n", "\n", - " enforce_off_diag = False\n", + " enforce_off_diag = false\n", " block_threshold = 0.001\n", "\n", - " solver_type = cthyb\n", + " \n", " n_iw = 2001\n", " n_tau = 20001\n", "\n", " prec_mu = 0.001\n", "\n", - " h_int_type = density_density\n", + " h_int_type = \"density_density\"\n", " U = 8.0\n", " J = 1.0\n", "\n", " # temperature ~290 K\n", " beta = 40\n", "\n", - " magnetic = True\n", + " magnetic = true\n", " magmom = -0.3, 0.3\n", - " afm_order = True\n", + " afm_order = true\n", "\n", " n_iter_dmft = 14\n", "\n", " g0_mix = 0.9\n", "\n", " dc_type = 0\n", - " dc = True\n", - " dc_dmft = False\n", + " dc = true\n", + " dc_dmft = false\n", "\n", " [solver]\n", + " type = \"cthyb\"\n", " length_cycle = 2000\n", " n_warmup_cycles = 5e+3\n", " n_cycles_tot = 1e+7\n", " imag_threshold = 1e-5\n", "\n", - " perform_tail_fit = True\n", + " perform_tail_fit = true\n", " fit_max_moment = 6\n", " fit_min_w = 10\n", " fit_max_w = 16\n", - " measure_density_matrix = True" + " measure_density_matrix = true" ] }, { @@ -452,14 +453,14 @@ "* we changed `n_iw=2000` because the large energy window of the calculation requires more Matsubara frequencies\n", "* `h_int_type` is set to `density_density` to reduce complexity of the problem\n", "* `beta=40` here we set the temperature to ~290K\n", - "* `magnetic=True` lift spin degeneracy\n", + "* `magnetic=true` lift spin degeneracy\n", "* `magmom` here we specify the magnetic order. Here, we say that both Ni sites have the same spin, which should average to 0 at this high temperature. The magnetic moment is specified as an potential in eV splitting up / down channel of the initial self-energy\n", - "* `afm_order=True` tells solid_dmft to not solve impurities with the same `magmom` but rather copy the self-energy and if necessary flip the spin accordingly\n", + "* `afm_order=true` tells solid_dmft to not solve impurities with the same `magmom` but rather copy the self-energy and if necessary flip the spin accordingly\n", "* `length_cycle=2000` is the length between two Green's function measurements in cthyb. This number has to be choosen carefully to give an autocorrelation time ~1 for all orbitals\n", - "* `perform_tail_fit=True` : here we use tail fitting to get good high frequency self-energy behavior\n", - "* `measure_density_matrix = True ` measures the impurity many-body density matrix in the Fock basis for a multiplet analysis\n", + "* `perform_tail_fit=true` : here we use tail fitting to get good high frequency self-energy behavior\n", + "* `measure_density_matrix = true ` measures the impurity many-body density matrix in the Fock basis for a multiplet analysis\n", "\n", - "By setting the flag magmom to a small value with a flipped sign on both sites we tell solid_dmft that both sites are related by flipping the down and up channel. Now we run solid_dmft simply by executing `mpirun solid_dmft config.ini`. \n", + "By setting the flag magmom to a small value with a flipped sign on both sites we tell solid_dmft that both sites are related by flipping the down and up channel. Now we run solid_dmft simply by executing `mpirun solid_dmft config.toml`. \n", "\n", "Caution: this is a very heavy job, which should be submitted on a cluster. \n", "\n", @@ -630,7 +631,7 @@ "id": "fe674d6b-dae6-4497-82f5-6b8004afb275", "metadata": {}, "source": [ - "first we have to load the measured density matrix and the local Hamiltonian of the impurity problem from the h5 archive, which we stored by setting `measure_density_matrix=True` in the config file: " + "first we have to load the measured density matrix and the local Hamiltonian of the impurity problem from the h5 archive, which we stored by setting `measure_density_matrix=true` in the config file: " ] }, { diff --git a/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/2_dmft_csc/dmft_config.ini b/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/2_dmft_csc/dmft_config.toml similarity index 53% rename from doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/2_dmft_csc/dmft_config.ini rename to doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/2_dmft_csc/dmft_config.toml index e01b4763..6b9615d3 100755 --- a/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/2_dmft_csc/dmft_config.ini +++ b/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/2_dmft_csc/dmft_config.toml @@ -1,17 +1,13 @@ [general] -seedname = vasp -enforce_off_diag = True -set_rot = hloc +seedname = "vasp" +set_rot = "hloc" -csc = True -plo_cfg = plo.cfg - -solver_type = cthyb -n_l = 33 +csc = true +plo_cfg = "plo.cfg" prec_mu = 0.001 -h_int_type = kanamori +h_int_type = "kanamori" U = 2.50 J = 0.50 beta = 40 @@ -22,28 +18,30 @@ n_iter_dmft_per = 2 n_iter_dmft = 26 h5_save_freq = 5 -dc = True +dc = true dc_type = 1 -dc_dmft = True +dc_dmft = true -calc_energies = True +calc_energies = true [solver] +type = "cthyb" +n_l = 33 length_cycle = 1000 n_warmup_cycles = 10000 n_cycles_tot = 2e+6 imag_threshold = 1e-5 -legendre_fit = True -measure_density_matrix = True -measure_pert_order = True +legendre_fit = true +measure_density_matrix = true +measure_pert_order = true [dft] n_iter = 4 # as of openmpi ver 4.0.7 there is a problem running with more than one core # use OMP_NUM_THREADS instead n_cores = 1 -dft_code = vasp -dft_exec = vasp_std -mpi_env = default -projector_type = plo -store_eigenvals = True +dft_code = "vasp" +dft_exec = "vasp_std" +mpi_env = "default" +projector_type = "plo" +store_eigenvals = true diff --git a/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/tutorial.ipynb b/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/tutorial.ipynb index 678f59fe..ffeb165c 100644 --- a/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/tutorial.ipynb +++ b/doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/tutorial.ipynb @@ -158,27 +158,27 @@ "\n", "### Input files for CSC DMFT calculations\n", "\n", - "We first take a look into the input file [dmft_config.ini](2_dmft_csc/dmft_config.ini) and discuss some parameters. Please make sure you understand the role of the other parameters as well, as documented in the [reference manual of the read_config.py](https://triqs.github.io/solid_dmft/_ref/read_config.html) on the solid_dmft website. This is a selection of parameters from the dmft_config.ini:\n", + "We first take a look into the input file [dmft_config.toml](2_dmft_csc/dmft_config.ini) and discuss some parameters. Please make sure you understand the role of the other parameters as well, as documented in the [reference manual of the read_config.py](https://triqs.github.io/solid_dmft/_ref/read_config.html) on the solid_dmft website. This is a selection of parameters from the dmft_config.ini:\n", "\n", "Group [general]:\n", "\n", - "* `set_rot = hloc`: rotates the local impurity problem into a basis where the local Hamiltonian is diagonal\n", - "* `plo_cfg = plo.cfg`: the name of the config file for constructing the PLOs (see below)\n", + "* `set_rot = \"hloc\"`: rotates the local impurity problem into a basis where the local Hamiltonian is diagonal\n", + "* `plo_cfg = \"plo.cfg\"`: the name of the config file for constructing the PLOs (see below)\n", "* `n_l = 35`: the number of Legendre coefficients to measure the imaginary-time Green's function in. Too few resulting in a \"bumpy\" Matsubara self-energy, too many include simulation noise. See also https://doi.org/10.1103/PhysRevB.84.075145.\n", - "* `dc_dmft = True`: using the DMFT occupations for the double counting is mandatory in CSC calculations. The DFT occupations are not well defined after the first density correction anymore\n", + "* `dc_dmft = true`: using the DMFT occupations for the double counting is mandatory in CSC calculations. The DFT occupations are not well defined after the first density correction anymore\n", "\n", "Group [solver]:\n", "\n", - "* `legendre_fit = True`: turns on measuring the Green's function in Legendre coefficients\n", + "* `legendre_fit = true`: turns on measuring the Green's function in Legendre coefficients\n", "\n", "Group [dft]:\n", "\n", "* `n_iter = 4`: number of DFT iterations between the DMFT occupations. Should be large enough for the density correction to be fully mixed into the DFT calculation\n", "* `n_cores = 32`: number of cores that DFT is run on. Check how many cores achieve the optimal DFT performance\n", - "* `dft_code = vasp`: we are running VASP\n", - "* `dft_exec = vasp_std`: the executable is vasp_std and its path is in the ROOT variable in our docker setup \n", - "* `mpi_env = default`: sets the mpi environment\n", - "* `projector_type = plo`: chooses PLO projectors\n", + "* `dft_code = \"vasp\"`: we are running VASP\n", + "* `dft_exec = \"vasp_std\"`: the executable is vasp_std and its path is in the ROOT variable in our docker setup \n", + "* `mpi_env = \"default\"`: sets the mpi environment\n", + "* `projector_type = \"plo\"`: chooses PLO projectors\n", "\n", "The [plo.cfg](2_dmft_csc/plo.cfg) file is described [here](https://triqs.github.io/dft_tools/latest/guide/conv_vasp.html). The [rotations.dat](2_dmft_csc/rotations.dat) file is generated by diagonalizing the local d-shell density matrix and identifying the least occupied eigenstates as eg states. This we have limited k-point resolution wie also specify the band indices that describe our target space (isolated set of correlated states).\n", "\n",