From c472f38f5fff8731963a9a19930ba2e87efa4220 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:44:54 +0200 Subject: [PATCH 01/13] Update bond_morse.h --- src/MOLECULE/bond_morse.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_morse.h b/src/MOLECULE/bond_morse.h index 030a94a8da..cbab0aed1d 100644 --- a/src/MOLECULE/bond_morse.h +++ b/src/MOLECULE/bond_morse.h @@ -35,6 +35,7 @@ class BondMorse : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); + virtual void *extract(char *, int &); protected: double *d0,*alpha,*r0; From 494750b426957c092d7e0f42e43793b21333ca54 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:46:52 +0200 Subject: [PATCH 02/13] Update bond_morse.cpp --- src/MOLECULE/bond_morse.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/MOLECULE/bond_morse.cpp b/src/MOLECULE/bond_morse.cpp index 249f92928f..562d21c50d 100644 --- a/src/MOLECULE/bond_morse.cpp +++ b/src/MOLECULE/bond_morse.cpp @@ -205,3 +205,12 @@ double BondMorse::single(int type, double rsq, int /*i*/, int /*j*/, if (r > 0.0) fforce = -2.0*d0[type]*alpha[type]*(1-ralpha)*ralpha/r; return d0[type]*(1-ralpha)*(1-ralpha); } + +/* ---------------------------------------------------------------------- */ + +void *BondMorse::extract(char *str, int &dim ) +{ + dim = 1; + if (strcmp(str,"r0")==0) return (void*) r0; + return NULL; +} From 566e110e422305d29bcf080434f0761cc6c5c225 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:48:13 +0200 Subject: [PATCH 03/13] Update bond_class2.h --- src/CLASS2/bond_class2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CLASS2/bond_class2.h b/src/CLASS2/bond_class2.h index f0fcc6825e..fb7eb884df 100644 --- a/src/CLASS2/bond_class2.h +++ b/src/CLASS2/bond_class2.h @@ -35,6 +35,7 @@ class BondClass2 : public Bond { virtual void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); + virtual void *extract(char *, int &); protected: double *r0,*k2,*k3,*k4; From 5bc7a24479fe7614348979fde60f6ae6da200a91 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:49:04 +0200 Subject: [PATCH 04/13] Update bond_class2.cpp --- src/CLASS2/bond_class2.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index 0651db75fb..bdec6553b9 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -220,3 +220,12 @@ double BondClass2::single(int type, double rsq, int /*i*/, int /*j*/, double &ff else fforce = 0.0; return (k2[type]*dr2 + k3[type]*dr3 + k4[type]*dr4); } + +/* ---------------------------------------------------------------------- */ + +void *BondClass2::extract( char *str, int &dim ) +{ + dim = 1; + if (strcmp(str,"r0")==0) return (void*) r0; + return NULL; +} From bd7deebca2ad465b4b7d311373919e6227684c5d Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:50:32 +0200 Subject: [PATCH 05/13] Update bond_fene.h --- src/MOLECULE/bond_fene.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_fene.h b/src/MOLECULE/bond_fene.h index 1963e3ca22..77c7db1200 100644 --- a/src/MOLECULE/bond_fene.h +++ b/src/MOLECULE/bond_fene.h @@ -36,6 +36,7 @@ class BondFENE : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); + virtual void *extract(char *, int &); protected: double TWO_1_3; From 9446f8f780a691148d5e1093f3b253337bac5110 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:51:23 +0200 Subject: [PATCH 06/13] Update bond_fene.cpp --- src/MOLECULE/bond_fene.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index b8e197a344..239204dac6 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -272,3 +272,13 @@ double BondFENE::single(int type, double rsq, int /*i*/, int /*j*/, return eng; } + +/* ---------------------------------------------------------------------- */ + +void *BondFENE::extract( char *str, int &dim ) +{ + dim = 1; + if (strcmp(str,"kappa")==0) return (void*) k; + if (strcmp(str,"r0")==0) return (void*) r0; + return NULL; +} From d0c1b7ea08018884b19f8a0d9d43b23a3d33d265 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:52:41 +0200 Subject: [PATCH 07/13] Update bond_nonlinear.h --- src/MOLECULE/bond_nonlinear.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_nonlinear.h b/src/MOLECULE/bond_nonlinear.h index 7782b93778..76dffdba31 100644 --- a/src/MOLECULE/bond_nonlinear.h +++ b/src/MOLECULE/bond_nonlinear.h @@ -35,6 +35,7 @@ class BondNonlinear : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); + virtual void *extract(char *, int &); protected: double *epsilon,*r0,*lamda; From ef112be87020cd22a7e30b988409346c08baa406 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 14:54:17 +0200 Subject: [PATCH 08/13] Update bond_nonlinear.cpp --- src/MOLECULE/bond_nonlinear.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MOLECULE/bond_nonlinear.cpp b/src/MOLECULE/bond_nonlinear.cpp index ee943ad28f..72e4580fcd 100644 --- a/src/MOLECULE/bond_nonlinear.cpp +++ b/src/MOLECULE/bond_nonlinear.cpp @@ -202,3 +202,13 @@ double BondNonlinear::single(int type, double rsq, int /*i*/, int /*j*/, fforce = -epsilon[type]/r * 2.0*dr*lamdasq/denomsq; return epsilon[type] * drsq / denom; } + +/* ---------------------------------------------------------------------- */ + +void *BondNonlinear::extract( char *str, int &dim ) +{ + dim = 1; + if (strcmp(str,"epsilon")==0) return (void*) epsilon; + if (strcmp(str,"r0")==0) return (void*) r0; + return NULL; +} From 596ec069602191d40cfab6d79f519d4b21d7a0fb Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 15:01:34 +0200 Subject: [PATCH 09/13] Update fix_adapt.rst --- doc/src/fix_adapt.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index eab8f92639..b4587caf73 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -288,11 +288,19 @@ 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 -+---------------------------------+-------+------------+ -| :doc:`gromos ` | k, r0 | type bonds | -+---------------------------------+-------+------------+ -| :doc:`harmonic ` | k,r0 | type bonds | -+---------------------------------+-------+------------+ ++------------------------------------+-------+------------+ +| :doc:`class2 ` | r0 | type bonds | ++------------------------------------+-------+------------+ +| :doc:`fene ` | k, r0 | type bonds | ++------------------------------------+-------+------------+ +| :doc:`gromos ` | k, r0 | type bonds | ++------------------------------------+-------+------------+ +| :doc:`harmonic ` | k,r0 | type bonds | ++------------------------------------+-------+------------+ +| :doc:`morse ` | r0 | type bonds | ++------------------------------------+-------+------------+ +| :doc:`nonlinear ` | r0 | type bonds | ++------------------------------------+-------+------------+ ---------- From 1157a2a4c2d566d2e25c62918736b2742e73acd9 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 15:14:21 +0200 Subject: [PATCH 10/13] Update bond_class2.cpp --- src/CLASS2/bond_class2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index bdec6553b9..097c8fe387 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -15,6 +15,7 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ +#include #include "bond_class2.h" #include #include From ba81e6a9558ced06629717507054ad8c21ebc97b Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 15:15:00 +0200 Subject: [PATCH 11/13] Update bond_morse.cpp --- src/MOLECULE/bond_morse.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_morse.cpp b/src/MOLECULE/bond_morse.cpp index 562d21c50d..0a92229879 100644 --- a/src/MOLECULE/bond_morse.cpp +++ b/src/MOLECULE/bond_morse.cpp @@ -18,6 +18,7 @@ #include "bond_morse.h" #include #include +#include #include "atom.h" #include "neighbor.h" #include "comm.h" From e93920bb5dbb170d645d3325a271b027848431c4 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 15:15:25 +0200 Subject: [PATCH 12/13] Update bond_nonlinear.cpp --- src/MOLECULE/bond_nonlinear.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_nonlinear.cpp b/src/MOLECULE/bond_nonlinear.cpp index 72e4580fcd..8f0616e03e 100644 --- a/src/MOLECULE/bond_nonlinear.cpp +++ b/src/MOLECULE/bond_nonlinear.cpp @@ -14,6 +14,7 @@ #include "bond_nonlinear.h" #include #include +#include #include "atom.h" #include "neighbor.h" #include "comm.h" From 08e81d6a36ad13eb10a0efbeb318f083b20e9deb Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Apr 2020 15:15:52 +0200 Subject: [PATCH 13/13] Update bond_fene.cpp --- src/MOLECULE/bond_fene.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index 239204dac6..e3c47b6241 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -14,6 +14,7 @@ #include "bond_fene.h" #include #include +#include #include "atom.h" #include "neighbor.h" #include "comm.h"