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
19 changes: 14 additions & 5 deletions docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
- [of\_vw\_weight](#of_vw_weight)
- [of\_wt\_alpha](#of_wt_alpha)
- [of\_wt\_beta](#of_wt_beta)
- [of\_extwt\_kappa](#of_extwt_kappa)
- [of\_wt\_rho0](#of_wt_rho0)
- [of\_hold\_rho0](#of_hold_rho0)
- [of\_lkt\_a](#of_lkt_a)
Expand Down Expand Up @@ -2395,7 +2396,8 @@
- vw: von Weizsacker (vW) functional
- tf+: TF + vW functional
- wt: Wang-Teter (WT) functional
- xwm: XWM functional
- ext-wt: Extended Wang-Teter (ext-WT) functional
- xwm: Xu-Wang-Ma (XWM) functional
- lkt: Luo-Karasiev-Trickey (LKT) functional
- ml: Machine learning KEDF
- mpn: MPN KEDF (automatically sets ml parameters)
Expand Down Expand Up @@ -2441,29 +2443,36 @@
### of_tf_weight

- **Type**: Real
- **Availability**: *OFDFT with of_kinetic=tf, tf+, wt, xwm*
- **Availability**: *OFDFT with of_kinetic=tf, tf+, wt, ext-wt, xwm*
- **Description**: Weight of TF KEDF (kinetic energy density functional).
- **Default**: 1.0

### of_vw_weight

- **Type**: Real
- **Availability**: *OFDFT with of_kinetic=vw, tf+, wt, lkt, xwm*
- **Availability**: *OFDFT with of_kinetic=vw, tf+, wt, ext-wt, lkt, xwm*
- **Description**: Weight of vW KEDF (kinetic energy density functional).
- **Default**: 1.0

### of_wt_alpha

- **Type**: Real
- **Availability**: *OFDFT with of_kinetic=wt*
- **Availability**: *OFDFT with of_kinetic=wt, ext-wt*
- **Description**: Parameter alpha of WT KEDF (kinetic energy density functional).

### of_wt_beta

- **Type**: Real
- **Availability**: *OFDFT with of_kinetic=wt*
- **Availability**: *OFDFT with of_kinetic=wt, ext-wt*
- **Description**: Parameter beta of WT KEDF (kinetic energy density functional).

### of_extwt_kappa

- **Type**: Real
- **Availability**: *OFDFT with of_kinetic=ext-wt*
- **Description**: Parameter kappa for EXT-WT KEDF.
- **Default**: $\dfrac{1}{2(4/3)^{1/3}-1} \approx 0.832$

### of_wt_rho0

- **Type**: Real
Expand Down
3 changes: 3 additions & 0 deletions source/source_io/module_parameter/input_parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ struct Input_para
double of_vw_weight = 1.0; ///< weight of vW KEDF
double of_wt_alpha = 5. / 6.; ///< parameter alpha of WT KEDF
double of_wt_beta = 5. / 6.; ///< parameter beta of WT KEDF
double of_extwt_kappa = 1.0
/ (2.0 * std::pow(4. / 3., 1. / 3.) - 1.0);
///< parameter kappa of EXT-WT KEDF
double of_wt_rho0 = 0.0; ///< set the average density of system, in Bohr^-3
bool of_hold_rho0 = false; ///< If set to 1, the rho0 will be fixed even if the volume of
///< system has changed, it will be set to 1 automatically if
Expand Down
24 changes: 19 additions & 5 deletions source/source_io/module_parameter/read_input_item_ofdft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ void ReadInput::item_ofdft()
* vw: von Weizsacker (vW) functional
* tf+: TF + vW functional
* wt: Wang-Teter (WT) functional
* ext-wt: Extended Wang-Teter functional
* xwm: XWM functional
* lkt: Luo-Karasiev-Trickey (LKT) functional
* ml: Machine learning KEDF
Expand All @@ -37,10 +38,11 @@ void ReadInput::item_ofdft()
}
#endif
if (para.input.of_kinetic != "tf" && para.input.of_kinetic != "vw" && para.input.of_kinetic != "wt"
&& para.input.of_kinetic != "ext-wt"
&& para.input.of_kinetic != "xwm" && para.input.of_kinetic != "lkt" && para.input.of_kinetic != "tf+"
&& para.input.of_kinetic != "ml" && para.input.of_kinetic != "mpn" && para.input.of_kinetic != "cpn5")
{
ModuleBase::WARNING_QUIT("ReadInput", "of_kinetic must be tf, vw, tf+, wt, xwm, lkt, ml, mpn, or cpn5");
ModuleBase::WARNING_QUIT("ReadInput", "of_kinetic must be tf, vw, tf+, wt, ext-wt, xwm, lkt, ml, mpn, or cpn5");
}
};
item.reset_value = [](const Input_Item& item, Parameter& para) {
Expand Down Expand Up @@ -175,7 +177,7 @@ void ReadInput::item_ofdft()
item.description = "Weight of TF KEDF (kinetic energy density functional).";
item.default_value = "1.0";
item.unit = "";
item.availability = "OFDFT with of_kinetic=tf, tf+, wt, xwm";
item.availability = "OFDFT with of_kinetic=tf, tf+, wt, ext-wt, xwm";
read_sync_double(input.of_tf_weight);
this->add_item(item);
}
Expand All @@ -187,7 +189,7 @@ void ReadInput::item_ofdft()
item.description = "Weight of vW KEDF (kinetic energy density functional).";
item.default_value = "1.0";
item.unit = "";
item.availability = "OFDFT with of_kinetic=vw, tf+, wt, lkt, xwm";
item.availability = "OFDFT with of_kinetic=vw, tf+, wt, ext-wt, lkt, xwm";
read_sync_double(input.of_vw_weight);
this->add_item(item);
}
Expand All @@ -199,7 +201,7 @@ void ReadInput::item_ofdft()
item.description = "Parameter alpha of WT KEDF (kinetic energy density functional).";
item.default_value = "";
item.unit = "";
item.availability = "OFDFT with of_kinetic=wt";
item.availability = "OFDFT with of_kinetic=wt, ext-wt";
read_sync_double(input.of_wt_alpha);
this->add_item(item);
}
Expand All @@ -211,10 +213,22 @@ void ReadInput::item_ofdft()
item.description = "Parameter beta of WT KEDF (kinetic energy density functional).";
item.default_value = "";
item.unit = "";
item.availability = "OFDFT with of_kinetic=wt";
item.availability = "OFDFT with of_kinetic=wt, ext-wt";
read_sync_double(input.of_wt_beta);
this->add_item(item);
}
{
Input_Item item("of_extwt_kappa");
item.annotation = "parameter kappa of EXT-WT KEDF";
item.category = "OFDFT: orbital free density functional theory";
item.type = "Real";
item.description = "Parameter kappa for EXT-WT KEDF.";
item.default_value = "1.0 / (2.0 * std::pow(4./3., 1./3.) - 1.0)";
item.unit = "";
item.availability = "OFDFT with of_kinetic=ext-wt";
read_sync_double(input.of_extwt_kappa);
this->add_item(item);
}
{
Input_Item item("of_wt_rho0");
item.annotation = "the average density of system, used in WT KEDF, in Bohr^-3";
Expand Down
1 change: 1 addition & 0 deletions source/source_pw/module_ofdft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ list(APPEND hamilt_ofdft_srcs
kedf_tf.cpp
kedf_vw.cpp
kedf_wt.cpp
kedf_extwt.cpp
kedf_xwm.cpp
kedf_lkt.cpp
kedf_manager.cpp
Expand Down
Loading
Loading