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

Fix: No warning is given if KPT is ill set #4134

Merged
merged 2 commits into from
May 10, 2024

Conversation

Luc1anoo
Copy link

@Luc1anoo Luc1anoo commented May 9, 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?
  • 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 #4070

Unit Tests and/or Case Tests for my changes

Test has been performed on /abacus-develop/examples/scf/lcao_Si2.
When the KPT is well set, no warning occurs.
When the shift of K-mesh is missing, the calculation will continue with warning throwed in warning.log:
AUTO_SET NBANDS to 0
K_Vectors::read_kpoints warning : Missing k-point offsets in the k-points file.

What's changed?

throw warning when kpoints is ill set

@Luc1anoo Luc1anoo changed the title throw warning when kpoints is non-standard Fix: No warning given if KPT is ill set May 9, 2024
@WHUweiqingzhou WHUweiqingzhou self-requested a review May 9, 2024 06:20
Copy link
Collaborator

@WHUweiqingzhou WHUweiqingzhou left a comment

Choose a reason for hiding this comment

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

  1. you can add initialization of koffest before valuing it.
  2. be careful about format

@Luc1anoo Luc1anoo changed the title Fix: No warning given if KPT is ill set Fix: No warning is given if KPT is ill set May 10, 2024
Copy link
Collaborator

@WHUweiqingzhou WHUweiqingzhou left a comment

Choose a reason for hiding this comment

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

LGTM. Cheers for your first PR.

@WHUweiqingzhou WHUweiqingzhou merged commit 98f8ae9 into deepmodeling:develop May 10, 2024
13 checks passed
@Luc1anoo Luc1anoo deleted the kpoints branch May 10, 2024 14:28
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.

No warning given if KPT is ill set
2 participants