Skip to content

Conversation

xdzhu
Copy link

@xdzhu xdzhu commented Aug 26, 2025

This pull request introduces comprehensive Spin-Orbit Coupling (SOC) support into the overlap SK build. It adds new CLI functionality, improves JSON export, and enhances model configuration to make SOC handling robust and user-friendly. The most important changes are grouped below.

1. SOC support for overlap

  • The hr2hk module did not implement SOC support when overlap was enabled. This made it raise an error of Overlap is not implemented for SOC when perform training with both SOC and overlap simultaneously.

  • Implementation:

    • Implemented SOC-overlap coupling as: S_soc = S ⊗ I₂ , transforming the $N \times N$ overlap matrix $S(k)$ into a $2N \times 2N$ Kronecker product form.

    • Enforced a strict Hermitian form on the overlap matrix to avoid numerical issues preventing runtime errors . It can be bypassed by setting "freeze": ["overlap"], otherwise it will throw an error out when SOC+overlap is active and "overlap" is not frozen, like:

      torch._C._LinAlgError: linalg.cholesky: ... not positive definite
      
  • Now:
    Verified training with SOC+overlap is now stable on MoS₂ benchmarks, confirming correct functionality of the new implementation. Results as below:

image

2. New --soc option in dptb esk to get an easy start for soc training

  • Added a --soc option to the dptb esk command.
    • The soc block is derived from the onsite section for schema consistency.
    • SOC on different orbitals:
      • "s" orbitals and orbitals containing "*"0
      • "p" and "d" orbitals → SOC value (default is 0.2).
  • Updated model_options.nnsk.soc.method to "uniform_noref" when SOC is enabled.

3. New SOC method: uniform_noref, add "s", "p", "d" orbital support to soc in nnsk.

  • Introduced "uniform_noref" as a optional SOC method name.
  • When training with soc, it didn't recognize basis writen as ["s","p","d"]. So I realize the "uniform_noref" method for "soc" just as it was implemented in "onsite".

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.

1 participant