ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
parameter.h
Go to the documentation of this file.
1#ifndef PARAMETER_H
2#define PARAMETER_H
3#include "input_parameter.h"
4#include "system_parameter.h"
5namespace ModuleIO
6{
7 class ReadInput;
8}
9
10class CalAtomInfo;
11
13{
14 public:
15 // Construct a new Parameter object
17 // Destruct the Parameter object
19
20 public:
21 // ---------------------------------------------------------------
22 // -------------- Getters ----------------
23 // ---------------------------------------------------------------
24
25 // We can only read the value of input, but cannot modify it.
27 // We can only read the value of mdp, but cannot modify it.
28 const MD_para& mdp = input.mdp;
29 // We can only read the value of globalv parameters, but cannot modify it.
31
32 // Set the rank & nproc & nthreads_per_proc
33 // changed from set_rank_nproc in 2024-1018
34 void set_pal_param(const int& myrank, const int& nproc, const int& nthread_per_proc);
35 // Set the start time
36 void set_start_time(const std::time_t& start_time);
37 private:
38 // Only ReadInput and CalAtomInfo can modify the value of Parameter.
39 // Do not add extra friend class here!!!
40 friend class ModuleIO::ReadInput; // ReadInput read INPUT file and give the value to Parameter
41 friend class CalAtomsInfo; // CalAtomInfo calculate the atom information from pseudopotential and give the value to
42 // Parameter
43
44 // INPUT parameters
46 // System parameters
48};
49
50extern Parameter PARAM;
51
52// temperarily put here
53namespace GlobalV
54{
55 extern int NPROC;
56 extern int MY_RANK;
57 extern std::ofstream ofs_running;
58 extern std::ofstream ofs_warning;
59} // namespace GlobalV
60#endif
Definition cal_atoms_info.h:6
Definition read_input.h:12
Definition parameter.h:13
Input_para input
Definition parameter.h:45
const Input_para & inp
Definition parameter.h:26
Parameter()
Definition parameter.h:16
~Parameter()
Definition parameter.h:18
const MD_para & mdp
Definition parameter.h:28
void set_pal_param(const int &myrank, const int &nproc, const int &nthread_per_proc)
Definition parameter.cpp:6
System_para sys
Definition parameter.h:47
const System_para & globalv
Definition parameter.h:30
void set_start_time(const std::time_t &start_time)
Definition parameter.cpp:13
Definition global_variable.cpp:14
int NPROC
global number of process
Definition global_variable.cpp:19
int MY_RANK
global index of process
Definition global_variable.cpp:21
std::ofstream ofs_running
Definition global_variable.cpp:38
std::ofstream ofs_warning
Definition global_variable.cpp:39
This class has two functions: restart psi from the previous calculation, and write psi to the disk.
Definition cal_dos.h:9
Parameter PARAM
Definition parameter.cpp:3
Definition input_parameter.h:12
MD_para mdp
Definition input_parameter.h:175
input parameters used in md
Definition md_parameter.h:12
Definition system_parameter.h:7