implement extract in improper harmonic
This commit is contained in:
committed by
GitHub
parent
dda23a20b7
commit
a2508fef13
@ -276,3 +276,15 @@ void ImproperHarmonic::write_data(FILE *fp)
|
||||
for (int i = 1; i <= atom->nimpropertypes; i++)
|
||||
fprintf(fp, "%d %g %g\n", i, k[i], RAD2DEG * chi[i]);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return ptr to internal members upon request
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
void *ImproperHarmonic::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