diff --git a/src/EXTRA-PAIR/pair_e3b.cpp b/src/EXTRA-PAIR/pair_e3b.cpp index a6f0e218bb..cc81cee03f 100644 --- a/src/EXTRA-PAIR/pair_e3b.cpp +++ b/src/EXTRA-PAIR/pair_e3b.cpp @@ -388,7 +388,7 @@ void PairE3B::coeff(int narg, char **arg) if (narg < 4) error->all(FLERR, "There must be at least one keyword given to pair_coeff"); if (typeO_str.size() > 0) - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); // clear setflag since coeff() called once with I,J = * * int n = atom->ntypes; diff --git a/src/FEP/pair_lj_cut_tip4p_long_soft.cpp b/src/FEP/pair_lj_cut_tip4p_long_soft.cpp index 8309939227..3cd444d685 100644 --- a/src/FEP/pair_lj_cut_tip4p_long_soft.cpp +++ b/src/FEP/pair_lj_cut_tip4p_long_soft.cpp @@ -441,10 +441,10 @@ void PairLJCutTIP4PLongSoft::coeff(int narg, char **arg) // and the types are already set and the strings are empty. if (typeO_str.size() > 0) { - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); - typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1); - typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1); - typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); + typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true); + typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true); + typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true); } PairLJCutCoulLongSoft::coeff(narg, arg); diff --git a/src/FEP/pair_tip4p_long_soft.cpp b/src/FEP/pair_tip4p_long_soft.cpp index 35e2972898..525112fc89 100644 --- a/src/FEP/pair_tip4p_long_soft.cpp +++ b/src/FEP/pair_tip4p_long_soft.cpp @@ -398,10 +398,10 @@ void PairTIP4PLongSoft::coeff(int narg, char **arg) // and the types are already set and the strings are empty. if (typeO_str.size() > 0) { - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); - typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1); - typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1); - typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); + typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true); + typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true); + typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true); } PairCoulLongSoft::coeff(narg, arg); diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index f72e8c42f8..2420ab9c3d 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -455,10 +455,10 @@ void PairLJCutTIP4PLong::coeff(int narg, char **arg) // and the types are already set and the strings are empty. if (typeO_str.size() > 0) { - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); - typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1); - typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1); - typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); + typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true); + typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true); + typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true); } PairLJCutCoulLong::coeff(narg, arg); diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index fe3671f21b..de561156a3 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -1472,10 +1472,10 @@ void PairLJLongTIP4PLong::coeff(int narg, char **arg) // and the types are already set and the strings are empty. if (typeO_str.size() > 0) { - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); - typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1); - typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1); - typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); + typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true); + typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true); + typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true); } PairLJLongCoulLong::coeff(narg, arg); diff --git a/src/KSPACE/pair_tip4p_long.cpp b/src/KSPACE/pair_tip4p_long.cpp index cd2b1f6af3..0608968fdf 100644 --- a/src/KSPACE/pair_tip4p_long.cpp +++ b/src/KSPACE/pair_tip4p_long.cpp @@ -411,10 +411,10 @@ void PairTIP4PLong::coeff(int narg, char **arg) // and the types are already set and the strings are empty. if (typeO_str.size() > 0) { - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); - typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1); - typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1); - typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); + typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true); + typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true); + typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true); } PairCoulLong::coeff(narg, arg); diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index f4ddad5f70..b8946b67f4 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -465,10 +465,10 @@ void PairLJCutTIP4PCut::coeff(int narg, char **arg) // and the types are already set and the strings are empty. if (typeO_str.size() > 0) { - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); - typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1); - typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1); - typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); + typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true); + typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true); + typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true); } int ilo,ihi,jlo,jhi; diff --git a/src/MOLECULE/pair_tip4p_cut.cpp b/src/MOLECULE/pair_tip4p_cut.cpp index f8bced69af..c914cb0ec0 100644 --- a/src/MOLECULE/pair_tip4p_cut.cpp +++ b/src/MOLECULE/pair_tip4p_cut.cpp @@ -400,10 +400,10 @@ void PairTIP4PCut::coeff(int narg, char **arg) // and the types are already set and the strings are empty. if (typeO_str.size() > 0) { - typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1); - typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1); - typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1); - typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1); + typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true); + typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true); + typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true); + typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true); } int ilo,ihi,jlo,jhi; diff --git a/src/utils.cpp b/src/utils.cpp index cbf2a23ae1..dc6ee459a7 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1000,7 +1000,7 @@ char *utils::expand_type(const char *file, int line, const std::string &str, int ------------------------------------------------------------------------- */ int utils::expand_type_int(const char *file, int line, const std::string &str, int mode, - LAMMPS *lmp, int verify) + LAMMPS *lmp, bool verify) { char *typestr = expand_type(file, line, str, mode, lmp); int type = inumeric(file, line, typestr ? typestr : str, false, lmp); diff --git a/src/utils.h b/src/utils.h index b7ceca4eb0..329479da97 100644 --- a/src/utils.h +++ b/src/utils.h @@ -409,7 +409,7 @@ This functions adds the following case to :cpp:func:`utils::bounds()