diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index c23d694275a3d5d08e8e242cc2d13877c6918d66..206782be2715d7b293c71f1f86a597ddf009ea7e 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -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]);