Skip to content

Commit

Permalink
move plo cfg parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
the-hampel committed Feb 27, 2024
1 parent d327c3c commit 8266b79
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ seedname = "vasp"
set_rot = "hloc"

csc = true
plo_cfg = "plo.cfg"


prec_mu = 0.001

Expand Down Expand Up @@ -43,5 +43,6 @@ n_cores = 1
dft_code = "vasp"
dft_exec = "vasp_std"
mpi_env = "default"
plo_cfg = "plo.cfg"
projector_type = "plo"
store_eigenvals = true
2 changes: 1 addition & 1 deletion doc/tutorials/PrNiO3_csc_vasp_plo_cthyb/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
"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",
"* `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",
"\n",
Expand All @@ -178,6 +177,7 @@
"* `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",
"* `plo_cfg = \"plo.cfg\"`: the name of the config file for constructing the PLOs\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",
Expand Down
10 changes: 5 additions & 5 deletions python/solid_dmft/csc_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@
from solid_dmft.dft_managers import vasp_manager as vasp
from solid_dmft.dft_managers import qe_manager as qe

def _run_plo_converter(general_params):
def _run_plo_converter(general_params, dft_params):
if not mpi.is_master_node():
return

# Checks for plo file for projectors
if not os.path.exists(general_params['plo_cfg']):
if not os.path.exists(dft_params['plo_cfg']):
print('*** Input PLO config file not found! '
+ 'I was looking for {} ***'.format(general_params['plo_cfg']))
+ 'I was looking for {} ***'.format(dft_params['plo_cfg']))
mpi.MPI.COMM_WORLD.Abort(1)

# Runs plo converter
plo_converter.generate_and_output_as_text(general_params['plo_cfg'], vasp_dir='./')
plo_converter.generate_and_output_as_text(dft_params['plo_cfg'], vasp_dir='./')
# Writes new H(k) to h5 archive
converter = VaspConverter(filename=general_params['seedname'])
converter.convert_dft_input()
Expand Down Expand Up @@ -190,7 +190,7 @@ def _full_vasp_run(general_params, dft_params, initial_run, n_iter_dft=1, sum_k=
vasp.run_charge_update()

if dft_params['projector_type'] == 'plo':
_run_plo_converter(general_params)
_run_plo_converter(general_params, dft_params)
irred_indices = None
elif dft_params['projector_type'] == 'w90':
_run_wannier90(general_params, dft_params)
Expand Down
2 changes: 1 addition & 1 deletion python/solid_dmft/io_tools/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ n_w = 5001
noise_level_initial_sigma = 0.0
occ_conv_crit = -1.0
path_to_sigma = "<none>"
plo_cf = "plo.cfg"
prec_mu = 1e-4
ratio_F4_F2 = "<none>"
sampling_h5_save_freq = 5
Expand Down Expand Up @@ -166,6 +165,7 @@ mpi_env = "default"
n_cores = "<none>"
n_iter = 4
n_iter_first = "<dft.n_iter>"
plo_cfg = "plo.cfg"
projector_type = "w90"
store_eigenvals = false
w90_exec = "wannier90.x"
Expand Down
4 changes: 2 additions & 2 deletions python/solid_dmft/io_tools/documentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ occ_conv_crit : float, default = -1.0
path_to_sigma : str, default = None
path to h5 file from which the sigma should be loaded.
Needed if load_sigma is true
plo_cfg : str, default = 'plo.cfg'
config file for PLOs for the converter
prec_mu : float, default = 1e-4
general precision for determining the chemical potential at any time calc_mu is called
ratio_F4_F2 : float or list of float, default = None
Expand Down Expand Up @@ -437,6 +435,8 @@ n_iter : int, default = 4
n_iter_first : int, default = dft.n_iter
number of DFT iterations in the first charge correction because this
first charge correction usually changes the DFT wave functions the most.
plo_cfg : str, default = 'plo.cfg'
config file for PLOs for the converter
projector_type : string, default = 'w90'
plo: uses VASP's PLO formalism, requires LOCPROJ in the INCAR
w90: uses Wannier90 (for VASP and QuantumEspresso)
Expand Down

0 comments on commit 8266b79

Please sign in to comment.