Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update input of config file #74

Merged
merged 26 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0feede4
Added code for new toml postprocessing
merkelm Feb 21, 2024
b211b8d
Added check that no new keys can be introduced
merkelm Feb 21, 2024
9579dd9
First chunk of changes. test lno_hubbardI_mag runs through
merkelm Feb 22, 2024
de02fa8
more progress, more tests pass
merkelm Feb 23, 2024
6d97a3d
all non-QMC solvers work now
merkelm Feb 23, 2024
d78e8a6
add toml as install target
the-hampel Feb 23, 2024
d43505d
All integration tests running now
merkelm Feb 23, 2024
3c9a8c4
Deleted outdated scripts to port config and h5
merkelm Feb 23, 2024
7b54543
changed beta in documentation
merkelm Feb 23, 2024
1f66947
Added test for restarting calculation with HubbardI
merkelm Feb 23, 2024
00f8486
[build] add ForkTPS LCO 1 band test
the-hampel Feb 23, 2024
893af70
fixed observables test
merkelm Feb 23, 2024
27b3bf7
added reference for restart integration test
merkelm Feb 23, 2024
75c08f7
[doc] correct input doc
the-hampel Feb 26, 2024
d6b21f7
added test that uses cthyb and hartree for NiO
merkelm Feb 26, 2024
5cfa27f
Cleanup and added impurity-dependent DC
merkelm Feb 27, 2024
896e7a2
Fixed calculation of Hartree energy for equivalent shells
merkelm Feb 27, 2024
be338c9
[fix] fix small bugs and improve NiO test
the-hampel Feb 27, 2024
3406112
[doc] add missing doc string
the-hampel Feb 27, 2024
871235c
Updated documentation
merkelm Feb 27, 2024
941e480
[doc] fix doc
the-hampel Feb 27, 2024
9d153eb
[doc] added doc strings and cleaned up parameter doc
merkelm Feb 27, 2024
cbf010b
[doc] updated SVO tutorial
merkelm Feb 27, 2024
4654467
update tutorials
the-hampel Feb 27, 2024
d327c3c
small fixes
the-hampel Feb 27, 2024
8266b79
move plo cfg parameter
the-hampel Feb 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ Input/Output

Further details for running
===========================

.. toctree::
:maxdepth: 1

md_notes/docker.md
md_notes/run_locally.md
md_notes/run_cluster.md
Expand All @@ -57,10 +57,10 @@ Module reference manual
dft_managers
dmft_cycle
dmft_tools
io_tools
postprocessing
read_config
util






37 changes: 16 additions & 21 deletions doc/input_output/DMFT_input/generate_doc_from_comments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,23 @@
green='\033[1;32m'
wipe="\033[1m\033[0m"

echo -e "${green}Extracting the comments from read_config.py file${wipe}"
echo -e "${green}Extracting the comments from io_tools/documentation.txt file${wipe}"
buildfolder="../../.."
docfile="$buildfolder/python/solid_dmft/read_config.py"
docfile="$buildfolder/python/solid_dmft/io_tools/documentation.txt"

awk '/---XXX---start/{flag=1; c=0} flag; /---XXX/&& ++c==2{flag=0}' $docfile | tail -n +2 | head -n -2 > python_comments.txt

#from the python comments
#from the documentation file
echo "Generating .rst syntax from the python syntax"
sed 's/\(.*\) :\s*\(.*\)/\n.. admonition:: \1 \n :class: intag \n \n \*\*type=\*\* \2\n/g' python_comments.txt > matches_comments.txt
sed 's/\(.*\) :\s*\(.*\)/\n.. admonition:: \1 \n :class: intag \n \n \*\*type\*\* = \2\n/g' $docfile > matches_comments.txt

#add blank line after type
#sed -i 's/\(\*type=.*\),/\1 \n\n /g' matches_comments.txt
#sed -i 's/\(\*type=.*\),/\1 \n\n /g' matches_comments.txt

# make 'optional' and 'default' bold
sed -i 's/,.*\(\optional\)/; \*\*\1\*\*/g' matches_comments.txt
sed -i 's/,.*\(\default=\)/; \*\*\1\*\* /g' matches_comments.txt
# make 'mandatory' and 'default' bold
sed -i 's/,.*\(\mandatory\)/; \*\*\1\*\*/g' matches_comments.txt
sed -i 's/,.*\(\default\)/; \*\*\1\*\* /g' matches_comments.txt

# grep all admonitions and store them in a file
# grep all admonitions and store them in a file

echo "Generating input page"
cat > input.rst << EOF
Expand All @@ -51,7 +49,7 @@ EOF
#
# awk '/\[ SECTION \]/{flag=1; c=0} flag; /\[ /&& ++c==2{flag=0}'
# matches from the pattern '[ SECTION ]'(note, two spaces are important) up to either the next occurence of
# '[ ', which is the next group, or the end of the file
# '[ ', which is the next group, or the end of the file
#
#
# the second part takes the divided section and extracts a list out of it:
Expand Down Expand Up @@ -99,7 +97,7 @@ cat > general.rst << EOF
[general]: General parameters
-----------------------------

Includes the majority of the parameters
Frequently used parameters that apply to the whole simulation.


EOF
Expand All @@ -113,10 +111,9 @@ cat > solver.rst << EOF
[solver]: solver specific parameters
------------------------------------

Here are the parameters that are uniquely dependent on the solver chosen. Below a list of the supported solvers:



Here are the parameters that are uniquely dependent on the solver chosen. Some parameters are used within solid_dmft and some are passed directly into the triqs solver.
To see which parameters were passed to the solver for a given calculation, look at the triqs_solver_params in DMFT_input/solver in the h5 archive.
Solver-specific parameters are listed in the respective sections.


EOF
Expand All @@ -125,16 +122,14 @@ echo -e "\n" >> solver.rst
cat solver.tmp >> solver.rst
##############



###############
cat > dft.rst << EOF

[dft]: DFT related inputs
-------------------------

List of parameters that relate to the DFT calculation, useful mostly when doing CSC.

List of parameters for the DFT calculation in charge-self-consistent calculations.
The parameters are ignored in one-shot calculations.


EOF
Expand All @@ -149,7 +144,7 @@ cat > advanced.rst << EOF
[advanced]: Advanced inputs
---------------------------

Advanced parameters, do not modify default value unless you know what you are doing
Advanced parameters, do not modify the default value unless you know what you are doing.


EOF
Expand Down
44 changes: 0 additions & 44 deletions doc/tutorials/Ce2O3_csc_w90/dmft_config.ini

This file was deleted.

44 changes: 44 additions & 0 deletions doc/tutorials/Ce2O3_csc_w90/dmft_config.toml
Original file line number Diff line number Diff line change
@@ -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 = 1e-1
43 changes: 21 additions & 22 deletions doc/tutorials/Ce2O3_csc_w90/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"id": "165c087b",
"metadata": {},
"outputs": [
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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"
]
},
{
Expand Down Expand Up @@ -509,7 +508,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -523,7 +522,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.10.10"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
magmom = -0.3, 0.3
afm_order = True
magnetic = true
magmom = [-0.3, 0.3]
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

Loading