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

What's the difference between restart_from_file and read_wfc_nao? #4690

Closed
maki49 opened this issue Jul 13, 2024 · 3 comments · Fixed by #4691
Closed

What's the difference between restart_from_file and read_wfc_nao? #4690

maki49 opened this issue Jul 13, 2024 · 3 comments · Fixed by #4691
Assignees
Labels
Input&Output Suitable for coders without knowing too many DFT details

Comments

@maki49
Copy link
Collaborator

maki49 commented Jul 13, 2024

Details

I find that the former is well-tested while the latter is in practical use. Will the former replace the latter?

I want to support reading a part (slice) of bands, i.e. allowing the global nbands (divided by para2D) less than the number of bands in the file, which is useful to truncate nocc in #2460.
The logic of restart_from_file is that the size of files determines nbands and para2D, so I think I should implement this feature in read_wfc_nao, and it cannot be replaced.

@maki49 maki49 added Questions Raise your quesiton! We will answer it. Features Needed The features are indeed needed, and developers should have sophisticated knowledge labels Jul 13, 2024
@mohanchen
Copy link
Collaborator

I would suggest removing 'restart_from_file' since it is not well defined. We don't know what kind of files are needed from the 'restart_from_file' tag. BTW, I can't find 'restart_from_file' from the online manual. Instead, I found 'restart_save' and 'restart_load'

@mohanchen mohanchen added Input&Output Suitable for coders without knowing too many DFT details and removed Questions Raise your quesiton! We will answer it. Features Needed The features are indeed needed, and developers should have sophisticated knowledge labels Jul 13, 2024
@kirk0830
Copy link
Collaborator

kirk0830 commented Jul 14, 2024

Hi, the function restart_from_file is implemented by me during the refactor of Local_Orbital_Wfc class, which is designed to take the place of function calling read_wfc_nao, as far as I rememberit is, allocate_k in Local_Orbital_Charge. But this class has also been removed recently in Absolute Zero project, seems this restart_from_file function can be nearly ready for substituting the old one.
The function restart_from_file works in more safe way, so if possible, I would suggest you use this or the function it calls, named read_wfc_lcao, because there is an aim to recover the encapsulation of both classes Parallel_2D and Parallel_Orbitals and improving their structures, while the function read_wfc_nao is not under this newly and carefully designed framework. I understand the function restart_from_file seems too hard-coded for you so you can write one with similar position as that of restart_from_file in workflow.
Another thing is you plan to read only part of wavefunction from file. There is temporary choice as I mentioned above but also a more rational choice, that is, add a new output which writes wavefunction in binary format without too many redundant information like eigeneneries or something else. We will find a time to implemented this because it blocks partially the orbital generation task.
Best.

@maki49
Copy link
Collaborator Author

maki49 commented Jul 14, 2024

I understand the function restart_from_file seems too hard-coded for you so you can write one with similar position as that of restart_from_file in workflow.

Got it. After #4691, read_wfc_nao will become the "similar one" that encapsulates 2D-block distribution but with the opposite logic that the 2D-block info determines how much data to read, so it cannot be replaced. But the lambda read_one_file in it can be replaced by function read_abacus_lowf implemented in read_wfc_lcao.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input&Output Suitable for coders without knowing too many DFT details
Projects
None yet
3 participants