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: output dkin for metaGGA calculations #3700

Merged
merged 7 commits into from
Mar 15, 2024

Conversation

WHUweiqingzhou
Copy link
Collaborator

@WHUweiqingzhou WHUweiqingzhou commented Mar 8, 2024

Fix #3562 and #3146.

Why

In addition to charge density, kinetic density also needs to be considered in metaGGA calculations. Sometimes, the drho is very close to zero, while the EDIFF is rather large, which confuse the user. The finite EDIFF comes from the kinetic density instead of charge density. To avoid similar confusion, it is necessary to output the kinetic density difference at each iteration.

List of Changes

  1. add a new parameter DKIN into printhead()
  2. add a new parameter dkin into printetot(), print_etot(), printiter()
  3. add a get_dkin(), similar with get_drho()

Results

I take abacus-develop/tests/integrate/216_NO_scan_Si2 as an example:
Old:

DONE(0.358404   SEC) : INIT SCF
 ITER   ETOT(eV)       EDIFF(eV)      DRHO       TIME(s)    
 GE1    -2.045033e+02  0.000000e+00   2.945e-01  4.466e-01  
 GE2    -2.034444e+02  1.058872e+00   1.150e-01  3.721e-01  
 GE3    -2.034414e+02  2.967687e-03   8.388e-03  3.721e-01  
 GE4    -2.034731e+02  -3.164552e-02  2.183e-03  3.735e-01  
 GE5    -2.034720e+02  1.056283e-03   1.013e-04  3.734e-01  
 GE6    -2.034726e+02  -6.129378e-04  1.181e-05  3.735e-01  
 GE7    -2.034727e+02  -1.090943e-05  3.115e-06  3.733e-01  
 GE8    -2.034727e+02  -3.161632e-07  2.331e-07  3.734e-01  
 GE9    -2.034727e+02  2.201660e-09   7.833e-08  3.741e-01  
 GE10   -2.034727e+02  1.750779e-08   6.904e-09  3.734e-01  
 GE11   -2.034727e+02  -8.487448e-09  7.649e-10  3.723e-01  

New:

DONE(0.273942   SEC) : INIT SCF
 ITER   ETOT(eV)       EDIFF(eV)      DRHO       DKIN       TIME(s)    
 GE1    -2.045033e+02  0.000000e+00   2.945e-01  4.232e-01  4.448e-01  
 GE2    -2.034444e+02  1.058872e+00   1.150e-01  9.808e-03  3.772e-01  
 GE3    -2.034414e+02  2.967687e-03   8.388e-03  8.195e-03  3.763e-01  
 GE4    -2.034731e+02  -3.164552e-02  2.183e-03  4.036e-04  3.761e-01  
 GE5    -2.034720e+02  1.056283e-03   1.013e-04  1.573e-04  3.765e-01  
 GE6    -2.034726e+02  -6.129378e-04  1.181e-05  1.657e-05  3.747e-01  
 GE7    -2.034727e+02  -1.090943e-05  3.115e-06  4.633e-07  3.751e-01  
 GE8    -2.034727e+02  -3.161632e-07  2.331e-07  2.111e-07  3.745e-01  
 GE9    -2.034727e+02  2.201660e-09   7.833e-08  5.770e-08  3.763e-01  
 GE10   -2.034727e+02  1.750779e-08   6.904e-09  1.108e-08  3.773e-01  
 GE11   -2.034727e+02  -8.487448e-09  7.649e-10  1.270e-09  3.759e-01

@WHUweiqingzhou WHUweiqingzhou self-assigned this Mar 8, 2024
@WHUweiqingzhou WHUweiqingzhou marked this pull request as draft March 8, 2024 08:40
@WHUweiqingzhou WHUweiqingzhou marked this pull request as ready for review March 14, 2024 06:05
Copy link
Collaborator

@dyzheng dyzheng left a comment

Choose a reason for hiding this comment

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

DKIN info is useful to meta-gga functional users.

@dyzheng dyzheng enabled auto-merge (squash) March 15, 2024 04:24
@dyzheng dyzheng merged commit 06af03b into deepmodeling:develop Mar 15, 2024
11 checks passed
@WHUweiqingzhou WHUweiqingzhou deleted the drho branch March 15, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Unify the definition of get_drho and get_dene for meta-GGA calculations
2 participants