You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: separate the print_psi from wfc_2d_to_grid and remove the invalid call (#4268)
* refactor: seperate the print_psi from wfc_2d_to_grid and remove the invalid call
* correct fn
* transfer pointer to vector and fix compiling bug
* use Cpxgemr2d to do the gather of wfc
* fix the compiling error and ut error
* fix bug in diago_cusolver
* fix integrate test
* use orb_con.ParaV instead of LOWF.ParaV; add unit test
* move write_wfc_nao to write_wfc_lcao; and correct some description in doc.
* fix bug
* fxi bug in read_wfc_nao_test
* solve the conflict of CURRENT_SPIN
* fix bug in integrate test
* fix bug in integrate test
* fix bug in integrate
* rename wfc_lcao to wfc_nao
* fix bug in Makefile.Objiects; and add comments for Cpxgemr2d
---------
Co-authored-by: Mohan Chen <mohan.chen.chen.mohan@gmail.com>
Copy file name to clipboardExpand all lines: docs/advanced/elec_properties/wfc.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ ABACUS is able to output electron wave functions in both PW and LCAO basis calcu
5
5
## wave function in G space
6
6
For the wave function in G space, one only needs to do a ground-state energy calculation with one additional keyword in the INPUT file: '***[out_wfc_pw](https://abacus-rtd.readthedocs.io/en/latest/advanced/input_files/input-main.html#out-wfc-pw)***' for PW basis calculation, and '***[out_wfc_lcao](https://abacus-rtd.readthedocs.io/en/latest/advanced/input_files/input-main.html#out-wfc-lcao)***' for LCAO basis calculation.
7
7
In the PW basis case, the wave function is output in a file called `WAVEFUNC${k}.txt`, where `${k}` is the index of K point. \
8
-
In the LCAO basis case, several `LOWF_K_${k}.dat` files will be output in multi-k calculation and `LOWF_GAMMA_S1.dat` in gamma-only calculation.
8
+
In the LCAO basis case, several `WFC_NAO_K${k}.dat` files will be output in multi-k calculation and `WFC_NAO_GAMMA1.dat` in gamma-only calculation.
Copy file name to clipboardExpand all lines: docs/advanced/input_files/input-main.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1541,14 +1541,14 @@ These variables are used to control the output of properties.
1541
1541
1542
1542
-**Type**: Integer
1543
1543
-**Availability**: Numerical atomic orbital basis
1544
-
-**Description**: Whether to output the wavefunction coefficients into files in the folder `OUT.${suffix}`. The files are named as:
1544
+
-**Description**: Whether to output the wavefunction coefficients into files in the folder `OUT.${suffix}`. The files are named as`WFC_{GAMMA|K}{index of K point}`, and if [out_app_flag](#out_app_flag) is false, the file name will also contains `_ION{ION step}`, where `ION step` is the index of ionic step:
1545
1545
- 0: no output
1546
-
- 1: (txt format)
1547
-
- gamma-only: `LOWF_GAMMA_S1.txt`;
1548
-
- non-gamma-only: `LOWF_K_${k}.txt`, where `${k}` is the index of k points.
1546
+
- 1: (txt format)
1547
+
- gamma-only: `WFC_NAO_GAMMA1_ION1.txt` or `WFC_NAO_GAMMA1.txt`, ...;
1548
+
- non-gamma-only: `WFC_NAO_K1_ION1.txt` or `WFC_NAO_K1.txt`, ...;
1549
1549
- 2: (binary format)
1550
-
- gamma-only: `LOWF_GAMMA_S1.dat`;
1551
-
- non-gamma-only: `LOWF_K_${k}.dat`, where `${k}` is the index of k points.
1550
+
- gamma-only: `WFC_NAO_GAMMA1_ION1.dat` or `WFC_NAO_GAMMA1.dat`, ...;
1551
+
- non-gamma-only: `WFC_NAO_K1_ION1.dat` or `WFC_NAO_K1.dat`, ....
1552
1552
1553
1553
The corresponding sequence of the orbitals can be seen in [Basis Set](../pp_orb.md#basis-set).
1554
1554
@@ -2414,7 +2414,7 @@ These variables are used to control molecular dynamics calculations. For more in
2414
2414
2415
2415
-**Type**: Boolean
2416
2416
-**Description**: Control whether to restart molecular dynamics calculations and time-dependent density functional theory calculations.
2417
-
- True: ABACUS will read in `${read_file_dir}/Restart_md.dat` to determine the current step `${md_step}`, then read in the corresponding `STRU_MD_${md_step}` in the folder `OUT.$suffix/STRU/` automatically. For tddft, ABACUS will also read in `LOWF_K_${kpoint}` of the last step (You need to set out_wfc_lcao=1 and out_app_flag=0 to obtain this file).
2417
+
- True: ABACUS will read in `${read_file_dir}/Restart_md.dat` to determine the current step `${md_step}`, then read in the corresponding `STRU_MD_${md_step}` in the folder `OUT.$suffix/STRU/` automatically. For tddft, ABACUS will also read in `WFC_NAO_K${kpoint}` of the last step (You need to set out_wfc_lcao=1 and out_app_flag=0 to obtain this file).
2418
2418
- False: ABACUS will start molecular dynamics calculations normally from the first step.
voidCpigemr2d (int m, int n, int *ptrmyblock, int ia, int ja, int *ma, int *ptrmynewblock, int ib, int jb, int *mb, int globcontext);
127
+
voidCpdgemr2d (int m, int n, double *ptrmyblock, int ia, int ja, int *ma, double *ptrmynewblock, int ib, int jb, int *mb, int globcontext);
128
+
voidCpzgemr2d (int m, int n, std::complex<double> *ptrmyblock, int ia, int ja, int *ma, std::complex<double> *ptrmynewblock, int ib, int jb, int *mb, int globcontext);
129
+
voidCpsgemr2d (int m, int n, float *ptrmyblock, int ia, int ja, int *ma, float *ptrmynewblock, int ib, int jb, int *mb, int globcontext);
130
+
voidCpcgemr2d (int m, int n, std::complex<float> *ptrmyblock, int ia, int ja, int *ma, std::complex<float> *ptrmynewblock, int ib, int jb, int *mb, int globcontext);
* Copies a 2D block of data from matrix A to matrix B using the Scalapack library.
142
+
* This function supports different data types: double, std::complex<double>, float, std::complex<float>, and int.
143
+
*
144
+
* @tparam T The data type of the matrices A and B.
145
+
* @param M The number of rows of matrix A.
146
+
* @param N The number of columns of matrix A.
147
+
* @param A Pointer to the source matrix A.
148
+
* @param IA The starting row index of the block in matrix A.
149
+
* @param JA The starting column index of the block in matrix A.
150
+
* @param DESCA Descriptor array for matrix A.
151
+
* @param B Pointer to the destination matrix B.
152
+
* @param IB The starting row index of the block in matrix B.
153
+
* @param JB The starting column index of the block in matrix B.
154
+
* @param DESCB Descriptor array for matrix B.
155
+
* @param ICTXT The context identifier.
156
+
*/
157
+
template <typename T>
158
+
typename std::enable_if<block2d_data_type<T>::value,void>::type Cpxgemr2d(int M, int N, T *A, int IA, int JA, int *DESCA, T *B, int IB, int JB, int *DESCB, int ICTXT)
159
+
{
160
+
if (std::is_same<T,double>::value) Cpdgemr2d(M, N, reinterpret_cast<double*>(A),IA, JA, DESCA,reinterpret_cast<double*>(B),IB,JB, DESCB,ICTXT);
161
+
if (std::is_same<T,std::complex<double>>::value) Cpzgemr2d(M, N, reinterpret_cast<std::complex<double>*>(A),IA, JA, DESCA,reinterpret_cast<std::complex<double>*>(B),IB,JB, DESCB,ICTXT);
162
+
if (std::is_same<T,float>::value) Cpsgemr2d(M, N, reinterpret_cast<float*>(A),IA, JA, DESCA,reinterpret_cast<float*>(B),IB,JB, DESCB,ICTXT);
163
+
if (std::is_same<T,std::complex<float>>::value) Cpcgemr2d(M, N, reinterpret_cast<std::complex<float>*>(A),IA, JA, DESCA,reinterpret_cast<std::complex<float>*>(B),IB,JB, DESCB,ICTXT);
164
+
if (std::is_same<T,int>::value) Cpigemr2d(M, N, reinterpret_cast<int*>(A),IA, JA, DESCA,reinterpret_cast<int*>(B),IB,JB, DESCB,ICTXT);
0 commit comments