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: Remove global dependence of descriptor, orbital_precalc, v_delta_precalc in DeePKS. #5812

Merged
merged 13 commits into from
Jan 5, 2025

Conversation

ErjieWu
Copy link
Collaborator

@ErjieWu ErjieWu commented Jan 4, 2025

Unit Tests and/or Case Tests for my changes

What's changed?

  • Move functions and variables related to descriptor from LCAO_deepks to DeePKS_domain in DeePKS.
  • Split the function of force and stress calculations cal_gdmx() in DeePKS into two separate functions cal_gdmx() and cal_gdmepsl(), rearrange the calculation related to DeePKS in FORCE_STRESS.cpp to make it same as other parts for force&stress calculations.
  • Remove the global dependence of orbital_precalc and v_delta_precalc in DeePKS and put their functions together in deepks_orbpre.cpp and deepks_vdpre.cpp.
  • Use accessor for tensor to accelerate the access/modify of torch::Tensor variables.
  • Remove LCAO_deepks_mpi.cpp since the function allsum_deepks() is no longer used now.

@mohanchen mohanchen added Refactor Refactor ABACUS codes DeePKS Issues related to the DeePKS The Absolute Zero Reduce the "entropy" of the code to 0 labels Jan 5, 2025
@mohanchen mohanchen merged commit e25db6e into deepmodeling:develop Jan 5, 2025
14 checks passed
@ErjieWu ErjieWu deleted the refactor branch January 6, 2025 05:13
kluophysics pushed a commit to kluophysics/abacus-develop that referenced this pull request Jan 10, 2025
…delta_precalc in DeePKS. (deepmodeling#5812)

* Remove functions related to v_delta in LCAO_Deepks; Remove some redundent variables.

* Remove some temporary variables for force/stress calculation in DeePKS and separate force&stress calculations. Remove global dependence of descriptor.

* Use accessor to accelerate the manipulation of torch::Tensor variables in DeePKS.

* Remove LCAO_deepks_mpi.cpp.

* Update Unittest for DeePKS.

* Clang-format change.

* Update cal_gdmx and cal_gdmepsl.

* Fix check_gvx() bug when using mpirun.

* Move functions for calculating descriptor from LCAO_deepks to DeePKS_domain.

* Add UT for cal_gdmepsl and modify the ref files to suit the new data structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeePKS Issues related to the DeePKS Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants