Skip to content

Commit f7ce7d0

Browse files
committed
Fix(PW): revert nonlocal force/stress formula to match develop
The nonlocal kernel uses deeq_nc with convention: index 1 = σ_↓↑, index 2 = σ_↑↓ (from vnl_pw.cpp:1602-1603) deeq_nc(1) = deeq(1) - i*deeq(2) // σ_↓↑ deeq_nc(2) = deeq(1) + i*deeq(2) // σ_↑↓ For this convention the correct formula is: ps1*dbb1 + ps2*dbb2 (develop version) The DFT+U kernel uses vu with opposite convention: index 1 = σ_↑↓, index 2 = σ_↓↑ (from dftu_pw.cpp:324-325) vu[1] = 0.5*(tmp[1] + i*tmp[2]) // σ_↑↓ vu[2] = 0.5*(tmp[1] - i*tmp[2]) // σ_↓↑ For vu convention the correct formula is: ps[1]*dbb1 + ps[2]*dbb2 (same order, different reason) The DeltaSpin kernel uses lambda_coeff with same convention as deeq_nc: coefficients1 = (λx, λy) = σ_↓↑ coefficients2 = (λx, -λy) = σ_↑↓ For lambda convention the correct formula is: coefficients1*dbb2 + coefficients2*dbb1 (PR version) Key insight: the formula depends on the storage convention of the coefficient array, not on a universal rule.
1 parent eaad950 commit f7ce7d0

31 files changed

Lines changed: 1861 additions & 0 deletions
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
2+
ABACUS v3.11.0-beta.1
3+
4+
Atomic-orbital Based Ab-initio Computation at UStc
5+
6+
Website: http://abacus.ustc.edu.cn/
7+
Documentation: https://abacus.deepmodeling.com/
8+
Repository: https://github.com/abacusmodeling/abacus-develop
9+
https://github.com/deepmodeling/abacus-develop
10+
Commit: 5837a6526 (Sun May 3 09:44:20 2026 +0800)
11+
12+
Sun May 3 10:30:11 2026
13+
Info: Local MPI proc number: 4,OpenMP thread number: 3,Total thread number: 12,Local thread limit: 14
14+
MAKE THE DIR : OUT.autotest/
15+
RUNNING WITH DEVICE : CPU / Intel(R) Core(TM) Ultra 5 225H (x1)
16+
WARNING: some of potential function is set to zero cause of less than 1e-30.
17+
WARNING: some of potential function is set to zero cause of less than 1e-30.
18+
19+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20+
Warning: the number of valence electrons in pseudopotential > 3 for Ga: [Ar] 3d10 4s2 4p1
21+
Pseudopotentials with additional electrons can yield (more) accurate outcomes, but may be less efficient.
22+
If you're confident that your chosen pseudopotential is appropriate, you can safely ignore this warning.
23+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24+
25+
UNIFORM GRID DIM : 24 * 24 * 24
26+
UNIFORM GRID DIM(BIG): 24 * 24 * 24
27+
DONE(1.0224e-05 SEC) : SETUP UNITCELL
28+
DONE(0.00217029 SEC) : INIT K-POINTS
29+
----------------------------------------------------------------
30+
Self-consistent calculations for electrons
31+
----------------------------------------------------------------
32+
SPIN KPOINTS PROCESSES THREADS/PROC THREADS/TOTAL
33+
4 2 4 3 12
34+
----------------------------------------------------------------
35+
Use plane wave basis
36+
----------------------------------------------------------------
37+
ELEMENT NATOM XC
38+
As 1
39+
Ga 1
40+
----------------------------------------------------------------
41+
Initial plane wave basis and FFT box
42+
----------------------------------------------------------------
43+
DONE(0.0227723 SEC) : INIT PLANEWAVE
44+
START CHARGE : atomic
45+
DONE(0.121629 SEC) : LOCAL POTENTIAL
46+
DONE(0.156523 SEC) : NON-LOCAL POTENTIAL
47+
MEMORY FOR PSI (MB) : 0.266724
48+
DONE(0.156625 SEC) : INIT BASIS
49+
50+
================================================================
51+
SELF-CONSISTENT:
52+
================================================================
53+
DONE(0.680372 SEC) : INIT SCF
54+
ITER TMAGX TMAGY TMAGZ AMAG ETOT/eV EDIFF/eV DRHO TIME/s
55+
DS1 0.00e+00 0.00e+00 2.00e+00 2.00e+00 -1.59867930e+03 0.00000000e+00 3.1042e+01 10.16
56+
DS2 0.00e+00 0.00e+00 9.75e-01 1.06e+00 -1.68133543e+03 -8.26561268e+01 3.8628e+00 4.09
57+
DS3 0.00e+00 0.00e+00 8.68e-01 8.72e-01 -1.67677930e+03 4.55612625e+00 1.0730e+00 2.01
58+
DS4 0.00e+00 0.00e+00 7.46e-01 7.69e-01 -1.67820852e+03 -1.42921557e+00 8.1469e-02 2.88
59+
DS5 0.00e+00 0.00e+00 7.61e-01 7.70e-01 -1.67833326e+03 -1.24741925e-01 2.3457e-02 3.77
60+
DS6 0.00e+00 0.00e+00 7.60e-01 7.69e-01 -1.67835572e+03 -2.24548962e-02 3.2082e-03 1.08
61+
DS7 0.00e+00 0.00e+00 7.42e-01 7.50e-01 -1.67836230e+03 -6.58348573e-03 9.5446e-04 0.27
62+
DS8 0.00e+00 0.00e+00 7.31e-01 7.38e-01 -1.67836427e+03 -1.97256808e-03 1.3430e-04 0.08
63+
DS9 0.00e+00 0.00e+00 7.28e-01 7.35e-01 -1.67836476e+03 -4.90206437e-04 5.3510e-05 0.19
64+
DS10 0.00e+00 0.00e+00 7.32e-01 7.40e-01 -1.67836488e+03 -1.12483838e-04 2.8637e-05 0.10
65+
DS11 0.00e+00 0.00e+00 7.33e-01 7.41e-01 -1.67836501e+03 -1.31704337e-04 1.1546e-05 0.07
66+
DS12 0.00e+00 0.00e+00 7.33e-01 7.41e-01 -1.67836508e+03 -6.86851807e-05 3.3868e-06 0.08
67+
DS13 0.00e+00 0.00e+00 7.33e-01 7.41e-01 -1.67836508e+03 -9.16607677e-06 2.4541e-06 0.07
68+
DS14 0.00e+00 0.00e+00 7.34e-01 7.41e-01 -1.67836510e+03 -1.34461071e-05 3.5635e-07 0.09
69+
----------------------------------------------------------------
70+
Stress_x Stress_y Stress_z
71+
----------------------------------------------------------------
72+
-10683.9706741759 -396.2387945264 396.2241082742
73+
-396.2387945264 -10683.9707016515 396.2241283692
74+
396.2241082742 396.2241283692 -10626.8786336910
75+
----------------------------------------------------------------
76+
TOTAL-PRESSURE (EXCLUDE KINETIC PART OF IONS): -10664.940003 kbar
77+
78+
TIME STATISTICS
79+
-------------------------------------------------------------------
80+
CLASS_NAME NAME TIME/s CALLS AVG/s PER/%
81+
-------------------------------------------------------------------
82+
Driver atomic_world 25.68 1 25.68 100.00
83+
total 25.66 14 1.83 99.93
84+
PW_Basis_Sup recip2real 0.30 250 0.00 1.17
85+
Relax_Driver relax_driver 25.50 1 25.50 99.31
86+
ESolver_KS runner 25.48 1 25.48 99.23
87+
ESolver_KS_PW before_scf 0.52 1 0.52 2.04
88+
Potential cal_veff 0.57 15 0.04 2.22
89+
PW_Basis_Sup real2recip 0.39 289 0.00 1.53
90+
PotXC cal_veff 0.51 15 0.03 1.98
91+
XC_Functional v_xc 0.51 15 0.03 1.97
92+
PSIPrepare initialize_psi 0.44 1 0.44 1.71
93+
psi_init random_t 0.44 2 0.22 1.70
94+
psi_init stick_to_pool 0.28 27664 0.00 1.08
95+
ESolver_KS_PW hamilt2rho_single 24.24 14 1.73 94.39
96+
HSolverPW solve 24.24 14 1.73 94.39
97+
HSolverPW solve_psik 21.31 28 0.76 82.97
98+
Diago_DavSubspace diag_once 21.21 28 0.76 82.61
99+
Diago_DavSubspace first 5.13 28 0.18 19.99
100+
Operator hPsi 17.46 110 0.16 67.99
101+
Operator veff_pw 17.11 110 0.16 66.62
102+
PW_Basis_K recip2real 11.21 8480 0.00 43.64
103+
PW_Basis_K real2recip 8.70 6352 0.00 33.87
104+
Operator nonlocal_pw 0.34 110 0.00 1.34
105+
Diago_DavSubspace cal_elem 0.40 110 0.00 1.57
106+
Diago_DavSubspace cal_grad 15.50 82 0.19 60.36
107+
ElecStatePW psiToRho 2.88 14 0.21 11.20
108+
-------------------------------------------------------------------
109+
110+
111+
START Time : Sun May 3 10:30:11 2026
112+
FINISH Time : Sun May 3 10:30:40 2026
113+
TOTAL Time : 29
114+
SEE INFORMATION IN : OUT.autotest/
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
Info: Local MPI proc number: 4,OpenMP thread number: 3,Total thread number: 12,Local thread limit: 14
2+
3+
ABACUS v3.11.0-beta.1
4+
5+
Atomic-orbital Based Ab-initio Computation at UStc
6+
7+
Website: http://abacus.ustc.edu.cn/
8+
Documentation: https://abacus.deepmodeling.com/
9+
Repository: https://github.com/abacusmodeling/abacus-develop
10+
https://github.com/deepmodeling/abacus-develop
11+
Commit: 0f9d7d97e (Thu Apr 30 12:48:20 2026 +0800)
12+
13+
Sun May 3 10:26:48 2026
14+
MAKE THE DIR : OUT.autotest/
15+
RUNNING WITH DEVICE : CPU / Intel(R) Core(TM) Ultra 5 225H (x1)
16+
WARNING: some of potential function is set to zero cause of less than 1e-30.
17+
WARNING: some of potential function is set to zero cause of less than 1e-30.
18+
19+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20+
Warning: the number of valence electrons in pseudopotential > 3 for Ga: [Ar] 3d10 4s2 4p1
21+
Pseudopotentials with additional electrons can yield (more) accurate outcomes, but may be less efficient.
22+
If you're confident that your chosen pseudopotential is appropriate, you can safely ignore this warning.
23+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24+
25+
UNIFORM GRID DIM : 24 * 24 * 24
26+
UNIFORM GRID DIM(BIG): 24 * 24 * 24
27+
DONE(0.0236263 SEC) : SETUP UNITCELL
28+
DONE(0.0258316 SEC) : INIT K-POINTS
29+
----------------------------------------------------------------
30+
Self-consistent calculations for electrons
31+
----------------------------------------------------------------
32+
SPIN KPOINTS PROCESSES THREADS/PROC THREADS/TOTAL
33+
4 2 4 3 12
34+
----------------------------------------------------------------
35+
Use plane wave basis
36+
----------------------------------------------------------------
37+
ELEMENT NATOM
38+
As 1
39+
Ga 1
40+
----------------------------------------------------------------
41+
Initial plane wave basis and FFT box
42+
----------------------------------------------------------------
43+
DONE(0.0370996 SEC) : INIT PLANEWAVE
44+
START CHARGE : atomic
45+
DONE(0.0492078 SEC) : LOCAL POTENTIAL
46+
DONE(0.0792156 SEC) : NON-LOCAL POTENTIAL
47+
MEMORY FOR PSI (MB) : 0.266724
48+
DONE(0.0792726 SEC) : INIT BASIS
49+
50+
================================================================
51+
SELF-CONSISTENT:
52+
================================================================
53+
DONE(0.131711 SEC) : INIT SCF
54+
ITER TMAGX TMAGY TMAGZ AMAG ETOT/eV EDIFF/eV DRHO TIME/s
55+
DS1 0.00e+00 0.00e+00 2.00e+00 2.00e+00 -1.59867930e+03 0.00000000e+00 3.1042e+01 0.62
56+
DS2 0.00e+00 0.00e+00 9.75e-01 1.06e+00 -1.68133543e+03 -8.26561268e+01 3.8628e+00 0.15
57+
DS3 0.00e+00 0.00e+00 8.68e-01 8.72e-01 -1.67677930e+03 4.55612625e+00 1.0730e+00 0.11
58+
DS4 0.00e+00 0.00e+00 7.46e-01 7.69e-01 -1.67820852e+03 -1.42921557e+00 8.1469e-02 0.09
59+
DS5 0.00e+00 0.00e+00 7.61e-01 7.70e-01 -1.67833326e+03 -1.24741925e-01 2.3457e-02 0.13
60+
DS6 0.00e+00 0.00e+00 7.60e-01 7.69e-01 -1.67835572e+03 -2.24548962e-02 3.2082e-03 0.07
61+
DS7 0.00e+00 0.00e+00 7.42e-01 7.50e-01 -1.67836230e+03 -6.58348573e-03 9.5446e-04 0.14
62+
DS8 0.00e+00 0.00e+00 7.31e-01 7.38e-01 -1.67836427e+03 -1.97256808e-03 1.3430e-04 0.07
63+
DS9 0.00e+00 0.00e+00 7.28e-01 7.35e-01 -1.67836476e+03 -4.90206437e-04 5.3510e-05 0.10
64+
DS10 0.00e+00 0.00e+00 7.32e-01 7.40e-01 -1.67836488e+03 -1.12483839e-04 2.8637e-05 0.06
65+
DS11 0.00e+00 0.00e+00 7.33e-01 7.41e-01 -1.67836501e+03 -1.31704337e-04 1.1546e-05 0.10
66+
DS12 0.00e+00 0.00e+00 7.33e-01 7.41e-01 -1.67836508e+03 -6.86851811e-05 3.3868e-06 0.09
67+
DS13 0.00e+00 0.00e+00 7.33e-01 7.41e-01 -1.67836508e+03 -9.16607600e-06 2.4541e-06 0.12
68+
DS14 0.00e+00 0.00e+00 7.34e-01 7.41e-01 -1.67836510e+03 -1.34461075e-05 3.5635e-07 0.19
69+
----------------------------------------------------------------
70+
Stress_x Stress_y Stress_z
71+
----------------------------------------------------------------
72+
-10683.9706741759 -396.2387945264 396.2241082742
73+
-396.2387945264 -10683.9707016515 396.2241283692
74+
396.2241082742 396.2241283692 -10626.8786336910
75+
----------------------------------------------------------------
76+
TOTAL-PRESSURE (EXCLUDE KINETIC PART OF IONS): -10664.940003 kbar
77+
78+
TIME STATISTICS
79+
-------------------------------------------------------------------
80+
CLASS_NAME NAME TIME/s CALLS AVG/s PER/%
81+
-------------------------------------------------------------------
82+
total 2.16 15 0.14 100.00
83+
Driver atomic_world 2.16 1 2.16 100.00
84+
PW_Basis_Sup recip2real 0.04 250 0.00 1.75
85+
ppcell_vnl init_vnl 0.03 1 0.03 1.18
86+
Relax_Driver relax_driver 2.08 1 2.08 96.25
87+
ESolver_KS runner 2.08 1 2.08 95.92
88+
ESolver_KS_PW before_scf 0.05 1 0.05 2.42
89+
H_Ewald_pw compute_ewald 0.02 1 0.02 1.14
90+
Potential cal_veff 0.08 15 0.01 3.87
91+
PW_Basis_Sup real2recip 0.05 289 0.00 2.43
92+
PotXC cal_veff 0.08 15 0.01 3.66
93+
XC_Functional v_xc 0.08 15 0.01 3.65
94+
ESolver_KS_PW hamilt2rho_single 1.91 14 0.14 88.35
95+
HSolverPW solve 1.91 14 0.14 88.33
96+
HSolverPW solve_psik 1.72 28 0.06 79.32
97+
Diago_DavSubspace diag_once 1.69 28 0.06 78.13
98+
Diago_DavSubspace first 0.50 28 0.02 23.31
99+
Operator hPsi 1.28 110 0.01 59.26
100+
Operator veff_pw 1.22 110 0.01 56.38
101+
PW_Basis_K recip2real 0.76 8480 0.00 35.27
102+
PW_Basis_K real2recip 0.61 6352 0.00 28.15
103+
Operator nonlocal_pw 0.06 110 0.00 2.81
104+
Nonlocal add_nonlocal_pp 0.03 110 0.00 1.18
105+
Diago_DavSubspace cal_elem 0.06 110 0.00 2.88
106+
Diago_DavSubspace diag_zhegvx 0.16 110 0.00 7.35
107+
Diago_DavSubspace cal_grad 0.98 82 0.01 45.24
108+
Diago_DavSubspace last 0.03 73 0.00 1.44
109+
ElecStatePW psiToRho 0.18 14 0.01 8.31
110+
-------------------------------------------------------------------
111+
112+
113+
START Time : Sun May 3 10:26:48 2026
114+
FINISH Time : Sun May 3 10:26:50 2026
115+
TOTAL Time : 2
116+
SEE INFORMATION IN : OUT.autotest/

0 commit comments

Comments
 (0)