git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14789 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -389,6 +389,21 @@ Angle *Force::new_angle(const char *style, int trysuffix, int &sflag)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return ptr to current angle class or hybrid sub-class if matches style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Angle *Force::angle_match(const char *style)
|
||||
{
|
||||
if (strcmp(angle_style,style) == 0) return angle;
|
||||
else if (strcmp(angle_style,"hybrid") == 0) {
|
||||
AngleHybrid *hybrid = (AngleHybrid *) angle;
|
||||
for (int i = 0; i < hybrid->nstyles; i++)
|
||||
if (strcmp(hybrid->keywords[i],style) == 0) return hybrid->styles[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create a dihedral style, called from input script or restart file
|
||||
------------------------------------------------------------------------- */
|
||||
@ -455,6 +470,21 @@ Dihedral *Force::new_dihedral(const char *style, int trysuffix, int &sflag)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return ptr to current angle class or hybrid sub-class if matches style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Dihedral *Force::dihedral_match(const char *style)
|
||||
{
|
||||
if (strcmp(dihedral_style,style) == 0) return dihedral;
|
||||
else if (strcmp(dihedral_style,"hybrid") == 0) {
|
||||
DihedralHybrid *hybrid = (DihedralHybrid *) dihedral;
|
||||
for (int i = 0; i < hybrid->nstyles; i++)
|
||||
if (strcmp(hybrid->keywords[i],style) == 0) return hybrid->styles[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create an improper style, called from input script or restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user