Skip to content

Commit ef20d42

Browse files
committed
[doc] update to Ce2O3 QE CSC tutorial
1 parent 06e8d0d commit ef20d42

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

doc/tutorials/Ce2O3_csc_w90/dmft_config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enforce_off_diag = false
1515
block_threshold = 1e-03
1616

1717
h_int_type = "density_density"
18-
h_int_basis = "qe"
18+
h_int_basis = "triqs"
1919
U = 6.46
2020
J = 0.46
2121
beta = 10
@@ -41,10 +41,12 @@ measure_density_matrix = true
4141
dft_code = "qe"
4242
n_cores = 10
4343
mpi_env = "default"
44+
mpi_exe = "mpirun"
4445
projector_type = "w90"
4546
w90_tolerance = 1e-1
4647

4748
[dft.dft_exec]
49+
path = '/path/to/q-e/bin'
4850
pw = "pw.x -nk {number_cores}"
4951
pw2wan = "pw2wannier90.x -nk 1 -pd .true."
5052
bands = "bands.x -nk {number_cores}"

doc/tutorials/Ce2O3_csc_w90/tutorial.ipynb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,11 @@
145145
"n_iter_dmft_per = 1\n",
146146
"n_iter_dmft = 5\n",
147147
"\n",
148+
"enforce_off_diag = false\n",
148149
"block_threshold = 1e-03\n",
149150
"\n",
150151
"h_int_type = \"density_density\"\n",
152+
"h_int_basis = \"triqs\"\n",
151153
"U = 6.46\n",
152154
"J = 0.46\n",
153155
"beta = 10\n",
@@ -161,21 +163,30 @@
161163
"calc_energies = true\n",
162164
"\n",
163165
"h5_save_freq = 1\n",
166+
"store_solver = false\n",
164167
"\n",
165168
"[solver]\n",
166169
"type = \"hubbardI\"\n",
167170
"n_l = 15\n",
168-
"store_solver = false\n",
169171
"measure_G_l = false\n",
170172
"measure_density_matrix = true\n",
171173
"\n",
172174
"[dft]\n",
173175
"dft_code = \"qe\"\n",
174176
"n_cores = 10\n",
175177
"mpi_env = \"default\"\n",
178+
"mpi_exe = \"mpirun\"\n",
176179
"projector_type = \"w90\"\n",
177-
"dft_exec = \"pw.x\"\n",
178-
"w90_tolerance = 1.e-1\n"
180+
"w90_tolerance = 1e-1\n",
181+
"\n",
182+
"[dft.dft_exec]\n",
183+
"path = '/path/to/q-e/bin'\n",
184+
"pw = \"pw.x -nk {number_cores}\"\n",
185+
"pw2wan = \"pw2wannier90.x -nk 1 -pd .true.\"\n",
186+
"bands = \"bands.x -nk {number_cores}\"\n",
187+
"proj = \"projwfc.x -nk {number_cores}\"\n",
188+
"win_pp = \"wannier90.x -pp\"\n",
189+
"win = \"wannier90.x\"\n"
179190
]
180191
}
181192
],
@@ -190,7 +201,9 @@
190201
"source": [
191202
"Of course you'll have to switch `csc` on to perform the charge self-consistent calculations. Then we choose the HubbardI Solver, set the number of Legendre polynomials, Matsubara frequencies $i\\omega_n$ and imaginary time grid points $\\tau$. In this calculation we perform five iterations in total, of which the two first ones are one-shot DMFT iterations, followed by three DFT and three DMFT steps.\n",
192203
"For the interaction Hamiltonian we use `density_density`. Note that you unlike the Kanamori Hamiltonian, this one is not rotationally invariant, so the correct order of the orbitals must be set (inspect the projections card in `ce2o3.win`). We must also use `dc_dmft` and `calc_energies`, since we are interested in total energies.\n",
193-
"Finally, we will specify some details for the DFT manager, i.e. to use QE, W90 and the tolerance for the mapping of shells. Note that this value should in general be $1e-6$, but for demonstration purposes we reduce it here. If `dft_exec` is empty, it will assume that `pw.x` and other QE executables are available."
204+
"Finally, we will specify some details for the DFT manager, i.e. to use QE, W90 and the tolerance for the mapping of shells. Note that this value should in general be $1e-6$, but for demonstration purposes we reduce it here. \n",
205+
"\n",
206+
"Here, we demonstarte how for QE `dft_exec` can be a dictionary in toml formatting style. You can very flexibly add custom commands for each part of the QE executables used if you like. You can also just simply write `dft_exec=/path/to/qe/bin/pw.x` and it will simply pick other executables for QE from there. If `dft_exec` is empty, it will assume that `pw.x` and other QE executables are available."
194207
]
195208
},
196209
{

python/solid_dmft/dft_managers/qe_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def run(number_cores, qe_file_ext, qe_exec, mpi_profile, mpi_exe_param, seedname
112112
raise ValueError(f"Unknown keys in dft_exec: {unknown_keys}. Valid keys: {valid_exec_keys}")
113113
qe_select = qe_exec
114114
qe_exec = qe_select.get("path", "")
115+
if qe_exec and not qe_exec.endswith('/'):
116+
qe_exec += '/'
115117

116118
if mpi.is_master_node():
117119
# clean environment

0 commit comments

Comments
 (0)