Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *Numerical atomic orbital basis (not gamma-only algorithm)*
- **Description**: Whether to print the matrix representation of the position matrix into files named rxrs1_nao.csr, ryrs1_nao.csr, rzrs1_nao.csr in the directory OUT.${suffix}. If calculation is set to get_s, the position matrix can be obtained without scf iterations. For more information, please refer to position_matrix.md.
- **Description**: Whether to print the matrix representation of the position matrix into files named rxrs1_nao.csr, ryrs1_nao.csr, rzrs1_nao.csr in the directory OUT.${suffix}. The optional second parameter controls text output precision. If calculation is set to get_s, the position matrix can be obtained without scf iterations. For more information, please refer to position_matrix.md.

> Note: In the 3.10-LTS version, the file name is data-rR-sparse.csr.
- **Default**: False 8
Expand All @@ -1974,17 +1974,17 @@

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *Numerical atomic orbital basis (not gamma-only algorithm)*
- **Description**: Generate files containing the kinetic energy matrix. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be trs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.
- **Description**: Generate files containing the kinetic energy matrix. The optional second parameter controls text output precision. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be trs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.

> Note: In the 3.10-LTS version, the file name is data-TR-sparse_SPIN0.csr.
- **Default**: False 8
- **Unit**: Ry

### out_mat_dh

- **Type**: Integer
- **Type**: Boolean \[Integer\](optional)
- **Availability**: *Numerical atomic orbital basis (not gamma-only algorithm)*
- **Description**: Whether to print files containing the derivatives of the Hamiltonian matrix. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be dhrxs1_nao.csr, dhrys1_nao.csr, dhrzs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.
- **Description**: Whether to print files containing the derivatives of the Hamiltonian matrix. The optional second parameter controls text output precision. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be dhrxs1_nao.csr, dhrys1_nao.csr, dhrzs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.

> Note: In the 3.10-LTS version, the file name is data-dHRx-sparse_SPIN0.csr and so on.
- **Default**: 0 8
Expand All @@ -1994,7 +1994,7 @@

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *Numerical atomic orbital basis (not gamma-only algorithm)*
- **Description**: Whether to print files containing the derivatives of the overlap matrix. The format will be the same as the overlap matrix as mentioned in out_mat_dh. The name of the files will be dsxrs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag. This feature can be used with calculation get_s.
- **Description**: Whether to print files containing the derivatives of the overlap matrix. The optional second parameter controls text output precision. The format will be the same as the overlap matrix as mentioned in out_mat_dh. The name of the files will be dsxrs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag. This feature can be used with calculation get_s.

> Note: In the 3.10-LTS version, the file name is data-dSRx-sparse_SPIN0.csr and so on.
- **Default**: False 8
Expand Down
10 changes: 5 additions & 5 deletions docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,7 @@ parameters:
category: Output information
type: "Boolean \\[Integer\\](optional)"
description: |
Whether to print the matrix representation of the position matrix into files named rxrs1_nao.csr, ryrs1_nao.csr, rzrs1_nao.csr in the directory OUT.${suffix}. If calculation is set to get_s, the position matrix can be obtained without scf iterations. For more information, please refer to position_matrix.md.
Whether to print the matrix representation of the position matrix into files named rxrs1_nao.csr, ryrs1_nao.csr, rzrs1_nao.csr in the directory OUT.${suffix}. The optional second parameter controls text output precision. If calculation is set to get_s, the position matrix can be obtained without scf iterations. For more information, please refer to position_matrix.md.

[NOTE] In the 3.10-LTS version, the file name is data-rR-sparse.csr.
default_value: False 8
Expand All @@ -3068,17 +3068,17 @@ parameters:
category: Output information
type: "Boolean \\[Integer\\](optional)"
description: |
Generate files containing the kinetic energy matrix. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be trs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.
Generate files containing the kinetic energy matrix. The optional second parameter controls text output precision. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be trs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.

[NOTE] In the 3.10-LTS version, the file name is data-TR-sparse_SPIN0.csr.
default_value: False 8
unit: Ry
availability: Numerical atomic orbital basis (not gamma-only algorithm)
- name: out_mat_dh
category: Output information
type: Integer
type: "Boolean \\[Integer\\](optional)"
description: |
Whether to print files containing the derivatives of the Hamiltonian matrix. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be dhrxs1_nao.csr, dhrys1_nao.csr, dhrzs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.
Whether to print files containing the derivatives of the Hamiltonian matrix. The optional second parameter controls text output precision. The format will be the same as the Hamiltonian matrix and overlap matrix as mentioned in out_mat_hs2. The name of the files will be dhrxs1_nao.csr, dhrys1_nao.csr, dhrzs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag.

[NOTE] In the 3.10-LTS version, the file name is data-dHRx-sparse_SPIN0.csr and so on.
default_value: 0 8
Expand All @@ -3088,7 +3088,7 @@ parameters:
category: Output information
type: "Boolean \\[Integer\\](optional)"
description: |
Whether to print files containing the derivatives of the overlap matrix. The format will be the same as the overlap matrix as mentioned in out_mat_dh. The name of the files will be dsxrs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag. This feature can be used with calculation get_s.
Whether to print files containing the derivatives of the overlap matrix. The optional second parameter controls text output precision. The format will be the same as the overlap matrix as mentioned in out_mat_dh. The name of the files will be dsxrs1_nao.csr and so on. Also controled by out_freq_ion and out_app_flag. This feature can be used with calculation get_s.

[NOTE] In the 3.10-LTS version, the file name is data-dSRx-sparse_SPIN0.csr and so on.
default_value: False 8
Expand Down
7 changes: 5 additions & 2 deletions source/source_esolver/esolver_gets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep)
{
cal_r_overlap_R r_matrix;
r_matrix.init(ucell, pv, orb_);
r_matrix.out_rR(ucell, gd, istep);
r_matrix.out_rR(ucell, gd, istep, PARAM.inp.out_mat_r[1]);
}

if (PARAM.inp.out_mat_ds[0])
Expand All @@ -149,7 +149,10 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep)
gd, // mohan add 2024-04-06
two_center_bundle_,
orb_,
kv);
kv,
false,
1e-10,
PARAM.inp.out_mat_ds[1]);
}

ModuleBase::timer::end("ESolver_GetS", "runner");
Expand Down
1 change: 1 addition & 0 deletions source/source_io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ if(ENABLE_LCAO)
module_hs/write_HS_R.cpp
module_hs/write_HS_sparse.cpp
module_hs/single_R_io.cpp
module_hs/rr_sparse_writer.cpp
module_hs/cal_r_overlap_R.cpp
module_hs/output_mat_sparse.cpp
module_ctrl/ctrl_scf_lcao.cpp
Expand Down
15 changes: 11 additions & 4 deletions source/source_io/module_ctrl/ctrl_scf_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,17 @@ void ModuleIO::ctrl_scf_lcao(UnitCell& ucell,
//------------------------------------------------------------------
hamilt::Hamilt<TK>* p_ham_tk = static_cast<hamilt::Hamilt<TK>*>(p_hamilt);

ModuleIO::output_mat_sparse(inp.out_mat_dh[0],
inp.out_mat_ds[0],
inp.out_mat_t[0],
inp.out_mat_r[0],
ModuleIO::MatSparseOutputOptions mat_sparse_options;
mat_sparse_options.out_mat_dh = inp.out_mat_dh[0];
mat_sparse_options.out_mat_ds = inp.out_mat_ds[0];
mat_sparse_options.out_mat_t = inp.out_mat_t[0];
mat_sparse_options.out_mat_r = inp.out_mat_r[0];
mat_sparse_options.dh_precision = inp.out_mat_dh[1];
mat_sparse_options.ds_precision = inp.out_mat_ds[1];
mat_sparse_options.t_precision = inp.out_mat_t[1];
mat_sparse_options.r_precision = inp.out_mat_r[1];

ModuleIO::output_mat_sparse(mat_sparse_options,
istep,
pelec->pot->get_eff_v(),
pv,
Expand Down
Loading
Loading