Skip to content
Merged
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
18 changes: 13 additions & 5 deletions docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
- [orbital\_dir](#orbital_dir)
- [read\_file\_dir](#read_file_dir)
- [restart\_load](#restart_load)
- [wannier\_card](#wannier_card)
- [spillage\_outdir](#spillage_outdir)
- [Plane Wave](#plane-wave-related-variables)
- [ecutwfc](#ecutwfc)
- [ecutrho](#ecutrho)
Expand Down Expand Up @@ -172,6 +172,7 @@
- [out\_wfc_re_im](#out_wfc_re_im)
- [if\_separate\_k](#if_separate_k)
- [out\_elf](#out_elf)
- [out\_spillage](#out_spillage)
- [Density of States](#density-of-states)
- [dos\_edelta\_ev](#dos_edelta_ev)
- [dos\_sigma](#dos_sigma)
Expand Down Expand Up @@ -773,12 +774,12 @@ These variables are used to control parameters related to input files.
If EXX(exact exchange) is calculated (i.e. *[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0* or *[rpa](#rpa)==True*), the Hexx(R) files in the same folder for each processor will also be read.
- **Default**: False

### wannier_card
### spillage_outdir

- **Type**: String
- **Availability**: Using ABACUS with Wannier90.
- **Description**: The name of the input file related to Wannier90.
- **Default**: "none"
- **Availability**: Used only for plane wave basis set.
- **Description**: The directory to save the spillage files.
- **Default**: "./"

[back to top](#full-list-of-input-keywords)

Expand Down Expand Up @@ -2026,6 +2027,13 @@ These variables are used to control the output of properties.
In molecular dynamics calculations, the output frequency is controlled by [out_interval](#out_interval).
- **Default**: 0 3

### out_spillage

- **Type**: Integer
- **Availability**: Only for Kohn-Sham DFT with plane-wave basis.
- **Description**: This output is only intentively needed by the ABACUS numerical atomic orbital generation workflow. This parameter is used to control whether to output the overlap integrals between truncated spherical Bessel functions (TSBFs) and plane-wave basis expanded wavefunctions (named as `OVERLAP_Q`), and between TSBFs (named as `OVERLAP_Sq`), also their first order derivatives. The output files are named starting with `orb_matrix`. A value of `2` would enable the output.
- **Default**: 0

[back to top](#full-list-of-input-keywords)

## Density of states
Expand Down
1 change: 0 additions & 1 deletion source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ OBJS_IO=input_conv.o\
unk_overlap_pw.o\
write_pao.o\
write_wfc_pw.o\
winput.o\
write_cube.o\
write_elecstat_pot.o\
write_elf.o\
Expand Down
1 change: 0 additions & 1 deletion source/source_esolver/esolver_ks_lcaopw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "source_io/numerical_basis.h"
#include "source_io/numerical_descriptor.h"
#include "source_io/to_wannier90_pw.h"
#include "source_io/winput.h"
#include "source_io/write_elecstat_pot.h"
#include "source_io/module_parameter/parameter.h"

Expand Down
5 changes: 2 additions & 3 deletions source/source_esolver/esolver_ks_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "source_io/numerical_basis.h"
#include "source_io/numerical_descriptor.h"
#include "source_io/to_wannier90_pw.h"
#include "source_io/winput.h"
#include "source_io/write_dos_pw.h"
#include "source_io/write_wfc_pw.h"
#include "source_lcao/module_deltaspin/spin_constrain.h"
Expand Down Expand Up @@ -931,10 +930,10 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
//! 4) Calculate the spillage value,
//! which are used to generate numerical atomic orbitals
//----------------------------------------------------------
if (PARAM.inp.basis_type == "pw" && winput::out_spillage)
if (PARAM.inp.basis_type == "pw" && PARAM.inp.out_spillage)
{
// ! Print out overlap matrices
if (winput::out_spillage <= 2)
if (PARAM.inp.out_spillage <= 2)
{
for (int i = 0; i < PARAM.inp.bessel_nao_rcuts.size(); i++)
{
Expand Down
1 change: 0 additions & 1 deletion source/source_esolver/pw_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "source_io/numerical_basis.h"
#include "source_io/numerical_descriptor.h"
#include "source_io/to_wannier90_pw.h"
#include "source_io/winput.h"
#include "source_io/write_elecstat_pot.h"
#include "source_io/module_parameter/parameter.h"

Expand Down
1 change: 0 additions & 1 deletion source/source_io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ list(APPEND objects_advanced
to_wannier90_lcao_in_pw.cpp
to_wannier90_lcao.cpp
fR_overlap.cpp
winput.cpp
)

if(ENABLE_LCAO)
Expand Down
3 changes: 2 additions & 1 deletion source/source_io/module_parameter/input_parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ struct Input_para
std::string orbital_dir = ""; ///< directory of orbital file
std::string read_file_dir = "auto"; ///< directory of files for reading
bool restart_load = false;
std::string wannier_card = "none"; ///< input card for wannier functions.
int mem_saver = 0; ///< 1: save psi when nscf calculation.
int diago_proc = 0; ///< the number of procs used to diag. mohan add 2012-01-13
int nbspline = -1; ///< the order of B-spline basis(>=0) if it is -1 (default)
Expand Down Expand Up @@ -408,6 +407,8 @@ struct Input_para
bool if_separate_k = false; ///< whether to write partial charge for all k-points to individual files or merge them
std::vector<int> out_elf = {0, 3}; ///< output the electron localization function (ELF). 0: no; 1: yes
std::vector<int> cal_symm_repr = {0, 3}; ///< output the symmetry representation matrix
int out_spillage = 0; ///< output the spillage of the wave function
std::string spillage_outdir = "./"; ///< output directory for spillage

// ============== #Parameters (12.Postprocess) ===========================
double dos_emin_ev = -15.0;
Expand Down
10 changes: 4 additions & 6 deletions source/source_io/numerical_basis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "source_cell/module_symmetry/symmetry.h"
#include "source_pw/module_pwdft/global.h"
#include "source_io/numerical_basis_jyjy.h"
#include "winput.h"

#include <algorithm>
#include <cstring>
Expand Down Expand Up @@ -82,13 +81,12 @@ void Numerical_Basis::output_overlap(const psi::Psi<std::complex<double>>& psi,
this->mu_index = this->init_mu_index(ucell);
this->init_label = true;
}
ModuleBase::GlobalFunc::MAKE_DIR(winput::spillage_outdir);
ModuleBase::GlobalFunc::MAKE_DIR(PARAM.inp.spillage_outdir);
for (int derivative_order = 0; derivative_order <= 1; ++derivative_order) // Peize Lin add 2020.04.23
{
std::ofstream ofs;
std::stringstream ss;
// the parameter 'winput::spillage_outdir' is read from INPUTw.
ss << winput::spillage_outdir << "/";
ss << PARAM.inp.spillage_outdir << "/";

if (PARAM.inp.bessel_nao_rcuts.size() > 1)
{
Expand Down Expand Up @@ -134,7 +132,7 @@ void Numerical_Basis::output_overlap(const psi::Psi<std::complex<double>>& psi,
ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "cal_overlap_Q");

// (2) generate Sq matrix if necessary.
if (winput::out_spillage == 2)
if (PARAM.inp.out_spillage == 2)
{
#ifndef __LCAO
// compute <jY|jY> in plane-wave basis
Expand Down Expand Up @@ -197,7 +195,7 @@ void Numerical_Basis::output_overlap(const psi::Psi<std::complex<double>>& psi,
ModuleBase::WARNING_QUIT("Numerical_Basis", "Failed to write overlap Q to file.");
}
// because one stage of file io complete, re-check the file status.
if (winput::out_spillage == 2)
if (PARAM.inp.out_spillage == 2)
{
// caution: this is the largest matrix to be output, always flush
if (ofs.good()) {
Expand Down
4 changes: 1 addition & 3 deletions source/source_io/numerical_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "source_pw/module_pwdft/global.h"
#include "source_io/module_parameter/parameter.h"
#include "source_cell/module_symmetry/symmetry.h"
#include "winput.h"
#include "source_base/math_ylmreal.h"
#include "source_base/parallel_reduce.h"
#include "source_base/timer.h"
Expand Down Expand Up @@ -75,8 +74,7 @@ void Numerical_Descriptor::output_descriptor(const UnitCell& ucell, const psi::P
//-----------------------------------
std::ofstream ofs;
std::stringstream ss;
// the parameter 'winput::spillage_outdir' is read from INPUTw.
ss << winput::spillage_outdir << "/" << "descriptor.dat";
ss << PARAM.inp.spillage_outdir << "/" << "descriptor.dat";
if (GlobalV::MY_RANK==0)
{
ofs.open(ss.str().c_str());
Expand Down
14 changes: 14 additions & 0 deletions source/source_io/read_input_item_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,5 +572,19 @@ void ReadInput::item_output()
sync_intvec(input.cal_symm_repr, 2, 0);
this->add_item(item);
}
{
// refactored from the removal of wannier input file, ISSUE 6469
Input_Item item("out_spillage");
item.annotation = "output spillage of wavefunctions. This parameter only accepts 0 or 2.";
read_sync_int(input.out_spillage);
this->add_item(item);
}
{
// refactored from the removal of wannier input file, ISSUE 6469
Input_Item item("spillage_outdir");
item.annotation = "output directory for spillage of wavefunctions.";
read_sync_string(input.spillage_outdir);
this->add_item(item);
}
}
} // namespace ModuleIO
6 changes: 0 additions & 6 deletions source/source_io/read_input_item_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,6 @@ void ReadInput::item_system()
read_sync_bool(input.restart_load);
this->add_item(item);
}
{
Input_Item item("wannier_card");
item.annotation = "input card for wannier functions";
read_sync_string(input.wannier_card);
this->add_item(item);
}
{
Input_Item item("mem_saver");
item.annotation = "Only for nscf calculations. if set to 1, then a "
Expand Down
6 changes: 0 additions & 6 deletions source/source_io/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ add_test(NAME MODULE_IO_read_exit_file_test_para_4
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)

AddTest(
TARGET MODULE_IO_winput_test
LIBS parameter ${math_libs} base device
SOURCES winput_test.cpp ../winput.cpp
)

AddTest(
TARGET MODULE_IO_output_test
LIBS parameter ${math_libs} base device
Expand Down
1 change: 0 additions & 1 deletion source/source_io/test/read_input_ptest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ TEST_F(InputParaTest, ParaRead)
EXPECT_EQ(param.inp.pseudo_dir, "../../PP_ORB/");
EXPECT_EQ(param.inp.orbital_dir, "../../PP_ORB/");
EXPECT_EQ(param.inp.read_file_dir, "OUT.autotest/");
EXPECT_EQ(param.inp.wannier_card, "none");
EXPECT_EQ(param.inp.latname, "none");
EXPECT_EQ(param.inp.calculation, "scf");
EXPECT_EQ(param.inp.esolver_type, "ksdft");
Expand Down
1 change: 0 additions & 1 deletion source/source_io/test/support/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ rpa 0 #true:generate output files used in rpa calcula
mem_saver 0 #Only for nscf calculations. if set to 1, then a memory saving technique will be used for many k point calculations.
diago_proc 4 #the number of procs used to do diagonalization
nbspline -1 #the order of B-spline basis
wannier_card none #input card for wannier functions
soc_lambda 1 #The fraction of SOC based on scalar relativity (SR) of the pseudopotential
cal_force 0 #if calculate the force at the end of the electronic iteration
out_freq_ion 0 #the frequency ( >= 0 ) of ionic step to output charge density and wavefunction. 0: output only when ion steps are finished
Expand Down
102 changes: 0 additions & 102 deletions source/source_io/test/winput_test.cpp

This file was deleted.

Loading
Loading