Skip to content

Feature: Enable noncollinear magnetism and SOC in PW RT-TDDFT with the ETRS propagator and adaptive time stepping - #8223

Open
AsTonyshment wants to merge 28 commits into
deepmodeling:developfrom
AsTonyshment:feat/rt_nspin4
Open

AsTonyshment wants to merge 28 commits into
deepmodeling:developfrom
AsTonyshment:feat/rt_nspin4

Conversation

@AsTonyshment

@AsTonyshment AsTonyshment commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

What's Changed

  • Enable two-component spinor propagation for noncollinear PW RT-TDDFT (nspin=4), including spin-orbit coupling, on CPU and GPU.
  • Add time-resolved total and atom-resolved magnetic moments, spin currents, and XC/SOC spin torques, with Voronoi and onsite projections for atomic moments.
  • Add adaptive time stepping through automatic half-step retries when propagation self-consistency fails, preserving the original output time grid and external-field profile. Introduce separate iteration limits for initial-state SCF (scf_nmax) and real-time propagation (td_scf_nmax).
  • Add the enforced time-reversal symmetry (ETRS) propagator with adaptive Lanczos and fixed-order Taylor exponential approximations alongside Crank-Nicolson.
  • Separate propagation, endpoint state management, observables, and output into dedicated modules, keeping ESolver focused on the high-level physical workflow.
  • Address platform-dependent regression failures in 01_PW/087_PW_get_pchg_kpar_bndpar, 01_PW/089_PW_get_wf_kpar_bndpar, and 01_PW/scf_uspp_bpcg through tighter convergence, refreshed references, and case-specific tolerances. (Useful information for testing on 北极星 and 天津超算)
  • Fix cuSOLVER triangular-inversion failures affecting 11_PW_GPU/scf_bpcg by using cuBLAS TRSM. (Also an already known defect)

Tests

  • Add unit tests for spinor propagation, exponential approximations, magnetic moments, charge and spin currents, SOC torques, and external-field subdivision.
  • Add CPU/GPU integration cases covering SOC in length and velocity gauges, atomic magnetic-moment partitions, the ETRS propagator, and automatic half-step retries.

As a physical demonstration, we simulated a fixed-ion Fe dimer (Fe₂) with a 1.99 Å bond along the z axis, using PBE and the ETRS propagator. Gaussian-envelope electric pulses polarized along the bond were applied. The figure below shows the applied fields and the total magnetic moment $M_z(t)$ for three pulse amplitudes with SOC, together with a calculation without SOC at the highest amplitude.

Mz_gauss_union

@ABACUS-PR-BOT ABACUS-PR-BOT 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.

Static review at 8c0bcc47c819b80a7cadcd7cedd1a0c7b76ca04e. git diff --check 00d74be8e24cd9e7ab3537c8088f8bada783ab4c 8c0bcc47c819b80a7cadcd7cedd1a0c7b76ca04e passed; the trusted governance check on the identical parent tree returned warnings only (21 global references added/21 removed).

No builds or product/numerical/GPU/MPI tests were run; CI diagnostics were unavailable. These are bounded static findings, not runtime or CI validation.

Please provide reference-generation commands and measured platform/compiler/MPI deviations supporting the widened tolerances, including case 31's 1e-10 to 5e-10 change.

Comment thread source/source_io/module_parameter/read_inp_tddft.cpp
Comment thread tests/integrate/validation_tools/props_tddft.sh
Comment thread tests/05_rtTDDFT/30_PW_soc_onsite_TDDFT/mag_atom.txt.ref Outdated
Comment thread source/source_pw/module_rt/td_pw.cpp
Comment thread source/source_base/module_container/ATen/kernels/cuda/blas.cu
Comment thread source/source_estate/module_charge/chg_rhog_io.h
Comment thread source/source_pw/module_rt/td_spin_pw.cpp Outdated
…s with explicit dependencies and clarify naming
… timings, and replace CUDA triangular inversion with cuBLAS TRSM
@AsTonyshment AsTonyshment added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes Collinear/non-collinear/SOC/delta-spin Issues related to SOC rt-TDDFT Real-time Time-Dependent DFT labels Oct 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Collinear/non-collinear/SOC/delta-spin Issues related to SOC Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes rt-TDDFT Real-time Time-Dependent DFT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants