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

Refactor: add alternatives to functions LOWF::gamma_file and LOWF::allocate_k #4331

Merged
merged 20 commits into from
Jun 13, 2024

Conversation

kirk0830
Copy link
Collaborator

@kirk0830 kirk0830 commented Jun 7, 2024

What's changed?

Original functions LOWF::gamma_file and LOWF::allocate_k are in mess, with quite bad design.
In this PR I divide what those two functions do into parts:

  1. read ABACUS dumped LOWF_K files. (Gamma only is not supported yet)
  2. loop over all K points and do 2D Block-Cyclic-Distribution (benefitted from PR#4237), store data into std::vector making it easy for psi instance construction, see the No.8 constructor. Therefore what I need to do next is to find place in ESolver workflow to let the initialization of wavefunction available.

There is a unittest case a littble bit pedagogical, see unittest "Pzgemr2dUseTest".

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Partially Fix #4303

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

Any changes of core modules? (ignore if not applicable)

  • Example: I have added a new virtual function in the esolver base class in order to ...

@kirk0830 kirk0830 changed the title Refactor: add alternatives to functions of LOWF::gamma_file and LOWF::allocate_k Refactor: add alternatives to functions LOWF::gamma_file and LOWF::allocate_k Jun 7, 2024
source/module_io/read_wfc_lcao.h Outdated Show resolved Hide resolved
source/module_io/read_wfc_lcao.cpp Outdated Show resolved Hide resolved
source/module_io/test/read_wfc_lcao_test.cpp Outdated Show resolved Hide resolved
source/module_io/test/support/LOWF_K_1.txt Outdated Show resolved Hide resolved
@mohanchen mohanchen added the Refactor Refactor ABACUS codes label Jun 8, 2024
@mohanchen mohanchen merged commit c557163 into deepmodeling:develop Jun 13, 2024
13 checks passed
@kirk0830 kirk0830 deleted the lowf-refactor-3 branch June 16, 2024 02:07
@dyzheng dyzheng mentioned this pull request Jun 19, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Refactor ABACUS codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor: restart LCAO calculation from wavefunction
2 participants