diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp index 1780c4344e..8b638286fa 100644 --- a/src/angle_hybrid.cpp +++ b/src/angle_hybrid.cpp @@ -204,11 +204,13 @@ void AngleHybrid::settings(int narg, char **arg) keywords = new char*[nstyles]; // allocate each sub-style and call its settings() with subset of args + // allocate uses suffix, but don't store suffix version in keywords, + // else syntax in coeff() will not match // define subset of args for a sub-style by skipping numeric args // one exception is 1st arg of style "table", which is non-numeric // need a better way to skip these exceptions - int sflag; + int dummy; nstyles = 0; i = 0; @@ -222,8 +224,8 @@ void AngleHybrid::settings(int narg, char **arg) if (strcmp(arg[i],"none") == 0) error->all(FLERR,"Angle style hybrid cannot have none as an argument"); - styles[nstyles] = force->new_angle(arg[i],1,sflag); - force->store_style(keywords[nstyles],arg[i],sflag); + styles[nstyles] = force->new_angle(arg[i],1,dummy); + force->store_style(keywords[nstyles],arg[i],0); istyle = i; if (strcmp(arg[i],"table") == 0) i++; diff --git a/src/bond_hybrid.cpp b/src/bond_hybrid.cpp index 63357a12e5..1137035ea8 100644 --- a/src/bond_hybrid.cpp +++ b/src/bond_hybrid.cpp @@ -203,11 +203,13 @@ void BondHybrid::settings(int narg, char **arg) keywords = new char*[nstyles]; // allocate each sub-style and call its settings() with subset of args + // allocate uses suffix, but don't store suffix version in keywords, + // else syntax in coeff() will not match // define subset of args for a sub-style by skipping numeric args // one exception is 1st arg of style "table", which is non-numeric // need a better way to skip these exceptions - int sflag; + int dummy; nstyles = 0; i = 0; @@ -220,8 +222,8 @@ void BondHybrid::settings(int narg, char **arg) if (strcmp(arg[i],"none") == 0) error->all(FLERR,"Bond style hybrid cannot have none as an argument"); - styles[nstyles] = force->new_bond(arg[i],1,sflag); - force->store_style(keywords[nstyles],arg[i],sflag); + styles[nstyles] = force->new_bond(arg[i],1,dummy); + force->store_style(keywords[nstyles],arg[i],0); istyle = i; if (strcmp(arg[i],"table") == 0) i++; diff --git a/src/dihedral_hybrid.cpp b/src/dihedral_hybrid.cpp index 6f8ef5a093..72c0c0510a 100644 --- a/src/dihedral_hybrid.cpp +++ b/src/dihedral_hybrid.cpp @@ -205,11 +205,13 @@ void DihedralHybrid::settings(int narg, char **arg) keywords = new char*[nstyles]; // allocate each sub-style and call its settings() with subset of args + // allocate uses suffix, but don't store suffix version in keywords, + // else syntax in coeff() will not match // define subset of args for a sub-style by skipping numeric args // one exception is 1st arg of style "table", which is non-numeric // need a better way to skip these exceptions - int sflag; + int dummy; nstyles = 0; i = 0; @@ -224,8 +226,8 @@ void DihedralHybrid::settings(int narg, char **arg) if (strcmp(arg[i],"none") == 0) error->all(FLERR,"Dihedral style hybrid cannot have none as an argument"); - styles[nstyles] = force->new_dihedral(arg[i],1,sflag); - force->store_style(keywords[nstyles],arg[i],sflag); + styles[nstyles] = force->new_dihedral(arg[i],1,dummy); + force->store_style(keywords[nstyles],arg[i],0); istyle = i; if (strcmp(arg[i],"table") == 0) i++; diff --git a/src/improper_hybrid.cpp b/src/improper_hybrid.cpp index 09e73ac9b5..140bd2e9dc 100644 --- a/src/improper_hybrid.cpp +++ b/src/improper_hybrid.cpp @@ -205,11 +205,13 @@ void ImproperHybrid::settings(int narg, char **arg) keywords = new char*[nstyles]; // allocate each sub-style and call its settings() with subset of args + // allocate uses suffix, but don't store suffix version in keywords, + // else syntax in coeff() will not match // define subset of args for a sub-style by skipping numeric args // one exception is 1st arg of style "table", which is non-numeric // need a better way to skip these exceptions - int sflag; + int dummy; nstyles = 0; i = 0; @@ -224,8 +226,8 @@ void ImproperHybrid::settings(int narg, char **arg) if (strcmp(arg[i],"none") == 0) error->all(FLERR,"Improper style hybrid cannot have none as an argument"); - styles[nstyles] = force->new_improper(arg[i],1,sflag); - force->store_style(keywords[nstyles],arg[i],sflag); + styles[nstyles] = force->new_improper(arg[i],1,dummy); + force->store_style(keywords[nstyles],arg[i],0); istyle = i; if (strcmp(arg[i],"table") == 0) i++; diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 15de14db13..291449a4db 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -216,10 +216,12 @@ void PairHybrid::settings(int narg, char **arg) multiple = new int[narg]; // allocate each sub-style + // allocate uses suffix, but don't store suffix version in keywords, + // else syntax in coeff() will not match // call settings() with set of args that are not pair style names // use force->pair_map to determine which args these are - int iarg,jarg,sflag; + int iarg,jarg,dummy; iarg = 0; nstyles = 0; @@ -229,8 +231,8 @@ void PairHybrid::settings(int narg, char **arg) if (strcmp(arg[iarg],"none") == 0) error->all(FLERR,"Pair style hybrid cannot have none as an argument"); - styles[nstyles] = force->new_pair(arg[iarg],1,sflag); - force->store_style(keywords[nstyles],arg[iarg],sflag); + styles[nstyles] = force->new_pair(arg[iarg],1,dummy); + force->store_style(keywords[nstyles],arg[iarg],0); jarg = iarg + 1; while (jarg < narg && !force->pair_map->count(arg[jarg])) jarg++;