Skip to content

Refactor mulliken charge analysis code.#7430

Open
mohanchen wants to merge 1 commit into
deepmodeling:developfrom
mohanchen:20260604
Open

Refactor mulliken charge analysis code.#7430
mohanchen wants to merge 1 commit into
deepmodeling:developfrom
mohanchen:20260604

Conversation

@mohanchen
Copy link
Copy Markdown
Collaborator

…depth from 25 to 4

  • Move cal_mag() template function to new cal_mag.h header
  • Remove heavy includes (elecstate_lcao.h, dspin_lcao.h, density_matrix.h) from output_mulliken.h that were only needed by cal_mag()
  • Replace output_dmk.h and output_sk.h includes with forward declarations in output_mulliken.h (class only holds pointers)
  • Add output_dmk.h and output_sk.h includes to output_mulliken.cpp (implementation needs complete types)
  • Update ctrl_scf_lcao.cpp to include cal_mag.h instead of output_mulliken.h

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?

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

…depth from 25 to 4

- Move cal_mag() template function to new cal_mag.h header
- Remove heavy includes (elecstate_lcao.h, dspin_lcao.h, density_matrix.h)
  from output_mulliken.h that were only needed by cal_mag()
- Replace output_dmk.h and output_sk.h includes with forward declarations
  in output_mulliken.h (class only holds pointers)
- Add output_dmk.h and output_sk.h includes to output_mulliken.cpp
  (implementation needs complete types)
- Update ctrl_scf_lcao.cpp to include cal_mag.h instead of output_mulliken.h
@mohanchen mohanchen requested a review from Critsium-xy June 4, 2026 09:22
@mohanchen mohanchen added Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0 labels Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant