Skip to content

Feature: support the setting on atomic magnetic moment via ase.atoms.Atoms.magmom#7124

Merged
mohanchen merged 6 commits intodeepmodeling:developfrom
kirk0830:abacuslite-magmom-io
Mar 24, 2026
Merged

Feature: support the setting on atomic magnetic moment via ase.atoms.Atoms.magmom#7124
mohanchen merged 6 commits intodeepmodeling:developfrom
kirk0830:abacuslite-magmom-io

Conversation

@kirk0830
Copy link
Copy Markdown
Collaborator

@kirk0830 kirk0830 commented Mar 24, 2026

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 #6516

Unit Tests and/or Case Tests for my changes

  • see interfaces/ASE_inteface/tests/magnetic.py for integrated test
  • see interfaces/ASE_inteface/abacuslite/io/legacyio.py for unittest

What's changed?

  • Support the user defined atomic magmom setting by:
import numpy as np
from ase.atoms import Atoms
fe = Atoms(symbols=['Fe'] * 2,
           scaled_positions=[[0., 0., 0.], [0.5, 0.5, 0.5]],
           magmoms=[-1, 1],
           cell=np.eye(3) * 5.2,
           pbc=True)

, the non-colinear cases are also supported, see the example at interfaces/ASE_inteface/exampless/soc.py for more information

Any changes of core modules? (ignore if not applicable)

  • No

Copy link
Copy Markdown
Collaborator

@mohanchen mohanchen left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

@mohanchen mohanchen added Interfaces Interfaces with other packages Refactor Refactor ABACUS codes labels Mar 24, 2026
@mohanchen mohanchen merged commit e97cf59 into deepmodeling:develop Mar 24, 2026
15 checks passed
@kirk0830 kirk0830 deleted the abacuslite-magmom-io branch March 24, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Interfaces Interfaces with other packages Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ase-Abacus cannot write initial MAGNETISM correctly.

2 participants