We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ba9361 commit 0463de3Copy full SHA for 0463de3
source/module_io/input.cpp
@@ -2078,7 +2078,11 @@ bool Input::Read(const std::string &fn)
2078
// sunliang added on 2022-12-06
2079
// To check if ntype in INPUT is equal to the atom species in STRU, if ntype is not set in INPUT, we will set it
2080
// according to STRU.
2081
- double ntype_stru = this->count_ntype(GlobalV::stru_file);
+ if(this->stru_file == "")
2082
+ {
2083
+ this->stru_file="STRU";
2084
+ }
2085
+ double ntype_stru = this->count_ntype(this->stru_file);
2086
if (this->ntype == 0)
2087
{
2088
this->ntype = ntype_stru;
0 commit comments