Merge remote-tracking branch 'origin/master' into refactor-table-reading
This commit is contained in:
@ -185,12 +185,9 @@ void Force::init()
|
||||
|
||||
// check if pair style must be specified after restart
|
||||
if (pair_restart) {
|
||||
if (!pair) {
|
||||
char msg[128];
|
||||
snprintf(msg,128,"Must re-specify non-restarted pair style (%s) "
|
||||
"after read_restart", pair_restart);
|
||||
error->all(FLERR,msg);
|
||||
}
|
||||
if (!pair)
|
||||
error->all(FLERR,fmt::format("Must re-specify non-restarted pair style "
|
||||
"({}) after read_restart", pair_restart));
|
||||
}
|
||||
|
||||
if (kspace) kspace->init(); // kspace must come before pair
|
||||
@ -284,7 +281,7 @@ Pair *Force::new_pair(const char *style, int trysuffix, int &sflag)
|
||||
return pair_creator(lmp);
|
||||
}
|
||||
|
||||
error->all(FLERR,utils::check_packages_for_style("pair",style,lmp).c_str());
|
||||
error->all(FLERR,utils::check_packages_for_style("pair",style,lmp));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -397,7 +394,7 @@ Bond *Force::new_bond(const char *style, int trysuffix, int &sflag)
|
||||
return bond_creator(lmp);
|
||||
}
|
||||
|
||||
error->all(FLERR,utils::check_packages_for_style("bond",style,lmp).c_str());
|
||||
error->all(FLERR,utils::check_packages_for_style("bond",style,lmp));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -476,7 +473,7 @@ Angle *Force::new_angle(const char *style, int trysuffix, int &sflag)
|
||||
return angle_creator(lmp);
|
||||
}
|
||||
|
||||
error->all(FLERR,utils::check_packages_for_style("angle",style,lmp).c_str());
|
||||
error->all(FLERR,utils::check_packages_for_style("angle",style,lmp));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -556,7 +553,7 @@ Dihedral *Force::new_dihedral(const char *style, int trysuffix, int &sflag)
|
||||
return dihedral_creator(lmp);
|
||||
}
|
||||
|
||||
error->all(FLERR,utils::check_packages_for_style("dihedral",style,lmp).c_str());
|
||||
error->all(FLERR,utils::check_packages_for_style("dihedral",style,lmp));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -635,7 +632,7 @@ Improper *Force::new_improper(const char *style, int trysuffix, int &sflag)
|
||||
return improper_creator(lmp);
|
||||
}
|
||||
|
||||
error->all(FLERR,utils::check_packages_for_style("improper",style,lmp).c_str());
|
||||
error->all(FLERR,utils::check_packages_for_style("improper",style,lmp));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -718,7 +715,7 @@ KSpace *Force::new_kspace(const char *style, int trysuffix, int &sflag)
|
||||
return kspace_creator(lmp);
|
||||
}
|
||||
|
||||
error->all(FLERR,utils::check_packages_for_style("kspace",style,lmp).c_str());
|
||||
error->all(FLERR,utils::check_packages_for_style("kspace",style,lmp));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -947,9 +944,8 @@ double Force::numeric(const char *file, int line, char *str)
|
||||
if (isdigit(str[i])) continue;
|
||||
if (str[i] == '-' || str[i] == '+' || str[i] == '.') continue;
|
||||
if (str[i] == 'e' || str[i] == 'E') continue;
|
||||
std::string msg = fmt::format("Expected floating point parameter "
|
||||
"instead of '{}' in input script or data file",str);
|
||||
error->all(file,line,msg.c_str());
|
||||
error->all(file,line,fmt::format("Expected floating point parameter "
|
||||
"instead of '{}' in input script or data file",str));
|
||||
}
|
||||
|
||||
return atof(str);
|
||||
@ -972,9 +968,8 @@ int Force::inumeric(const char *file, int line, char *str)
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (isdigit(str[i]) || str[i] == '-' || str[i] == '+') continue;
|
||||
std::string msg = fmt::format("Expected integer parameter instead "
|
||||
"of '{}' in input script or data file",str);
|
||||
error->all(file,line,msg.c_str());
|
||||
error->all(file,line,fmt::format("Expected integer parameter instead "
|
||||
"of '{}' in input script or data file",str));
|
||||
}
|
||||
|
||||
return atoi(str);
|
||||
@ -997,9 +992,8 @@ bigint Force::bnumeric(const char *file, int line, char *str)
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (isdigit(str[i]) || str[i] == '-' || str[i] == '+') continue;
|
||||
std::string msg = fmt::format("Expected integer parameter instead "
|
||||
"of '{}' in input script or data file",str);
|
||||
error->all(file,line,msg.c_str());
|
||||
error->all(file,line,fmt::format("Expected integer parameter instead "
|
||||
"of '{}' in input script or data file",str));
|
||||
}
|
||||
|
||||
return ATOBIGINT(str);
|
||||
@ -1022,9 +1016,8 @@ tagint Force::tnumeric(const char *file, int line, char *str)
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (isdigit(str[i]) || str[i] == '-' || str[i] == '+') continue;
|
||||
std::string msg = fmt::format("Expected integer parameter instead "
|
||||
"of '{}' in input script or data file",str);
|
||||
error->all(file,line,msg.c_str());
|
||||
error->all(file,line,fmt::format("Expected integer parameter instead "
|
||||
"of '{}' in input script or data file",str));
|
||||
}
|
||||
|
||||
return ATOTAGINT(str);
|
||||
|
||||
Reference in New Issue
Block a user