diff --git a/doc/src/compute_fep.rst b/doc/src/compute_fep.rst index 0832d6191a..279148a55d 100644 --- a/doc/src/compute_fep.rst +++ b/doc/src/compute_fep.rst @@ -163,7 +163,7 @@ the meaning of these parameters: +------------------------------------------------------------------------------+-------------------------+------------+ | :doc:`born ` | a,b,c | type pairs | +------------------------------------------------------------------------------+-------------------------+------------+ -| :doc:`buck ` | a,c | type pairs | +| :doc:`buck, buck/coul/cut, buck/coul/long, buck/coul/msm ` | a,c | type pairs | +------------------------------------------------------------------------------+-------------------------+------------+ | :doc:`buck/mdf ` | a,c | type pairs | +------------------------------------------------------------------------------+-------------------------+------------+ diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index 638895ecc9..aa34516d52 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -128,9 +128,9 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`born/coul/long, born/coul/msm ` | coulombic_cutoff | type global | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ -| :doc:`buck ` | a,c | type pairs | +| :doc:`buck, buck/coul/cut ` | a,c | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ -| :doc:`buck/coul/long, buck/coul/msm ` | coulombic_cutoff | type global | +| :doc:`buck/coul/long, buck/coul/msm ` | a,c,coulombic_cutoff | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`buck/mdf ` | a,c | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ diff --git a/doc/src/fix_adapt_fep.rst b/doc/src/fix_adapt_fep.rst index 0666d3965d..b45ac80429 100644 --- a/doc/src/fix_adapt_fep.rst +++ b/doc/src/fix_adapt_fep.rst @@ -120,7 +120,7 @@ styles and their energy formulas for the meaning of these parameters: +------------------------------------------------------------------------------+-------------------------+------------+ | :doc:`born ` | a,b,c | type pairs | +------------------------------------------------------------------------------+-------------------------+------------+ -| :doc:`buck ` | a,c | type pairs | +| :doc:`buck, buck/coul/cut, buck/coul/long, buck/coul/msm ` | a,c | type pairs | +------------------------------------------------------------------------------+-------------------------+------------+ | :doc:`buck/mdf ` | a,c | type pairs | +------------------------------------------------------------------------------+-------------------------+------------+ diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index 4a0b8a3a15..20202a8de2 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -558,5 +558,8 @@ void *PairBuckCoulLong::extract(const char *str, int &dim) { dim = 0; if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul; + dim = 2; + if (strcmp(str,"a") == 0) return (void *) a; + if (strcmp(str,"c") == 0) return (void *) c; return nullptr; } diff --git a/src/KSPACE/pair_buck_coul_msm.cpp b/src/KSPACE/pair_buck_coul_msm.cpp index 4c423a8afd..c7d237b161 100644 --- a/src/KSPACE/pair_buck_coul_msm.cpp +++ b/src/KSPACE/pair_buck_coul_msm.cpp @@ -246,5 +246,9 @@ void *PairBuckCoulMSM::extract(const char *str, int &dim) { dim = 0; if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul; + dim = 2; + if (strcmp(str,"a") == 0) return (void *) a; + if (strcmp(str,"c") == 0) return (void *) c; + return nullptr; } diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 46afe7b2d7..49a469d296 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -1754,13 +1754,13 @@ void *FixNH::extract(const char *str, int &dim) } else if (tstat_flag && strcmp(str,"mtchain") == 0) { return &mtchain; } else if (pstat_flag && strcmp(str,"mpchain") == 0) { - return &mtchain; + return &mpchain; } dim=1; if (tstat_flag && strcmp(str,"eta") == 0) { return η } else if (pstat_flag && strcmp(str,"etap") == 0) { - return η + return &etap; } else if (pstat_flag && strcmp(str,"p_flag") == 0) { return &p_flag; } else if (pstat_flag && strcmp(str,"p_start") == 0) { diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 05b36d3620..bc95dfb6ab 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -470,3 +470,13 @@ double PairBuckCoulCut::single(int i, int j, int itype, int jtype, } return eng; } + +/* ---------------------------------------------------------------------- */ + +void *PairBuckCoulCut::extract(const char *str, int &dim) +{ + dim = 2; + if (strcmp(str,"a") == 0) return (void *) a; + if (strcmp(str,"c") == 0) return (void *) c; + return nullptr; +} diff --git a/src/pair_buck_coul_cut.h b/src/pair_buck_coul_cut.h index b400ca3152..fef8396335 100644 --- a/src/pair_buck_coul_cut.h +++ b/src/pair_buck_coul_cut.h @@ -40,6 +40,7 @@ class PairBuckCoulCut : public Pair { void write_data(FILE *); void write_data_all(FILE *); virtual double single(int, int, int, int, double, double, double, double &); + void *extract(const char *, int &); protected: double cut_lj_global,cut_coul_global; diff --git a/unittest/force-styles/tests/mol-pair-buck_coul_cut.yaml b/unittest/force-styles/tests/mol-pair-buck_coul_cut.yaml index 928473176d..da5850b91c 100644 --- a/unittest/force-styles/tests/mol-pair-buck_coul_cut.yaml +++ b/unittest/force-styles/tests/mol-pair-buck_coul_cut.yaml @@ -25,7 +25,9 @@ pair_coeff: ! | 4 4 127198.698386798 0.207005479340455 37.2289658745028 4 5 127198.698386798 0.207005479340455 37.2289658745028 5 5 127198.698386798 0.207005479340455 37.2289658745028 -extract: ! "" +extract: | + a 2 + c 2 natoms: 29 init_vdwl: 143.749538808172 init_coul: -127.494586297384 diff --git a/unittest/force-styles/tests/mol-pair-buck_coul_long.yaml b/unittest/force-styles/tests/mol-pair-buck_coul_long.yaml index 07606715b8..c6271ab58e 100644 --- a/unittest/force-styles/tests/mol-pair-buck_coul_long.yaml +++ b/unittest/force-styles/tests/mol-pair-buck_coul_long.yaml @@ -30,7 +30,9 @@ pair_coeff: ! | 4 4 127198.698386798 0.207005479340455 37.2289658745028 4 5 127198.698386798 0.207005479340455 37.2289658745028 5 5 127198.698386798 0.207005479340455 37.2289658745028 -extract: ! "" +extract: | + a 2 + c 2 natoms: 29 init_vdwl: 143.749538808172 init_coul: 225.821815126925 diff --git a/unittest/force-styles/tests/mol-pair-buck_coul_msm.yaml b/unittest/force-styles/tests/mol-pair-buck_coul_msm.yaml index ca38b6369d..41e91c6a9a 100644 --- a/unittest/force-styles/tests/mol-pair-buck_coul_msm.yaml +++ b/unittest/force-styles/tests/mol-pair-buck_coul_msm.yaml @@ -32,7 +32,9 @@ pair_coeff: ! | 4 4 127198.698386798 0.207005479340455 37.2289658745028 4 5 127198.698386798 0.207005479340455 37.2289658745028 5 5 127198.698386798 0.207005479340455 37.2289658745028 -extract: ! "" +extract: | + a 2 + c 2 natoms: 29 init_vdwl: 143.749538808172 init_coul: 226.465163473713 diff --git a/unittest/force-styles/tests/mol-pair-buck_coul_msm_table.yaml b/unittest/force-styles/tests/mol-pair-buck_coul_msm_table.yaml index 24a23bb444..676aa0450a 100644 --- a/unittest/force-styles/tests/mol-pair-buck_coul_msm_table.yaml +++ b/unittest/force-styles/tests/mol-pair-buck_coul_msm_table.yaml @@ -32,7 +32,9 @@ pair_coeff: ! | 4 4 127198.698386798 0.207005479340455 37.2289658745028 4 5 127198.698386798 0.207005479340455 37.2289658745028 5 5 127198.698386798 0.207005479340455 37.2289658745028 -extract: ! "" +extract: | + a 2 + c 2 natoms: 29 init_vdwl: 143.749538808172 init_coul: 226.465163473713 diff --git a/unittest/force-styles/tests/mol-pair-buck_coul_table.yaml b/unittest/force-styles/tests/mol-pair-buck_coul_table.yaml index 5e89b1ddf7..f56810d895 100644 --- a/unittest/force-styles/tests/mol-pair-buck_coul_table.yaml +++ b/unittest/force-styles/tests/mol-pair-buck_coul_table.yaml @@ -30,7 +30,9 @@ pair_coeff: ! | 4 4 127198.698386798 0.207005479340455 37.2289658745028 4 5 127198.698386798 0.207005479340455 37.2289658745028 5 5 127198.698386798 0.207005479340455 37.2289658745028 -extract: ! "" +extract: | + a 2 + c 2 natoms: 29 init_vdwl: 143.749538808172 init_coul: 225.821851347828