GithubHelp home page GithubHelp logo

triqs / solid_dmft Goto Github PK

View Code? Open in Web Editor NEW
30.0 10.0 19.0 346.52 MB

solid_dmft is a versatile python wrapper to perform DFT+DMFT calculations utilizing the TRIQS software library.

Home Page: https://triqs.github.io/solid_dmft/

License: Other

CMake 3.59% Shell 0.25% Python 94.14% HTML 0.16% Makefile 0.43% Forth 0.32% TeX 0.07% BitBake 1.03%
solid-state-physics dmft correlated-electrons

solid_dmft's Introduction

logo_soliDMFT

CI PyPI version status


This program allows to perform DFT+DMFT one-shot and charge self-consistent (CSC) calculations from h5 archives or VASP/Quantum Espresso input files for multiband systems using the TRIQS software library, and the DFT code interface TRIQS/DFTTools. solid_dmft takes advantage of various impurity solvers available in TRIQS. Postprocessing scripts are available to perform analytic continuation and calculate spectral functions.

Documentation & tutorials

To learn how to use solid_dmft, take a look at the online documentation. There you can find:

Check also the solid_dmft publication in the JOSS journal for more information and further references.

Installation

You can install the latest solid_dmft release simply via pip (PyPi):

pip install solid_dmft

However, please make sure that you have a valid TRIQS and TRIQS/DFTTools installation matching the version of solid_dmft. Furthermore, you need at least one of the supported DMFT impurity solvers installed to use solid_dmft.

A more thorough installation can be performed manually via cmake, which will also check if you have a working and matching TRIQS installation.

Please check the installation page on the online documentation for more detailed instructions.


Copyright (C) 2018-2020, ETH Zurich Copyright (C) 2021, The Simons Foundation authors: A. Hampel, S. Beck, M. Merkel, and A. Carta (see LICENSE.txt for details)

Developed by the Materials Theory Group, ETH Zurich and the Center for Computational Quantum Physics, Flatiron Institute.

If you are using this code for your research, please cite it with this bib file.

solid_dmft's People

Contributors

alberto-carta avatar cnyeh avatar dependabot[bot] avatar dylex avatar harrisonlabollita avatar hmenke avatar hugostrand avatar merkelm avatar parcollet avatar phdum avatar phibeck avatar the-hampel avatar thoemi09 avatar wentzell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solid_dmft's Issues

Support TRIQS/w2dynamics_interface

Summary

Please add support for TRIQS/w2dynamics_interface as the DMFT solver.

Motivation

w2dynamics implements worm sampling for two-particle quantities and symmetric improved estimators which result in much smoother self-energies.

Implementation

[general]
solver_type = w2dyn_cthyb

[solver]
measure_G2_iw_ph = True
measure_G2_n_bosonic = 30
measure_G2_n_fermionic = 30

Formatting

Please use markdown in your issue message. A useful summary of commands can be found here.

Specifying dft_mu leads to wrong DC leads to wrong results

Description

When dft_mu is given, the DC is calculated based on the corresponding impurity occupations that may be wrong. While the occupations are fixed with a call of calc_mu before the DMFT loop, the DC is set and changes the results.

In my opinion, dft_mu is helpful to look at the original occupations etc, but it should be corrected before determining the DC. For a single impurity it doesn't change anything, but for multiple ones it affects the results.

Review Suggestion: Minor paper edits

Summary

In the summary section, I think citing other software that are grey-box tools that allow for quick prototyping of ideas/flexible implementations would be helful. Some suggestions off the top of my head

iTensor - DMRG/tensor networks https://itensor.org/
INQ - DFT/TDDFT https://arxiv.org/abs/2106.03872
Quantum Package - correlated wave function methods https://quantumpackage.github.io/qp2/
PySCF - gaussian based wave function methods https://pyscf.org/

Each of these let you override the default implementations of algorithms if desired. These are just suggestions so if you disagree/feel that other packages would be a better fit feel free to replace.

Design Principles

lines 35-36:
This allows the user to easily run ab-initio calculations for strongly correlated materials, as well as implement and test new features of TRIQS and benchmark new solvers against existing ones.

This reads awkwardly without the above addition ("the user").

"Seeking Help" section in docs

Summary

Part of Review: openjournals/joss-reviews#4623

The "How to contribute" is great, and could a "Seeking Help" section be added to the docs?

Motivation

This would make it easier if users encounter issues.

Implementation

I'd expect this to point at the tutorials/examples, to link to the Github Discussions page, and possibly link to opening an issue.

Review Suggestion: Can tutorial folder be moved outside of doc/

Summary

Tutorial files are in the docs folder which is confusing.

Motivation

The tutorials were hard to find and the text in the online docs refer to things in those folders.

Implementation

I believe all that will need changed is the paths in tutorials.rst

.. _tutorials:

Tutorials
==========

These tutorials provide an overview about typical workflows to perform DFT+DMFT calculations with solid_dmft. The tutorials are sorted by complexity and introduce one after another more available features. 

.. note::
   The tutorials are run with the 3.1.x branch of triqs. Please use the 3.1.x branch for triqs and all applications to reproduce the results shown here. 

Short description of the tutorials linked below: 

1. Typical one-shot (OS) DMFT calculation based on prepared hdf5 archive for SrVO3
2. Full charge self-consistent (CSC) DFT+DMFT calculation using the PLO formalism with Vasp for PrNiO3
3. Full CSC DFT+DMFT calculation using w90 in combination with Quantum Espresso utilizing the lighter HubbardI solver
4. OS magnetic DMFT calculation for NdNiO2 in a large energy window for 5 d orbitals
5. Postprocessing: plot the spectral function after a DFT+DMFT calculation

----

.. toctree::
    :maxdepth: 2

    ../tutorials/SVO_os_qe/tutorial
    ../tutorials/PrNiO3_csc_vasp_plo_cthyb/tutorial
    ../tutorials/Ce2O3_csc_w90/tutorial
    ../tutorials/NNO_os_plo_mag/tutorial
    ../tutorials/correlated_bandstructure/plot_correlated_bands

Review suggestion: Build script block at end of building from source section

Summary

Part of Joss Review

This tool fits very nicely within the Triqs ecosystem and its existence makes sense/does not seem redundant. The installation of solid-dmft follows a similar flow as the other tools within the ecosystem, which is nice from a user's perspective. One thing that would help slightly is a collected build script for the build from source at the end of the installation from source section. Triqs has one in the installation instructions which is little more than a collection of the instructions that preceed it, but it makes copy+pasting easier.

Bug report

Description

I'm having an Issue installing the code. I'm using solid_dmft VERSION 3.0.9 that I cloned from github today with git clone https://github.com/flatironinstitute/solid_dmft solid_dmft.src. I installed Triqs in a conda environment, and also installed scipy. (As an aside, I also had to install pytest to run the tests, and it wasn't included in the installation instructions, so it might be easier for people if that was just included in step 2 as the prerequisites as well, but perhaps this was just an issue for me. Regardless, it was easy to see the issue and fix). After these initial downloads/installations and steps 2-4 in the installation instructions, I ran make test and failed several tests. The first test case failed because of ImportError: cannot import name 'determine' from 'solid_dmft.dmft_tools.afm_mapping I found that the file that it searches for the determine function in has a function called determine_afm_mapping When I replaced the import of determine in /global/home/users/alex_smith/software/solid_dmft.src/test/python//test_afm_mapping.py with import determine_afm_mapping as determine, that test ended up passing. Is determine_afm_mapping the correct function that should be called?

After this change, test cases 1-7 all passed, but 8-11 all failed. They said that ModuleNotFoundError: No module named 'triqs_dft_tools', so presumably triqs_dft_tools also has to be installed. I installed triqs_dft_tools following the instructions on its webpage to install it with conda, but then I still ran into an issue because at one point it says Test 8: cannot import name 'gf_struct_flatten' from 'triqs_dft_tools.block_structure' and the other failed tests had the same issue. I couldn’t find gf_struct_flatten in /triqs_dft_tools/block_structure.py, but I could find it in block_structure.py in the unstable branch of triqs_dft_tools. To test it out, I tried copy/pasting the gf_struct_flatten function from the unstable branch to the version that was installed with conda. That helped with the import error. Is the unstable branch (or at least this snippet from the unstable branch) what one is supposed to be using?

After adding gf_struct_flatten, I still had those last few tests fail, but this time it was because the impurity solvers weren't installed. (As an aside, the link to CTHYB in https://triqs.github.io/dft_tools/1.4/install.html was broken for me, but I was able to find https://triqs.github.io/cthyb/latest/ by googling). It was easy enough to fix this by installing it with conda, but it might also make the installation take less time if you were told to install it and triqs_dft_tools from the outset rather than doing it after they failed. After doing this, I ended up with an error TypeError: __init__() got an unexpected keyword argument 'delta_interface' in the two cthyb tests (I didn't install the HubbardI solver, since I figured that I might as well try to debug one of them at a time). It looks like the unstable branch of the cthyb package has the delta_interface keyword argument, but the 3.0.x version does not. I compared the code in the solver.py file in the version 3 branch and in the unstable branch, and both files were identical except for __init__ in unstable having the extra keyword argument and some associated code to deal with delta_interface. I'm guessing if I were to copy this code over then it might work like it did with gf_struct_flattten, although I couldn't tell if the unstable branch version of cthyb might rely on other code that has changed between the branches, so I haven't tried doing this. Nor have I tried just using the unstable branches.

Should one take the unstable branches of triqs_dft_tools, triqs_cthyb, and hubbardI? It seemed like this was probably the case based on the errors I was getting in the tests, but it wasn't mentioned in the installation instructions, so I couldn't tell if it would be a mistake to try everything with the unstable branches. Hopefully I haven't missed somewhere where this is mentioned.

Manuscript review

This pull request is being made as part of the JOSS review openjournals/joss-reviews#4623.

This is a very nice tool, and the contribution to the community is very nice. I read the paper before looking at the documentation tutorials to see if the impression/understanding of the tool was clear enough. So although some of this may be clarified in documentation, it may not be clear within the manuscript alone.

General structure points, which would fall under the "quality of writing" portion of the review. The other portions of the paper are fulfilled in my eyes.

  • 26: “elaborate coding” implies some base level of coding for all runs, is that true or can one just call this command line with no change to the code?
  • 29: the phrase “and it’s applications” seems more confusing than helpful. It seems you are referring to the methods and modules implemented within the library, but applications is vague and could point to specific system use cases or Possibly just the many features, or completely separate code bases. I think dropping the phrase let’s this sent nice be more clear/accurate. If you wanted to reword it, that’s fine too.
  • 31: “allow to run” reads strangely since there is no subject. “allow one to run” would be fine.
  • 35:"and it’s available applications” seems unnecessary here just as above on line 29 as I’m unable to differentiate between the differences in implementations vs applications.
  • 35: “allow to run” since there is no subject. “allow one to run” would be fine
  • 39: are solvers an implementation in TRIQS or is this within your project. This is cleared up later in the article, but could be clearer in this sentence. As it’s currently written it seems that only new features from TRIQS are tested but the solvers are inherent to solid_dmft
  • 41: “run on top of a DFT calculation” is vague…are results imported through an expected format/API or is a feature of solid_dmft that it can act as a drive for other codes. Further in the paragraph it is explained that results are imported from other codes through a conversion script to HDF5, but saying this in the first sentence would clear things up.
  • 46: this is a question that comes from my unfamiliarity with the details of this method. It makes sense that you are going from momentum space to localized real space orbitals, but is this actual though the combinations of multiple different wavefunctions for a single representation in kspace? Initially I would have guessed a single wave function would have been needed, but I’m still learning for this level of detail.
  • 49: sentence has two unrelated points, although both are important.
  • 49: Green’s functions, not Green functions
  • 52: allows to
  • 57: Reword as interfaces since it is interfacing with multiple codes
  • 59 allows to → allows one to
  • 62 Green’s function
  • 65 1) “an updated documentation” feels a bit strange to read, for instance I wouldn’t say “we provide a documentation”. Instead removing the “an” or instead saying “providing an updated version of the documentation” both read better. 2) I’m not sure how documentation and reference manual are different. If I’m unfamiliar with this programming term, just let me know. It seems like you may be referring to the API definition. If that’s the case this may be better presented as a subsection of the documentation. 3) similar to the last point, this sentence implies the documentation and tutorials are separate, while in the following sentence it is implied that the tutorials are part of the documentation. Maybe a simple change to the first sentence of “updated documentation containing tutorials and an API definitions ” would are this clear.
  • 77: just saying “a flagship implementation of TRIQS” implies solid_DMFT is reprogramming tools available in TRIQS instead of interfacing or utilizing the library, instead the a more accurate phrasing would be “an interface to the flagship implementations contained within the TRIQS software”.

Error in running the second tutorial: CSC with VASP PLOs, PrNiO3

Discussed in #58

Originally posted by YUBODRZHANG October 13, 2023

Dear Community Members,

I'm currently working through the second tutorial which focuses on the CSC with VASP PLOs for PrNiO3. Unfortunately, I've encountered an error that has halted the code's execution:

AssertionError: Number of bands is inconsistent at ik = 0.

Being new to this particular codebase, I'm somewhat at a loss as to what this issue might be. Any assistance or guidance you could provide would be greatly appreciated.

Sincerely,
Yubo

ERROR

problem with plotting the spectral function

Hello, I am a beginner user of solid_dmft. I encountered some issues while following the tutorial. In the section "5. Plotting the spectral function," I was able to easily construct the spectral function using the svo_example.h5 file provided by you.

However, when I tried to reconstruct the spectral function using the svo.h5 file from the first tutorial "1. OS with QE/W90 and cthyb: SrVO3 MIT," my computer gave me the following message:
669e513c979d0a6e66262d81a42229e

The tool used for the analytic continuation of the self-energy is path_to_solid_dmft\solid_dmft-3.1.x\python\solid_dmft\postprocessing\maxent_sigma.py.

Could you please provide some guidance ?Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.