enable lj/gromacs for fix adapt

This commit is contained in:
Evangelos Voyiatzis
2025-04-01 15:36:44 +02:00
committed by GitHub
parent c99ae613de
commit db8dae3300
4 changed files with 16 additions and 1 deletions

View File

@ -198,6 +198,8 @@ formulas for the meaning of these parameters:
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs | | :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/lj/gromacs <pair_gromacs>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs | | :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs | | :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs |

View File

@ -432,3 +432,13 @@ double PairLJGromacs::single(int /*i*/, int /*j*/, int itype, int jtype, double
return factor_lj * philj; return factor_lj * philj;
} }
/* ---------------------------------------------------------------------- */
void *PairLJGromacs::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str, "epsilon") == 0) return (void *) epsilon;
if (strcmp(str, "sigma") == 0) return (void *) sigma;
return nullptr;
}

View File

@ -39,6 +39,7 @@ class PairLJGromacs : public Pair {
void write_data(FILE *) override; void write_data(FILE *) override;
void write_data_all(FILE *) override; void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override; double single(int, int, int, int, double, double, double, double &) override;
void *extract(const char *, int &) override;
protected: protected:
double cut_inner_global, cut_global; double cut_inner_global, cut_global;

View File

@ -18,7 +18,9 @@ pair_coeff: ! |
3 3 0.02 3.2 3 3 0.02 3.2
4 4 0.015 3.1 4 4 0.015 3.1
5 5 0.015 3.1 5 5 0.015 3.1
extract: ! "" extract: ! |
epsilon 2
sigma 2
natoms: 29 natoms: 29
init_vdwl: 749.2511379269325 init_vdwl: 749.2511379269325
init_coul: 0 init_coul: 0