Skip to content

Commit aa7a4d9

Browse files
committed
add parameters used in rdmft in input_parameters.h and so on
1 parent 16c4b8b commit aa7a4d9

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@
428428
- [abs\_broadening](#abs_broadening)
429429
- [ri\_hartree\_benchmark](#ri_hartree_benchmark)
430430
- [aims_nbasis](#aims_nbasis)
431+
- [Reduced Density Matrix Functional Theory](#Reduced-Density-Matrix-Functional-Theory)
432+
- [ab\_initio\_type](#ab_initio_type)
433+
- [rdmft\_power\_alpha](#rdmft_power_alpha)
431434

432435
[back to top](#full-list-of-input-keywords)
433436
## System variables
@@ -3999,4 +4002,20 @@ The output files are `OUT.${suffix}/Excitation_Energy.dat` and `OUT.${suffix}/Ex
39994002
- **Description**: Atomic basis set size for each atom type (with the same order as in `STRU`) in FHI-aims.
40004003
- **Default**: {} (empty list, where ABACUS use its own basis set size)
40014004

4005+
## Reduced Density Matrix Functional Theory
4006+
4007+
ab-initio methods and the xc-functional parameters used in RDMFT.
4008+
4009+
### ab_initio_type
4010+
4011+
- **Type**: String
4012+
- **Description**: Determine the ab-initio method, ksdft or rdmft (reduced density matrix funcional theory)
4013+
- **Default**: ksdft
4014+
4015+
### rdmft_power_alpha
4016+
4017+
- **Type**: Real
4018+
- **Description**: The alpha parameter of power-functional(or other exx-type/hybrid functionals) which used in RDMFT, g(occ_number) = occ_number^alpha
4019+
- **Default**: 0.656
4020+
40024021
[back to top](#full-list-of-input-keywords)

source/module_io/read_input_item_other.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,5 +493,37 @@ void ReadInput::item_others()
493493
sync_intvec(input.aims_nbasis, para.input.aims_nbasis.size(), 0);
494494
this->add_item(item);
495495
}
496+
497+
// RDMFT, added by jghan, 2024-10-16
498+
{
499+
Input_Item item("ab_initio_type");
500+
item.annotation = "rdmft (reduced density matrix funcional theory) or ksdft, default is ksdft";
501+
read_sync_string(input.ab_initio_type);
502+
this->add_item(item);
503+
}
504+
{
505+
Input_Item item("rdmft_power_alpha");
506+
item.annotation = "the alpha parameter of power-functional, g(occ_number) = occ_number^alpha"
507+
"used in exx-type functionals such as muller and power";
508+
read_sync_double(input.rdmft_power_alpha);
509+
item.reset_value = [](const Input_Item& item, Parameter& para) {
510+
if( para.input.dft_functional == "hf" )
511+
{
512+
para.input.rdmft_power_alpha = 1.0;
513+
}
514+
else if( para.input.dft_functional == "muller" )
515+
{
516+
para.input.rdmft_power_alpha = 0.5;
517+
}
518+
};
519+
item.check_value = [](const Input_Item& item, const Parameter& para) {
520+
if( (para.input.rdmft_power_alpha < 0) || (para.input.rdmft_power_alpha > 1) )
521+
{
522+
ModuleBase::WARNING_QUIT("ReadInput", "rdmft_power_alpha should be greater than 0.0 and less than 1.0");
523+
}
524+
};
525+
this->add_item(item);
526+
}
527+
496528
}
497529
} // namespace ModuleIO

source/module_io/test/read_input_ptest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ TEST_F(InputParaTest, ParaRead)
420420
EXPECT_EQ(param.inp.abs_wavelen_range.size(), 2);
421421
EXPECT_DOUBLE_EQ(param.inp.abs_wavelen_range[0], 0.0);
422422
EXPECT_DOUBLE_EQ(param.inp.abs_broadening, 0.01);
423+
EXPECT_EQ(param.inp.ab_initio_type, "rdmft");
424+
EXPECT_DOUBLE_EQ(param.inp.rdmft_power_alpha, 0.656);
423425
}
424426

425427
TEST_F(InputParaTest, Check)

source/module_parameter/input_parameter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ struct Input_para
587587
// ============== #Parameters (21.RDMFT) =====================
588588
// RDMFT jghan added on 2024-07-06
589589
std::string ab_initio_type = "ksdft"; // "rdmft", reduced density matrix funcional theory
590-
double rdmft_power_alpha = 1.0; // the alpha parameter of power-functional, g(occ_number) = occ_number^alpha
590+
double rdmft_power_alpha = 0.656; // the alpha parameter of power-functional, g(occ_number) = occ_number^alpha
591591
// double rdmft_wp22_omega; // the omega parameter of wp22-functional = exx_hse_omega
592592

593593
};

0 commit comments

Comments
 (0)