implement extract in improper_fourier.cpp
This commit is contained in:
committed by
GitHub
parent
2a2a7a3113
commit
e954bdfc14
@ -337,3 +337,17 @@ void ImproperFourier::write_data(FILE *fp)
|
||||
for (int i = 1; i <= atom->nimpropertypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g %d\n",i,k[i],C0[i],C1[i],C2[i],all[i]);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return ptr to internal members upon request
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
void *ImproperFourier::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str, "k") == 0) return (void *) k;
|
||||
if (strcmp(str, "C0") == 0) return (void *) C0;
|
||||
if (strcmp(str, "C1") == 0) return (void *) C1;
|
||||
if (strcmp(str, "C2") == 0) return (void *) C2;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user