Skip to content

Conversation

@dyzheng
Copy link
Collaborator

@dyzheng dyzheng commented Dec 16, 2025

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 #6792
hrs1_nao.csr file is large, test case should be designed to reduce memory, will be updated later.

Unit Tests and/or Case Tests for my changes

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

What's changed?

  • Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...

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

@dyzheng dyzheng changed the title Feature: for initializing charge density with hrs1_nao.csr Feature: init_chg hr for initializing charge density with hrs1_nao.csr Dec 16, 2025
this->dmat.dm->init_DMR(*hamilt_lcao->getHR());

// 13.1) decide the strategy for initializing DMR and HR
if(istep == 0)//if the first scf step, readin DMR from file,
Copy link
Collaborator

Choose a reason for hiding this comment

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

if you write the code in 'before_all_runners', then you don't need to specify if(istep==0) because it only be called once. If you write the code in 'before_scf', that's the wrong place to put the code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Next, if you want to have a function to read density matrix from DMR, then the details (from line 174-211) are suggested to put into other functions, not in esolver_ks_lcao.cpp

Copy link
Collaborator

Choose a reason for hiding this comment

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

we need an integral test for this new function to keep it correct

@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes labels Dec 17, 2025
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 Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support SCF initialization via real-space Hamiltonian matrix input

2 participants