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

Feature: Support machine-learning based kinetic energy density functional for OFDFT #5777

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from

Conversation

sunliang98
Copy link
Collaborator

@sunliang98 sunliang98 commented Dec 27, 2024

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

Fix #...

Unit Tests and/or Case Tests for my changes

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

What's changed?

  • Support machine-learning based kinetic energy density functional for OFDFT, under source/module_hamilt_pw/hamilt_ofdft.
  • Provide the training manuscript of ML-based KEDF, under source/module_hamilt_pw/hamilt_ofdft/ml_tools.
  • Add a compile option ENABLE_MLKEDF for CMake and Makefile to turn on the ML-based KEDF.
  • Add two integrate tests: 902_OF_KE_MPN and 902_OF_KE_CPN5.
  • Update the document of input parameters.

This Pr is not complete yet.

  • Update compile and usage documents.
  • Provide default parameters for MPN and CPN5 KEDFs.
  • (Optional) Romove useless input parameters of ML-based KEDF.

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 ...

sunliang98 and others added 30 commits September 15, 2022 17:30
…ut variable 'pseudo_type'.

Now the type of pseudopotential is assigned in STRU, not INPUT, and different type of pseudopotentials can be assigned for different elements in one calculation.
Following are the supported format of STRU:
Al 26.98 Al_ONCV_PBE-1.2.upf
Al 26.98 Al_ONCV_PBE-1.2.upf auto
Al 26.98 Al_ONCV_PBE-1.2.upf upf201
Al 26.98 Al_ONCV_PBE-1.2.upf upf201 # annotations...
If no pseudo_type is assigned in STRU, the default value is 'auto', and ABACUS will recongnize the pp by itself.
… them into STRU.

Add two integrate tests, `101_PW_upf201_blps_pseudopots` and `101_PW_upf201_upf100_pseudopots`, which contain two elements (Mg3Al), and different types of pseudopotentials are specified for different elements.
@sunliang98 sunliang98 requested a review from mohanchen December 27, 2024 06:44
source/module_hamilt_pw/hamilt_ofdft/ml_tools/potential.h Outdated Show resolved Hide resolved
tests/PP_ORB/si.gga.psp Outdated Show resolved Hide resolved
tests/integrate/902_OF_KE_CPN5/net.pt Outdated Show resolved Hide resolved
@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS labels Dec 28, 2024
source/module_esolver/esolver_ks.cpp Outdated Show resolved Hide resolved

Data::~Data()
{
delete[] load_gammanl;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems dangerous to delete here without knowing where is the 'new'

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are initialized in the function Data::init_lable``.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Features Needed The features are indeed needed, and developers should have sophisticated knowledge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants