Skip to content

Commit 6445ace

Browse files
authored
docs: update SR docs (#5621)
* docs: update SR docs * Refactor: remove useless var in get_s * docs: update docs * Docs: polish docs
1 parent 2ae2288 commit 6445ace

File tree

5 files changed

+14
-16
lines changed

5 files changed

+14
-16
lines changed

docs/advanced/elec_properties/hs_matrix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ We also offer the option of only calculating the overlap matrix without running
6161

6262
A file named `SR.csr` will be generated in the working directory, which contains the overlap matrix.
6363

64+
> When `nspin` is set to 1 or 2, the dimension of the overlap matrix is nlocal $\times$ nlocal, where nlocal is the total number of numerical atomic orbitals.
65+
These numerical atomic orbitals are ordered from outer to inner loop as atom, angular quantum number $l$, zeta (multiple radial orbitals corresponding to each $l$), and magnetic quantum number $m$.
66+
When `nspin` is set to 4, the dimension of the overlap matrix is (2 $\times$ nlocal) $\times$ (2 $\times$ nlocal). In this case, the numerical atomic orbitals are ordered from outer to inner loop as atom, angular quantum number $l$, zeta (multiple radial orbitals corresponding to each $l$), magnetic quantum number $m$, and npol (index of spin, ranges from 0 to 1).
67+
68+
6469
## examples
6570
We provide [examples](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/matrix_hs) of outputting the matrices. There are four examples:
6671

docs/advanced/elec_properties/position_matrix.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +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_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.
22+
23+
## get_S
24+
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ These variables are used to control the output of properties.
17201720

17211721
- **Type**: Boolean
17221722
- **Availability**: Numerical atomic orbital basis (not gamma-only algorithm)
1723-
- **Description**: Whether to print the matrix representation of the position matrix (in Bohr) into a file named `data-rR-tr` in the directory `OUT.${suffix}`. For more information, please refer to [position_matrix.md](../elec_properties/position_matrix.md#extracting-position-matrices).
1723+
- **Description**: Whether to print the matrix representation of the position matrix (in Bohr) into a file named `data-rR-tr` in the directory `OUT.${suffix}`. If [calculation](#calculation) is set to `get_S`, the position matrix can be obtained without scf iterations. For more information, please refer to [position_matrix.md](../elec_properties/position_matrix.md#extracting-position-matrices).
17241724
- **Default**: False
17251725

17261726
### out_mat_hs2

source/module_esolver/esolver_gets.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ void ESolver_GetS::before_all_runners(UnitCell& ucell, const Input_para& inp)
5252
this->pelec = new elecstate::ElecStateLCAO<std::complex<double>>(&(this->chr), // use which parameter?
5353
&(this->kv),
5454
this->kv.get_nks(),
55-
&(this->GG), // mohan add 2024-04-01
56-
&(this->GK), // mohan add 2024-04-01
55+
nullptr, // mohan add 2024-04-01
56+
nullptr, // mohan add 2024-04-01
5757
this->pw_rho,
5858
this->pw_big);
5959
}
@@ -100,7 +100,8 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep)
100100
search_radius,
101101
PARAM.inp.test_atom_input);
102102

103-
this->RA.for_2d(this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());
103+
Record_adj RA;
104+
RA.for_2d(this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());
104105

105106
if (this->p_hamilt == nullptr)
106107
{

source/module_esolver/esolver_gets.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#include "module_basis/module_nao/two_center_bundle.h"
55
#include "module_cell/unitcell.h"
66
#include "module_esolver/esolver_ks.h"
7-
#include "module_hamilt_lcao/module_gint/gint_gamma.h"
8-
#include "module_hamilt_lcao/module_gint/gint_k.h"
97

108
#include <memory>
119

@@ -34,18 +32,9 @@ class ESolver_GetS : public ESolver_KS<std::complex<double>>
3432
void cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) {};
3533

3634
protected:
37-
// we will get rid of this class soon, don't use it, mohan 2024-03-28
38-
Record_adj RA;
39-
4035
// 2d block - cyclic distribution info
4136
Parallel_Orbitals pv;
4237

43-
// used for k-dependent grid integration.
44-
Gint_k GK;
45-
46-
// used for gamma only algorithms.
47-
Gint_Gamma GG;
48-
4938
TwoCenterBundle two_center_bundle_;
5039

5140
// temporary introduced during removing GlobalC::ORB

0 commit comments

Comments
 (0)