Skip to content

Conversation

@sunliang98
Copy link
Collaborator

@sunliang98 sunliang98 commented Sep 19, 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

  • Three integrate tests are added: 119_PW_out_elf, 219_NO_out_elf, 919_OF_out_elf

What's changed?

Calculate and output electron localization function (ELF) with KSDFT and OFDFT.
image

In order to verify the correctness of the ELF obtained by ABACUS, I have writed another script as reference, which is verified by calculating the Pauli potential. Following are some examples.

  1. fcc Al with BLPS
  • PW
    image

  • LCAO
    image

  • OFDFT with WT KEDF
    image

  1. CD Si with NC
  • PW
    image

  • LCAO
    image

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
Copy link
Collaborator

Hi, do you have some model systems tests proving the correctness of implementation? you can calculate ELF of, for example a water molecule and make qualitative comparison with the result from CP2K, like #4937

YuLiu98

This comment was marked as duplicate.

@sunliang98
Copy link
Collaborator Author

Hi, do you have some model systems tests proving the correctness of implementation? you can calculate ELF of, for example a water molecule and make qualitative comparison with the result from CP2K, like #4937

Thanks for your suggestions, I have uploaded several examples comparing the ELF obtained by ABACUS and another script. Besides, could you please send me the example of water molecule and the output files from CP2K? This will help me further verify the correctness of the ELF calculations.

@sunliang98
Copy link
Collaborator Author

sunliang98 commented Sep 20, 2024

I have calculated the ELF of water molecular (tools/molden/water) using ABACUS with PW basis, the results are nearly identical to those obtained from CP2K. The CP2K results were taken from pr4937 .
elf
However, the ELF obtained using LCAO basis is not as smooth as the one from the PW basis. Since both calculations were performed using the same code, I suspect that the oscillations may be due to the LCAO basis.

@mohanchen mohanchen added the Features Needed The features are indeed needed, and developers should have sophisticated knowledge label Sep 21, 2024
@kirk0830
Copy link
Collaborator

@sunliang98 hi, you can try with these orbitals:
water_orbs.zip

sunliang98 and others added 5 commits September 23, 2024 17:08
…the numerical instability caused by LCAO basis, as suggested by 卢天, 陈飞武. 电子定域化函数的含义与函数形式[J]. 物理化学学报, 2011, 27(12): 2786-2792.
@sunliang98
Copy link
Collaborator Author

sunliang98 commented Sep 23, 2024

@sunliang98 hi, you can try with these orbitals: water_orbs.zip

Thanks, the results obtained by these orbitals ((left figure)) are much better than previous one. Besides, I have added a small number (1e-5) onto the numerator of chi to suppress the numerical instability caused by LCAO basis, as suggested by 卢天, 陈飞武. 电子定域化函数的含义与函数形式[J]. 物理化学学报, 2011, 27(12): 2786-2792, and the results were significantly improved (right figure).
LCAO2

@YuLiu98 YuLiu98 self-requested a review September 27, 2024 02:23
Copy link
Collaborator

@kirk0830 kirk0830 left a comment

Choose a reason for hiding this comment

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

Thanks for your effort. I hope this PR can be an example illustrating how to get the kinetic density even if not with metaGGA functional. Present kernel function for calculating the tau is named as meta_op, hope it will have another more general and appropriate name soon.

@mohanchen mohanchen merged commit d6657ec into deepmodeling:develop Sep 27, 2024
14 checks passed
@sunliang98 sunliang98 deleted the elf branch October 9, 2024 13:51
@1041176461
Copy link
Collaborator

@sunliang98 Hello, I use v3.8.0 with out_elf 1 to calculate ELF, however, "ELF.cube" file is not output. The job is finished successfully. Here is my INPUT file, do I set something wrong?

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants