Skip to content

Conversation

@AsTonyshment
Copy link
Collaborator

@AsTonyshment AsTonyshment commented Mar 20, 2025

Linked Issue

Fix #5757

The main change is at line 481 and 491 in the new file.


Update: It was discovered that the unit test in module_cell/test/read_pp_test.cpp used a scalar-relativistic pseudopotential (Te.pbe-rrkj.UPF), which does not include SOC, as indicated in its <PP_INFO> section:

<PP_INFO>
Generated using Andrea Dal Corso code (rrkj3)                                   
Andrea Dal Corso   Generation date:  9Aug2005                                   
Te                                                                              
    1        The Pseudo was generated with a Scalar-Relativistic Calculation
  2.40000000000E+00    Local Potential cutoff radius
nl pn  l   occ               Rcut            Rcut US             E pseu
5S  1  0  2.00      2.40000000000      2.40000000000     -1.40619358770
5S  1  0  0.00      2.40000000000      2.40000000000     -0.69543030525
5D  3  2  1.00      2.40000000000      2.40000000000     -0.04661365518
5P  2  1  3.00      2.40000000000      2.40000000000      0.00000000000
</PP_INFO>

Due to the previous logic error, the test failed to detect this issue. To address this, a new SOC-enabled pseudopotential file (Si.rel-pbe-rrkj.UPF) has been added, and the relevant tests have been updated accordingly.

@AsTonyshment AsTonyshment requested review from A-006 and mohanchen March 20, 2025 04:56
@A-006
Copy link
Collaborator

A-006 commented Mar 20, 2025

Perhaps we could revise the condition to “std::abs(std::abs(pp.lll[nb] - pp.jjj[nb]) - 0.5) > 1e-7”, as this might enhance clarity.

@AsTonyshment
Copy link
Collaborator Author

Perhaps we could revise the condition to “std::abs(std::abs(pp.lll[nb] - pp.jjj[nb]) - 0.5) > 1e-7”, as this might enhance clarity.

Done.

@AsTonyshment AsTonyshment added Bugs Bugs that only solvable with sufficient knowledge of DFT collinear/non-collinear/SOC Issues related to SOC labels Mar 20, 2025
@mohanchen
Copy link
Collaborator

Excellent job.

@mohanchen mohanchen merged commit 28a3540 into deepmodeling:develop Mar 22, 2025
14 checks passed
@AsTonyshment AsTonyshment deleted the fix_SOC_pseudopot branch March 22, 2025 10:12
dyzheng pushed a commit to dyzheng/abacus-develop that referenced this pull request Mar 28, 2025
…ile (deepmodeling#6027)

* Fix the angular momentum quantum number check in reading SOC pseudopot file

* Fix related unit test problem and add an SOC pseudopot file

* Refactor SOC check logic for improved readability
dyzheng added a commit that referenced this pull request Mar 28, 2025
* Fix: stress error with Dojo pseudopotential and LIBXC

* Fix: nspin2/4 mismatch with nspin1 with PBE

* Fix: add test case to CI

* Fix: delete useless warning of write_dmr

* Fix: DFTU output format

* Fix: error of noncolin and autoset mag

* Fix: reference of noncolin

* Revert "Fix: nspin2/4 mismatch with nspin1 with PBE"

This reverts commit ffd91ff.

* Perf: optimize the stream strategy in module_gint (#5845)

* optimize stream strategy

* limit max threads

* Fix: modify orb info manually (#5853)

* Fix: parse_expression for scientific notation (#5882)

* Fix: parse_expression for scientific notation

* modify openmp strategy (#5898)

* Fix document description for ocp and ocp_set (#5896)

* Fix: Resolve compilation issue with Libxc 7.0.0 in ABACUS (#5905)

* Fix: Resolve compilation issue with Libxc 7.0.0 in ABACUS

* Fix: Resolve compilation issue with Libxc 7.0.0 in ABACUS: fix a minor test issue (304_NO_GO_AF_atommag)

* Fix  a bug and a magic number in module_exx_symmetry (#5848)

* fix a magic number in get_euler_angle

* do not allow higher symmetry of bvk supercell than the original cell

* Docs: update docs about init_wfc (#5912)

* Fix the wrong symmetry analysis at nspin=2 (#5926)

* analyze magnetic group without time-reversal symmetry

* fix: need to calculate direct coordinates again

* fix a bug about hcontainer in exx nscf (#5927)

* fix cmake bug (#5929)

* inline function of complexarray (#5964)

* modify doc (#5965)

* Fix segmentation fault in integrate test 312_NO_GO_wfc_get_wf (#5970)

* Doc: polish Quick Start part of online doc (#6006)

* polish Quick Start in online doc

* set scf_thr 1e-6

* correct typo

* test: fix Dockerfile.intel (#5999)

Co-authored-by: root <pxlxingliang>

* fix the format (#6008)

* Fix : out_mat_dh will lead to different result with MPI-1core with MPI-4core (#6018)

* Fix: Enhance the warning message when the XC name cannot be recognized. (#6025)

* Update latest Intel oneAPI default compiler for cxx (#6035)

* Update latest Intel oneAPI default compiler for cxx

* Update elpa version to newest in demo cmake script

* Fix: Angular momentum quantum number check in reading SOC pseudopot file (#6027)

* Fix the angular momentum quantum number check in reading SOC pseudopot file

* Fix related unit test problem and add an SOC pseudopot file

* Refactor SOC check logic for improved readability

* Feature: support the `default` as the value of `dft_functional` when initialize vdw (#5949)

* Feature: support the `default` as the value of `dft_functional` when initialize vdw

* Refactor a littble bit

* Optimize: Compilation time of vdwd3_autoset_xcparam.cpp (#6042)

The compilation time of the vdwd3_autoset_xcparam.cpp file is reduced from 250 seconds to just 5 seconds in my machine.
Thanks to the suggestion from DeepSeek: replacing dynamic initialization with a static array for constructing the std::map

* directly enter exx loop when init_wfc=file (#6019)

* Perf: openmp for cal_force_stress (#5956)

* remove wrong timer

* omp for cal_force_stress

* openmp for cal_force_stress in dftu

* openmp for cal_force_stress in dspin

* little change

* fix bug

* fix a bug

* Fix: DFT+U force&stress with  of some elements are -1 (#6049)

Co-authored-by: dyzheng <zhengdy@bjaisi.com>

* Fix: add the print header for `cusolvermp` in scf info (#6038)

* fix an output for debug (#6066)

* Perf: optimize cal_DMR and folding_HR (#6068)

* modify variable name

* modify variable name

* change pointer to ptr

* modify variable name

* modify some variable names

* move functions from .cpp to .h

* optimize cal_DMR

* add schedule(dynamic)

* optimize func_folding

* add a check before calculating EXX force (#6067)

* fixing issue #5961 (#6071)

* modify warning output (#6074)

* Version: 3.10.0

---------

Co-authored-by: dzzz2001 <153698752+dzzz2001@users.noreply.github.com>
Co-authored-by: Yu Liu <77716030+YuLiu98@users.noreply.github.com>
Co-authored-by: jiyuyang <1041176461@qq.com>
Co-authored-by: Taoni Bao <baotaoni@pku.edu.cn>
Co-authored-by: Qianrui Liu <76200646+Qianruipku@users.noreply.github.com>
Co-authored-by: LUNASEA <33978601+maki49@users.noreply.github.com>
Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com>
Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com>
Co-authored-by: Xinyuan Liang <64718735+xuan112358@users.noreply.github.com>
Co-authored-by: Liang Sun <50293369+sunliang98@users.noreply.github.com>
Co-authored-by: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com>
Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com>
Co-authored-by: dyzheng <zhengdy@bjaisi.com>
Co-authored-by: Jie Bao <46254902+BariumOxide13716@users.noreply.github.com>
Fisherd99 pushed a commit to Fisherd99/abacus-BSE that referenced this pull request Mar 31, 2025
…ile (deepmodeling#6027)

* Fix the angular momentum quantum number check in reading SOC pseudopot file

* Fix related unit test problem and add an SOC pseudopot file

* Refactor SOC check logic for improved readability
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 collinear/non-collinear/SOC Issues related to SOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A question about the code for reading pseudopotentials

3 participants