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

This commit is contained in:
sjplimp
2014-04-11 20:23:51 +00:00
parent d4518d2fd1
commit 8871abb708
5 changed files with 88 additions and 4 deletions

View File

@ -485,6 +485,21 @@ Improper *Force::new_improper(const char *style, const char *suffix, int &sflag)
return NULL;
}
/* ----------------------------------------------------------------------
return ptr to current improper class or hybrid sub-class if matches style
------------------------------------------------------------------------- */
Improper *Force::improper_match(const char *style)
{
if (strcmp(improper_style,style) == 0) return improper;
else if (strcmp(improper_style,"hybrid") == 0) {
ImproperHybrid *hybrid = (ImproperHybrid *) bond;
for (int i = 0; i < hybrid->nstyles; i++)
if (strcmp(hybrid->keywords[i],style) == 0) return hybrid->styles[i];
}
return NULL;
}
/* ----------------------------------------------------------------------
new kspace style
------------------------------------------------------------------------- */