Skip to content

Full Hartree energy #7272

@kluonju

Description

@kluonju

Background

When doing Hartree-Fock calculation for one orbital only case, namely, H2 molecule, the doubly occupied case should give $E_{exx} = - 0.5 * E_{Hartree}$. This has been known. However, energies given by ABACUS using LIBRI to compute the H2 case in LCAO basis or using ACE to compute the H2 case in PlaneWave basis do not honor this equality.

The attached input using H atom in nspin=1 gives

 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Electron density deviation 6.59233e-07
 ----------------------------------------------------------
      Energy           Rydberg                 eV          
 ----------------------------------------------------------
  E_KohnSham     -0.7124077475        -9.6928046650        
  E_KS(sigma->0) -0.7081763256        -9.6352332168        
  E_Harris       -0.7124072299        -9.6927976231        
  E_band         -0.4251778536        -5.7848414721        
  E_one_elec     -0.8325683832        -11.3276739863       
  E_Hartree      0.4821730307         6.5603006390         
  E_xc           0.0000000000         0.0000000000         
  E_Ewald        -0.0750716583        -1.0214023112        
  E_entropy(-TS) -0.0084628438        -0.1151428963        
  E_descf        0.0000000000         0.0000000000         
  E_localpp      -1.5488518998        -21.0732111950       
  E_exx          -0.2784778929        -3.7888861101        
  E_Fermi        -0.4251778536        -5.7848414720        
  E_gap(k)       2.0754154462         28.2374757860        
 ----------------------------------------------------------

 #SCF IS CONVERGED#
 #TOTAL ENERGY# -9.692804665 eV
 Write eigenvalues and occupations to file: OUT.ABACUS/eig_occ.txt

 --------------------------------------------
 !FINAL_ETOT_IS -9.692804664956425 eV
 --------------------------------------------

$E_{exx}$= -3.7888861101, $E_{Hartree}$ = 6.5603006390

After a brief discussion, we thought the Hartree energy in the final print does not include properly the G=0 components. It might be good to verify this is the case. If so, we may add a "proper" print for Hartree energy.

H2_input.zip

Describe the solution you'd like

If so, we may add a "proper" print for Hartree energy.

Task list only for developers

  • Notice possible changes of behavior
  • Explain the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi

Notice Possible Changes of Behavior (Reminder only for developers)

No response

Notice any changes of core modules (Reminder only for developers)

No response

Notice Possible Changes of Core Modules (Reminder only for developers)

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Review and understand the proposed feature and its importance.
  • Research on the existing solutions and relevant research articles/resources.
  • Discuss with the team to evaluate the feasibility of implementing the feature.
  • Create a design document outlining the proposed solution and implementation details.
  • Get feedback from the team on the design document.
  • Develop the feature following the agreed design.
  • Write unit tests and integration tests for the feature.
  • Update the documentation to include the new feature.
  • Perform code review and address any issues.
  • Merge the feature into the main branch.
  • Monitor for any issues or bugs reported by users after the feature is released.
  • Address any issues or bugs reported by users and continuously improve the feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionsRaise your quesiton! We will answer it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions