Skip to content

Commit faee0f0

Browse files
author
Fei Yang
committed
fix INPUT problem
2 parents f12f6eb + 2f10362 commit faee0f0

File tree

280 files changed

+6895
-2207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+6895
-2207
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,17 @@ jobs:
1717
volumes:
1818
- /tmp/ccache:/github/home/.ccache
1919
steps:
20-
- name: Checkout
20+
- name: Checkout repository
2121
uses: actions/checkout@v5
2222
with:
23-
submodules: recursive
2423
fetch-depth: 0
24+
# We will handle submodules manually after fixing ownership
25+
submodules: 'false'
26+
27+
- name: Take ownership of the workspace and update submodules
28+
run: |
29+
sudo chown -R $(whoami) .
30+
git submodule update --init --recursive
2531
2632
- name: Install CI tools
2733
run: |

docs/advanced/elec_properties/Mulliken.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Mulliken Charge Analysis
22

33
From version 2.1.0, ABACUS has the function of Mulliken population analysis. The example can be found in [examples/mulliken](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/mulliken). \
4-
To use this function, set [out_mul](./input-main.md#out_mul) to `1` in the INPUT file. After calculation, there will be an output file named `mulliken.txt` in the output directory. In MD calculations, the output interval is controlled by the keyword [out_interval](./input-main.md#out_interval). In the file, there are contents like (`nspin 1`):
4+
To use this function, set [out_mul](./input-main.md#out_mul) to `1` in the INPUT file. After calculation, there will be an output file named `mulliken.txt` in the output directory. In MD calculations, the output interval is controlled by the keyword [out_freq_ion](./input-main.md#out_freq_ion). In the file, there are contents like (`nspin 1`):
55

66
```
77
STEP: 0

docs/advanced/elec_properties/hs_matrix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The CSR format stores a sparse m × n matrix M in row form using three (one-dime
4545
- The arrays V and COL_INDEX are of length NNZ, and contain the non-zero values and the column indices of those values respectively.
4646
- The array ROW_INDEX is of length m + 1 and encodes the index in V and COL_INDEX where the given row starts. This is equivalent to ROW_INDEX[j] encoding the total number of nonzeros above row j. The last element is NNZ , i.e., the fictitious index in V immediately after the last valid index NNZ - 1.
4747

48-
For calculations involving ionic movements, the output frequency of the matrix is controlled by [out_interval](../input_files/input-main.md#out_interval) and [out_app_flag](../input_files/input-main.md#out_app_flag).
48+
For calculations involving ionic movements, the output frequency of the matrix is controlled by [out_freq_ion](../input_files/input-main.md#out_freq_ion) and [out_app_flag](../input_files/input-main.md#out_app_flag).
4949

5050
## get_s
5151
We also offer the option of only calculating the overlap matrix without running SCF. For that purpose, in `INPUT` file we need to set the value keyword [calculation](../input_files/input-main.md#calculation) to be `get_s`.

docs/advanced/elec_properties/position_matrix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Each file or each section of the appended file starts with "STEP: " followed by
1818

1919
Each block here contains the matrix for the corresponding cell. There are three columns in each block, giving the matrix elements in x, y, z directions, respectively. There are altogether nbasis * nbasis lines in each block, which emulates the matrix elements.
2020

21-
In molecular dynamics (MD) calculations, if [out_app_flag](../input_files/input-main.md#out_app_flag) is set to true, then `data-rR-tr` is written in an append manner. Otherwise, output files will be put in a separate directory, `matrix`, and named as `$x`_data-rR-tr, where `$x` is the number of MD step. In addition, the output frequency is controlled by [out_interval](../input_files/input-main.md#out_interval). For example, if we are running a 10-step MD with out_interval = 3, then `$x` will be 0, 3, 6, and 9.
21+
In molecular dynamics (MD) calculations, if [out_app_flag](../input_files/input-main.md#out_app_flag) is set to true, then `data-rR-tr` is written in an append manner. Otherwise, output files will be put in a separate directory, `matrix`, and named as `$x`_data-rR-tr, where `$x` is the number of MD step. In addition, the output frequency is controlled by [out_freq_ion](../input_files/input-main.md#out_freq_ion). For example, if we are running a 10-step MD with out_freq_ion = 3, then `$x` will be 0, 3, 6, and 9.
2222

2323
## get_s
2424
We also offer the option of only calculating the position matrix without running SCF. For that purpose, in `INPUT` file we need to set the keyword [calculation](../input_files/input-main.md#calculation) to `get_s`, and [out_mat_r](../input_files/input-main.md#out_mat_r) to `true`.

docs/advanced/input_files/input-main.md

Lines changed: 166 additions & 137 deletions
Large diffs are not rendered by default.

examples/relax/pw_output/INPUT

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ecutwfc 10
88
scf_nmax 20
99

1010
basis_type pw
11-
relax_nmax 5
11+
relax_nmax 4
1212

1313
cal_stress 1
1414
stress_thr 1e-6
@@ -25,18 +25,23 @@ relax_method lbfgs
2525
pseudo_dir ../../../tests/PP_ORB
2626
orbital_dir ../../../tests/PP_ORB
2727

28-
nspin 2
28+
nspin 4
29+
30+
out_freq_ion 1
31+
#out_freq_elec 0
32+
33+
out_chg 1 # chg.txt g
34+
out_pot 1 # pot.txt g
35+
out_wfc_pw 1 # wfkx_pw.txt g
36+
out_dos 1 # dos.txt g
37+
out_elf 1 # elf.txt
38+
out_band 1 # eig.txt
39+
out_stru 1 # g
40+
out_bandgap 1
2941

30-
out_chg 1
31-
out_pot 1
32-
out_wfc_pw 1
33-
out_dos 1
34-
out_stru 1
3542
out_app_flag 0
3643

37-
out_interval 1
38-
kpar 2
44+
kpar 1
3945
symmetry -1
4046

41-
#out_freq_elec 2
42-
#out_band 1
47+

examples/relax/pw_output/KPT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ K_POINTS
22
0
33
Gamma
44
2 2 2 0 0 0
5+

python/pyabacus/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ list(APPEND _diago
189189
${HSOLVER_PATH}/diago_david.cpp
190190
${HSOLVER_PATH}/diag_const_nums.cpp
191191
${HSOLVER_PATH}/diago_iter_assist.cpp
192-
${HSOLVER_PATH}/kernels/dngvd_op.cpp
192+
${HSOLVER_PATH}/kernels/hegvd_op.cpp
193193
${HSOLVER_PATH}/kernels/bpcg_kernel_op.cpp
194194
${BASE_PATH}/kernels/math_kernel_op.cpp
195195
${BASE_PATH}/kernels/math_kernel_op_vec.cpp

python/pyabacus/src/hsolver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ list(APPEND _diago
99
${HSOLVER_PATH}/diago_pxxxgvx.cpp
1010

1111

12-
${HSOLVER_PATH}/kernels/dngvd_op.cpp
12+
${HSOLVER_PATH}/kernels/hegvd_op.cpp
1313
${HSOLVER_PATH}/kernels/bpcg_kernel_op.cpp
1414
# dependency
1515
${BASE_PATH}/kernels/math_kernel_op.cpp

python/pyabacus/src/hsolver/py_diago_cg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class PyDiagoCG
145145
std::copy(hpsi_ptr, hpsi_ptr + nvec * ld_psi, hpsi_out.data<std::complex<double>>());
146146
};
147147

148-
auto subspace_func = [] (const ct::Tensor& psi_in, ct::Tensor& psi_out) { /*do nothing*/ };
148+
auto subspace_func = [](const ct::Tensor& psi_in, ct::Tensor& psi_out, const bool S_orth) { /*do nothing*/ };
149149

150150
auto spsi_func = [this] (const ct::Tensor& psi_in, ct::Tensor& spsi_out) {
151151
const auto ndim = psi_in.shape().ndim();

0 commit comments

Comments
 (0)