forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 194
Closed
Labels
Feature DiscussedThe features will be discussed first but will not be implemented soonThe features will be discussed first but will not be implemented soon
Description
Background
Currently, ABACUS set the default value of a parameter twice:
this->Default(); // before reading all parameters, set a fixed default value
bool success = this->Read(fn);
this->Default_2(); // after reading all parameters, force changing the value
Such logic cannot support a "flexible default value" like this:
- Usually, the default value of symmetry is 1.
- If calculation=nscf/istate/ienvelope, the default value of
symmetryshould be 0. - However, if it is set by user to 1, the final value should be 1.
That is, if read in, set by user; if not read in, set the default value depending on some other parameters.
Current Solution
Set a string-type variable to "default", if(=="default”)modify it in Default_2(), then use stod, stoi... to convert it later.
Future Solution
There may be a common and user-friendly (int-is-int, double-is-double) solution rather than using string with stoi/stod.
Since most of such parameters are exx-related, I will discuss it with @PeizeLin ;-)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Feature DiscussedThe features will be discussed first but will not be implemented soonThe features will be discussed first but will not be implemented soon