diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index 0f68219358..1276adf444 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -297,17 +297,17 @@ means all types from 1 to N. A leading asterisk means all types from (inclusive). Currently *bond* does not support bond_style hybrid nor bond_style -hybrid/overlay as bond styles. The only bonds that currently are -working with fix_adapt are +hybrid/overlay as bond styles. The bond styles that currently work +with fix_adapt are +------------------------------------+-------+-----------------+ | :doc:`class2 ` | r0 | type bonds | +------------------------------------+-------+-----------------+ -| :doc:`fene ` | k, r0 | type bonds | +| :doc:`fene ` | k,r0 | type bonds | +------------------------------------+-------+-----------------+ -| :doc:`fene/nm ` | k, r0 | type bonds | +| :doc:`fene/nm ` | k,r0 | type bonds | +------------------------------------+-------+-----------------+ -| :doc:`gromos ` | k, r0 | type bonds | +| :doc:`gromos ` | k,r0 | type bonds | +------------------------------------+-------+-----------------+ | :doc:`harmonic ` | k,r0 | type bonds | +------------------------------------+-------+-----------------+ @@ -333,12 +333,14 @@ means all types from 1 to N. A leading asterisk means all types from (inclusive). Currently *angle* does not support angle_style hybrid nor angle_style -hybrid/overlay as angle styles. The only angles that currently are -working with fix_adapt are +hybrid/overlay as angle styles. The angle styles that currently work +with fix_adapt are +------------------------------------+-------+-----------------+ | :doc:`harmonic ` | k,theta0 | type angles | +------------------------------------+-------+-----------------+ +| :doc:`cosine ` | k | type angles | ++------------------------------------+-------+-----------------+ Note that internally, theta0 is stored in radians, so the variable this fix uses to reset theta0 needs to generate values in radians. diff --git a/src/MOLECULE/angle_cosine.cpp b/src/MOLECULE/angle_cosine.cpp index d32dc4559d..260ebc3948 100644 --- a/src/MOLECULE/angle_cosine.cpp +++ b/src/MOLECULE/angle_cosine.cpp @@ -234,3 +234,14 @@ double AngleCosine::single(int type, int i1, int i2, int i3) return k[type] * (1.0 + c); } + +/* ---------------------------------------------------------------------- + return ptr to internal members upon request +------------------------------------------------------------------------ */ + +void *AngleCosine::extract(const char *str, int &dim) +{ + dim = 1; + if (strcmp(str, "k") == 0) return (void *) k; + return nullptr; +} diff --git a/src/MOLECULE/angle_cosine.h b/src/MOLECULE/angle_cosine.h index 19b6222c87..e249e7a44c 100644 --- a/src/MOLECULE/angle_cosine.h +++ b/src/MOLECULE/angle_cosine.h @@ -35,6 +35,7 @@ class AngleCosine : public Angle { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, int, int, int) override; + void *extract(const char *, int &) override; protected: double *k;