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

Update input of config file #74

merged 26 commits into from
Feb 27, 2024

Conversation

merkelm
Copy link
Collaborator

@merkelm merkelm commented Feb 21, 2024

This PR changes the config file of solid_dmft to the toml format and allows to use multiple solvers within a single calculation. Requires dft_tools from commit b355173 on the unstable branch or later.

High-level changes

  • The following input parameters can now be a list per impurity:
    • general_params: U, J, U_prime, ratio_F4_F2, h_int_type, enforce_off_diag, dc_type
    • advanced_params: dc_U, dc_J, dc_fixed_occ, map_solver_struct, pick_solver_struct, mapped_solver_struct_degeneracies
  • Multiple solvers can be used, which only solve the impurity problems specified in idx_impurities
    • general parameter solver_type moved to solver section and renamed to type
    • general parameter n_l moved to solver section
    • general parameter measure_chi moved to solver section
    • general parameter delta_interface moved to solver section
  • All possible input parameters are defined in the python/solid_dmft/io_tools/default.toml
  • according to toml format the config file is now called .toml (instead of .ini), and boolean are not capitalized, strings are given with quotes and lists are given with brackets.
  • Documentation of the input is now generated from python/solid_dmft/io_tools/documentation.txt
  • For an example, refer to the new integration test (see below)
  • Updated interface to python scripts wrapping solid_dmft: new routine main.run_dmft that expects the params as python dictionaries, which are then supplemented with the defaults etc equivalent to what happens when reading in a toml file

Details

  • the existence of the parameter general_params['beta'] now determines if a imaginary- or real-frequency grid is used within solid_dmft
  • Bug fix: Slater interaction for p orbitals can now be constructed
  • Renaming of solver parameters for the different solvers is now moved to solver.py. The idea is that every other part of solid_dmft should care as little as possible what solvers are used, with the details abstracted by the SolverStructure class
    • In solver.py, all solver parameters that are passed to the triqs solver are transferred to a dict triqs_solver_params. When adding new triqs solver parameter to solid_dmft in the future, they also need to be added within solver.py.
  • In the determination of the block structure, the largely unused parameter general_params['block_suppress_orbital_symm'] removed. Its behavior can be replaced by using advanced_params['mapped_solver_struct_degeneracies']
  • Integration tests: previously existing tests updated, new tests added. One with ftps solver (requires installation of ftps, otherwise just passes without doing anything) and one with a combination of CT-HYB and Hartree solver
  • Unit tests: added test for toml-related functionality
  • read_config.py removed and the functionality for dealing with the dicts from reading a toml file moved to postproc_toml_dict.py
  • io_tools/verify_input_params.py contains all checks of the input params that the code performs before starting the DMFT calculations
  • Updated the documentation of the input parameters

@merkelm merkelm marked this pull request as ready for review February 27, 2024 14:49
@the-hampel the-hampel merged commit ec8d027 into unstable Feb 27, 2024
3 checks passed
the-hampel added a commit that referenced this pull request Feb 27, 2024
This PR changes the config file of solid_dmft to the toml format and allows to use multiple solvers within a single calculation. Requires dft_tools from commit b355173 on the unstable branch or later.

- The following input parameters can now be a list per impurity:
    - `general_params`: U, J, U_prime, ratio_F4_F2, h_int_type, enforce_off_diag, dc_type
    - `advanced_params`: dc_U, dc_J, dc_fixed_occ, map_solver_struct, pick_solver_struct, mapped_solver_struct_degeneracies
- Multiple solvers can be used, which only solve the impurity problems specified in `idx_impurities`
    - general parameter `solver_type` moved to solver section and renamed to `type`
    - general parameter `n_l` moved to solver section
    - general parameter `measure_chi` moved to solver section
    - general parameter `delta_interface` moved to solver section
- All possible input parameters are defined in the `python/solid_dmft/io_tools/default.toml`
- according to toml format the config file is now called .toml (instead of .ini), and boolean are not capitalized, strings are given with quotes and lists are given with brackets.
- Documentation of the input is now generated from `python/solid_dmft/io_tools/documentation.txt`
- For an example, refer to the new integration test (see below)
- Updated interface to python scripts wrapping solid_dmft: new routine `main.run_dmft` that expects the params as python dictionaries, which are then supplemented with the defaults etc equivalent to what happens when reading in a toml file

- the existence of the parameter `general_params['beta']` now determines if a imaginary- or real-frequency grid is used within solid_dmft
- Bug fix: Slater interaction for p orbitals can now be constructed
- Renaming of solver parameters for the different solvers is now moved to `solver.py`. The idea is that every other part of solid_dmft should care as little as possible what solvers are used, with the details abstracted by the SolverStructure class
    - In `solver.py`, all solver parameters that are passed to the triqs solver are transferred to a dict `triqs_solver_params`. When adding new triqs solver parameter to solid_dmft in the future, they also need to be added within solver.py.
- In the determination of the block structure, the largely unused parameter `general_params['block_suppress_orbital_symm']` removed. Its behavior can be replaced by using `advanced_params['mapped_solver_struct_degeneracies']`
- Integration tests: previously existing tests updated, new tests added. One with ftps solver (requires installation of ftps, otherwise just passes without doing anything) and one with a combination of CT-HYB and Hartree solver
- Unit tests: added test for toml-related functionality
- `read_config.py` removed and the functionality for dealing with the dicts from reading a toml file moved to `postproc_toml_dict.py`
- `io_tools/verify_input_params.py` contains all checks of the input params that the code performs before starting the DMFT calculations
- Updated the documentation of the input parameters

---------

Co-authored-by: Alexander Hampel <[email protected]>
@the-hampel the-hampel deleted the dev_read_config branch May 24, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants