implement extract for improper distance
This commit is contained in:
committed by
GitHub
parent
60181e2a8a
commit
52457d6c1e
@ -268,3 +268,16 @@ void ImproperDistance::write_data(FILE *fp)
|
||||
for (int i = 1; i <= atom->nimpropertypes; i++)
|
||||
fprintf(fp,"%d %g %g\n",i,k[i],chi[i]);
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return ptr to internal members upon request
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
void *ImproperDistance::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str, "k") == 0) return (void *) k;
|
||||
if (strcmp(str, "chi") == 0) return (void *) chi;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user