Skip to content

Fix JSON coordinate units - #7760

Merged
mohanchen merged 2 commits into
deepmodeling:developfrom
MoseyQAQ:fix/json-coordinate-unit
Aug 2, 2026
Merged

Fix JSON coordinate units#7760
mohanchen merged 2 commits into
deepmodeling:developfrom
MoseyQAQ:fix/json-coordinate-unit

Conversation

@MoseyQAQ

@MoseyQAQ MoseyQAQ commented Aug 2, 2026

Copy link
Copy Markdown

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • I have linked an issue or explained why this PR does not need one.
  • I have added adequate unit tests and/or case tests, or explained why not.
  • I have listed the exact verification commands run and their results.
  • I have described user-visible behavior changes, including INPUT parameter changes.
  • I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other source/ changes.
  • I have requested any needed governance exception below.

Linked Issue

Fix #7750

Unit Tests and/or Case Tests for my changes

  • Commands run:
  • Result summary:
  • Checks not run, with reason:

What's changed?

  • The unit of coordinate has been changed from bohr to Angstrom, in order to match the related document. The corresponding unit test has also been updated.

Governance Notes

  • INPUT/docs changes:
  • Core module impact:
  • Exceptions requested:

@Stardust0831
Stardust0831 requested a review from mohanchen August 2, 2026 07:03
@Stardust0831

Copy link
Copy Markdown
Collaborator

This PR changes JSON coordinates from tau * lat0 (Bohr) to tau * lat0_angstrom, matching the documented Angstrom unit. It seems cell may have the same issue: both init and output write raw latvec, while the documentation says cell is in Angstrom. Should it also be multiplied by lat0_angstrom?

@MoseyQAQ

MoseyQAQ commented Aug 2, 2026

Copy link
Copy Markdown
Author

@Stardust0831 I agree with you. I didn't find this issue since I always use:

LATTICE_CONSTANT
1.8897261258369282

But for some old examples, LATTICE_CONSTANT was set to other values. I have corrected the unit of cell.

@mohanchen mohanchen added Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes labels Aug 2, 2026

@mohanchen mohanchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks for your contribution!

@mohanchen
mohanchen merged commit 0b88142 into deepmodeling:develop Aug 2, 2026
17 checks passed
@MoseyQAQ
MoseyQAQ deleted the fix/json-coordinate-unit branch August 4, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The unit of coordinate in abacus.json is incorrect

3 participants