git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14157 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -198,10 +198,11 @@ Pair *Force::pair_creator(LAMMPS *lmp)
|
||||
return ptr to Pair class if matches word or matches hybrid sub-style
|
||||
if exact, then style name must be exact match to word
|
||||
if not exact, style name must contain word
|
||||
return NULL if no match or multiple sub-styles match
|
||||
if nsub > 0, match Nth hybrid sub-style
|
||||
return NULL if no match or if nsub=0 and multiple sub-styles match
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Pair *Force::pair_match(const char *word, int exact)
|
||||
Pair *Force::pair_match(const char *word, int exact, int nsub)
|
||||
{
|
||||
int iwhich,count;
|
||||
|
||||
@ -216,6 +217,7 @@ Pair *Force::pair_match(const char *word, int exact)
|
||||
(!exact && strstr(hybrid->keywords[i],word))) {
|
||||
iwhich = i;
|
||||
count++;
|
||||
if (nsub == count) return hybrid->styles[iwhich];
|
||||
}
|
||||
if (count == 1) return hybrid->styles[iwhich];
|
||||
|
||||
@ -227,6 +229,7 @@ Pair *Force::pair_match(const char *word, int exact)
|
||||
(!exact && strstr(hybrid->keywords[i],word))) {
|
||||
iwhich = i;
|
||||
count++;
|
||||
if (nsub == count) return hybrid->styles[iwhich];
|
||||
}
|
||||
if (count == 1) return hybrid->styles[iwhich];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user