ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
ModuleIO::ReadInput Class Reference

#include <read_input.h>

Collaboration diagram for ModuleIO::ReadInput:

Public Member Functions

 ReadInput (const int &rank)
 
 ~ReadInput ()
 
void clear ()
 clear all input items
 
void read_parameters (Parameter &param, const std::string &filename_in)
 read in parameters from input file
 
void create_directory (const Parameter &param)
 Create a directory for output files.
 
void write_parameters (const Parameter &param, const std::string &filename_out)
 write out parameters to output file
 

Public Attributes

bool check_ntype_flag = true
 check ntype from STRU file
 

Static Public Attributes

static bool check_mode = false
 

Private Member Functions

void read_txt_input (Parameter &param, const std::string &filename)
 read INPUT file of txt format
 
void write_txt_input (const Parameter &param, const std::string &filename)
 write INPUT file of txt format
 
int current_md_step (const std::string &file_dir)
 determine the md step in restart case
 
void check_ntype (const std::string &fn, int &param_ntype)
 count_nype from STRU file
 
void add_item (const Input_Item &item)
 add item to input list
 
void set_global_dir (const Input_para &inp, System_para &sys)
 set System_para according to input parameters INPUT and STRU need to refer to each other in ABACUS, so it is necessary to obtain the file paths related to all inputs
 
void set_globalv (const Input_para &inp, System_para &sys)
 
void item_system ()
 
void item_elec_stru ()
 
void item_lcao ()
 
void item_relax ()
 
void item_md ()
 
void item_ofdft ()
 
void item_sdft ()
 
void item_deepks ()
 
void item_rt_tddft ()
 
void item_lr_tddft ()
 
void item_output ()
 
void item_postprocess ()
 
void item_model ()
 
void item_exx ()
 
void item_dftu ()
 
void item_others ()
 

Private Attributes

int rank = 0
 rank of MPI
 
std::vector< std::pair< std::string, Input_Item > > input_lists
 
std::vector< Input_Item * > readvalue_items
 
std::vector< std::function< void(Parameter &)> > bcastfuncs
 

Constructor & Destructor Documentation

◆ ReadInput()

ModuleIO::ReadInput::ReadInput ( const int &  rank)
Here is the call graph for this function:

◆ ~ReadInput()

ModuleIO::ReadInput::~ReadInput ( )
inline

Member Function Documentation

◆ add_item()

void ModuleIO::ReadInput::add_item ( const Input_Item item)
private

add item to input list

Parameters
iteminput_item
Here is the caller graph for this function:

◆ check_ntype()

void ModuleIO::ReadInput::check_ntype ( const std::string &  fn,
int &  param_ntype 
)
private

count_nype from STRU file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void ModuleIO::ReadInput::clear ( )
inline

clear all input items

Here is the caller graph for this function:

◆ create_directory()

void ModuleIO::ReadInput::create_directory ( const Parameter param)

Create a directory for output files.

Parameters
paramparameters of ABACUS
Here is the call graph for this function:
Here is the caller graph for this function:

◆ current_md_step()

int ModuleIO::ReadInput::current_md_step ( const std::string &  file_dir)
private

determine the md step in restart case

Parameters
file_dirdirectory of Restart_md.dat
Returns
md step
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_deepks()

void ModuleIO::ReadInput::item_deepks ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_dftu()

void ModuleIO::ReadInput::item_dftu ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_elec_stru()

void ModuleIO::ReadInput::item_elec_stru ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_exx()

void ModuleIO::ReadInput::item_exx ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_lcao()

void ModuleIO::ReadInput::item_lcao ( )
private

◆ item_lr_tddft()

void ModuleIO::ReadInput::item_lr_tddft ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_md()

void ModuleIO::ReadInput::item_md ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_model()

void ModuleIO::ReadInput::item_model ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_ofdft()

void ModuleIO::ReadInput::item_ofdft ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_others()

void ModuleIO::ReadInput::item_others ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_output()

void ModuleIO::ReadInput::item_output ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_postprocess()

void ModuleIO::ReadInput::item_postprocess ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_relax()

void ModuleIO::ReadInput::item_relax ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_rt_tddft()

void ModuleIO::ReadInput::item_rt_tddft ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_sdft()

void ModuleIO::ReadInput::item_sdft ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_system()

void ModuleIO::ReadInput::item_system ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_parameters()

void ModuleIO::ReadInput::read_parameters ( Parameter param,
const std::string &  filename_in 
)

read in parameters from input file

Parameters
paramparameters of ABACUS
filename_inread INPUT file name
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_txt_input()

void ModuleIO::ReadInput::read_txt_input ( Parameter param,
const std::string &  filename 
)
private

read INPUT file of txt format

Parameters
paramparameters of ABACUS
filenameINPUT
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_global_dir()

void ModuleIO::ReadInput::set_global_dir ( const Input_para inp,
System_para sys 
)
private

set System_para according to input parameters INPUT and STRU need to refer to each other in ABACUS, so it is necessary to obtain the file paths related to all inputs

Note
Here para.inp has not been synchronized of all ranks. Only para.inp in rank 0 is right. So we need to broadcast the results to all ranks.

caculate the global output directory

get the global output directory

get the global output directory

get the global output directory

get the global ML KEDF descriptor directory

get the global directory for DeePKS labels during electronic steps

get the global readin directory

get the stru file for md restart case

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_globalv()

void ModuleIO::ReadInput::set_globalv ( const Input_para inp,
System_para sys 
)
private
Note
Here para.inp has been synchronized of all ranks. All para.inp have the same value.

caculate the gamma_only_pw and gamma_only_local

set deepks_setorb

set the noncolin and lspinorb from nspin

set ncx,ncy,ncz

set ks_run

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_parameters()

void ModuleIO::ReadInput::write_parameters ( const Parameter param,
const std::string &  filename_out 
)

write out parameters to output file

Parameters
paramparameters of ABACUS
filename_outwrite output file name
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_txt_input()

void ModuleIO::ReadInput::write_txt_input ( const Parameter param,
const std::string &  filename 
)
private

write INPUT file of txt format

Parameters
paramparameters of ABACUS
filenameoutput file name
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bcastfuncs

std::vector<std::function<void(Parameter&)> > ModuleIO::ReadInput::bcastfuncs
private

◆ check_mode

bool ModuleIO::ReadInput::check_mode = false
static

◆ check_ntype_flag

bool ModuleIO::ReadInput::check_ntype_flag = true

check ntype from STRU file

◆ input_lists

std::vector<std::pair<std::string, Input_Item> > ModuleIO::ReadInput::input_lists
private

◆ rank

int ModuleIO::ReadInput::rank = 0
private

rank of MPI

◆ readvalue_items

std::vector<Input_Item*> ModuleIO::ReadInput::readvalue_items
private

The documentation for this class was generated from the following files: