forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12315 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
b05729b908
commit
18a1c57b56
|
@ -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++;
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue