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: Output a warning when the lattice vector is left-handed. #5855

Merged
merged 9 commits into from
Jan 18, 2025

Conversation

sunliang98
Copy link
Collaborator

@sunliang98 sunliang98 commented Jan 13, 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 #4844

Unit Tests and/or Case Tests for my changes

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

What's changed?

  • Output a warning when the lattice vector is left-handed.
  • What's more, when the lattice vector is left-handed, VASP would stop, while QE would warn the user and turn it to right-handed.

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

@sunliang98 sunliang98 requested a review from mohanchen January 13, 2025 13:02
@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes labels Jan 13, 2025
@sunliang98
Copy link
Collaborator Author

During testing, I noticed many cases use left-handed lattice vectors, and users might be relying on this as well. If the program quits due to a left-handed system, it could disrupt otherwise valid calculations.
As a result, I suggest issuing a warning but not terminating the program, turn the volume to positive and continue, similar to QE's approach. This alerts users without interrupting their workflows. @mohanchen

sunliang98 and others added 3 commits January 17, 2025 16:58
…n_Si2_npsin2, 120_PW_KP_MD_NPT, 170_PW_MD_2O, and mulliken.txt.ref of 211_NO_S2_nupdown0
…olume to positive and continue, similar to QE's approach.
@sunliang98 sunliang98 changed the title Fix: Warning Quit when the lattice vector is left-handed. Fix: Output a warning when the lattice vector is left-handed. Jan 17, 2025
@mohanchen mohanchen merged commit e927eab into deepmodeling:develop Jan 18, 2025
14 checks passed
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.

Bug: atomic positions in charge density Gaussian cube file are incorrect
2 participants