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
2 changes: 1 addition & 1 deletion docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ These variables are used to control the plane wave related parameters.

- **Type**: Real
- **Description**: Energy cutoff for plane wave functions, the unit is **Rydberg**. Note that even for localized orbitals basis, you still need to setup an energy cutoff for this system. Because our local pseudopotential parts and the related force are calculated from plane wave basis set, etc. Also, because our orbitals are generated by matching localized orbitals to a chosen set of wave functions from a certain energy cutoff, this set of localize orbitals is most accurate under this same plane wave energy cutoff.
- **Default**: 50
- **Default**: 50 Ry (PW basis), 100 Ry (LCAO basis)

### ecutrho

Expand Down
18 changes: 18 additions & 0 deletions source/module_io/read_input_item_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,24 @@ void ReadInput::item_system()
Input_Item item("ecutwfc");
item.annotation = "energy cutoff for wave functions";
read_sync_double(input.ecutwfc);
item.reset_value = [](const Input_Item& item, Parameter& para) {
if (para.input.ecutwfc == 0){ // 0 means no input value
if (para.input.basis_type == "lcao")
{
para.input.ecutwfc = 100;
}
else
{
para.input.ecutwfc = 50;
}
}
};
item.check_value = [](const Input_Item& item, const Parameter& para) {
if (para.input.ecutwfc <= 0)
{
ModuleBase::WARNING_QUIT("ReadInput", "ecutwfc should be positive");
}
};
this->add_item(item);
}
{
Expand Down
2 changes: 1 addition & 1 deletion source/module_parameter/input_parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Input_para
int kpar = 1; ///< ecch pool is for one k point
int bndpar = 1; ///< parallel for stochastic/deterministic bands
std::string latname = "none"; ///< lattice name
double ecutwfc = 50; ///< energy cutoff for wavefunctions
double ecutwfc = 0; ///< energy cutoff for wavefunctions
double ecutrho = 0; ///< energy cutoff for charge/potential

int nx = 0, ny = 0, nz = 0; ///< three dimension of FFT wavefunc
Expand Down
Loading