git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7137 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2011-10-20 14:24:16 +00:00
parent f90ce18f3d
commit ae247d982a
1 changed files with 12 additions and 6 deletions

View File

@ -195,10 +195,11 @@ void PairHybrid::settings(int narg, char **arg)
allocated = 0;
// count sub-styles by skipping numeric args
// exception is 1st arg of style "table", which is non-numeric word
// exception is 1st two args of style "lj/coul", which are non-numeric
// exception is 1st two args of style "buck/coul", which are non-numeric
// exception is 1st arg of table style, which is non-numeric word
// exception is 1st two args of lj/coul style, which are non-numeric
// exception is 1st two args of buck/coul, which are non-numeric
// exception is 1st arg of reax/c style, which is non-numeric
// execption is 1st 6 args of gran styles, which can have NULLs
// need a better way to skip these exceptions
nstyles = 0;
@ -208,6 +209,8 @@ void PairHybrid::settings(int narg, char **arg)
if (strcmp(arg[i],"lj/coul") == 0) i += 2;
if (strcmp(arg[i],"buck/coul") == 0) i += 2;
if (strcmp(arg[i],"reax/c") == 0) i++;
if (strstr(arg[i],"gran/hooke")) i += 6;
if (strstr(arg[i],"gran/hertz")) i += 6;
i++;
while (i < narg && !isalpha(arg[i][0])) i++;
nstyles++;
@ -220,10 +223,11 @@ void PairHybrid::settings(int narg, char **arg)
// allocate each sub-style and call its settings() with subset of args
// define subset of args for a sub-style by skipping numeric args
// exception is 1st arg of style "table", which is non-numeric
// exception is 1st two args of style "lj/coul", which are non-numeric
// exception is 1st two args of style "buck/coul", which are non-numeric
// exception is 1st arg of table style, which is non-numeric word
// exception is 1st two args of lj/coul style, which are non-numeric
// exception is 1st two args of buck/coul, which are non-numeric
// exception is 1st arg of reax/c style, which is non-numeric
// execption is 1st 6 args of gran styles, which can have NULLs
// need a better way to skip these exceptions
int dummy;
@ -246,6 +250,8 @@ void PairHybrid::settings(int narg, char **arg)
if (strcmp(arg[i],"lj/coul") == 0) i += 2;
if (strcmp(arg[i],"buck/coul") == 0) i += 2;
if (strcmp(arg[i],"reax/c") == 0) i++;
if (strstr(arg[i],"gran/hooke")) i += 6;
if (strstr(arg[i],"gran/hertz")) i += 6;
i++;
while (i < narg && !isalpha(arg[i][0])) i++;
styles[nstyles]->settings(i-istyle-1,&arg[istyle+1]);