From ae247d982aec3bc859224055c27196455f3bd25c Mon Sep 17 00:00:00 2001 From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa> Date: Thu, 20 Oct 2011 14:24:16 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7137 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/pair_hybrid.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index c23d694275..206782be27 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]); -- GitLab