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

Refactor: Mulliken output codes with more flexible io interfaces #4359

Merged
merged 58 commits into from
Jun 17, 2024

Conversation

hongriTianqi
Copy link

@hongriTianqi hongriTianqi commented Jun 13, 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?

Linked Issue

Fix #4170
Fix #3802

Unit Tests and/or Case Tests for my changes

  • Unit tests have been added for the newly added two classes: CellIndex and Output_Mulliken
  • Add a new case test 214_NO_mulliken_nscf after solving issue 3802.

What's changed?

  • The CellIndex class might be helpful in refactoring UnitCell as it can be used to replace GlobalC::ucell when only cell indices are needed. For example, the function ofwrite_orb_info has been added as a member function of CellIndex.
  • Two classes Output_Sk and Output_DMK are added to provide an interface to get the pointers of Sk and DMK only in this work. They might be helpful in refactoring LM.

Changes in ESOLVER

  • void ESolver_KS_LCAO<TK, TR>::nscf(void): The option to output Mulliken population in nscf calculation has been added to fix mulliken charge output is disabled in nscf calculation #3802
  • a new function void cal_mag(const int istep, const bool print = false); is added in ESolver_KS_LCAO to be used both in scf and nscf calculation.

source/module_cell/cell_index.h Show resolved Hide resolved
source/module_io/output_sk.h Outdated Show resolved Hide resolved
source/module_io/output_dmk.h Outdated Show resolved Hide resolved
@mohanchen mohanchen merged commit bc62cd2 into deepmodeling:develop Jun 17, 2024
13 checks passed
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.

mulliken_charge.cpp needs some refactorization mulliken charge output is disabled in nscf calculation
2 participants