diff --git a/src/angle.cpp b/src/angle.cpp index 0756ce1fbd..3cef3fe09f 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -75,6 +75,16 @@ void Angle::init() init_style(); } +/* ---------------------------------------------------------------------- + check that there are no arguments +------------------------------------------------------------------------- */ + +void Angle::settings(int narg, char **args) +{ + if (narg > 0) + error->all(FLERR, "Illegal angle_style {} argument: {}", force->angle_style, args[0]); +} + /* ---------------------------------------------------------------------- setup for energy, virial computation see integrate::ev_set() for bitwise settings of eflag/vflag diff --git a/src/angle.h b/src/angle.h index f7d66a1202..79320a575f 100644 --- a/src/angle.h +++ b/src/angle.h @@ -50,7 +50,7 @@ class Angle : protected Pointers { ~Angle() override; virtual void init(); virtual void compute(int, int) = 0; - virtual void settings(int, char **) {} + virtual void settings(int, char **); virtual void coeff(int, char **) = 0; virtual void init_style(){}; virtual double equilibrium_angle(int) = 0; diff --git a/src/bond.cpp b/src/bond.cpp index 18cdaf8c6d..97030ca64f 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -86,6 +86,16 @@ void Bond::init() init_style(); } +/* ---------------------------------------------------------------------- + check that there are no arguments +------------------------------------------------------------------------- */ + +void Bond::settings(int narg, char **args) +{ + if (narg > 0) + error->all(FLERR, "Illegal bond_style {} argument: {}", force->bond_style, args[0]); +} + /* ---------------------------------------------------------------------- setup for energy, virial computation see integrate::ev_set() for bitwise settings of eflag/vflag diff --git a/src/bond.h b/src/bond.h index a2dc4c24ce..f0207f1113 100644 --- a/src/bond.h +++ b/src/bond.h @@ -53,7 +53,7 @@ class Bond : protected Pointers { virtual void init(); virtual void init_style() {} virtual void compute(int, int) = 0; - virtual void settings(int, char **) {} + virtual void settings(int, char **); virtual void coeff(int, char **) = 0; virtual double equilibrium_distance(int) = 0; virtual void write_restart(FILE *) = 0; diff --git a/src/dihedral.cpp b/src/dihedral.cpp index b82e1ed84e..a59f83f37d 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -74,6 +74,16 @@ void Dihedral::init() init_style(); } +/* ---------------------------------------------------------------------- + check that there are no arguments +------------------------------------------------------------------------- */ + +void Dihedral::settings(int narg, char **args) +{ + if (narg > 0) + error->all(FLERR, "Illegal dihedral_style {} argument: {}", force->dihedral_style, args[0]); +} + /* ---------------------------------------------------------------------- setup for energy, virial computation see integrate::ev_set() for bitwise settings of eflag/vflag diff --git a/src/dihedral.h b/src/dihedral.h index 1d0a24338a..07e9fcba22 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -48,7 +48,7 @@ class Dihedral : protected Pointers { virtual void init(); virtual void init_style() {} virtual void compute(int, int) = 0; - virtual void settings(int, char **) {} + virtual void settings(int, char **); virtual void coeff(int, char **) = 0; virtual void write_restart(FILE *) = 0; virtual void read_restart(FILE *) = 0; diff --git a/src/improper.cpp b/src/improper.cpp index bb3c4d12b5..68b83a69c3 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -73,6 +73,16 @@ void Improper::init() init_style(); } +/* ---------------------------------------------------------------------- + check that there are no arguments +------------------------------------------------------------------------- */ + +void Improper::settings(int narg, char **args) +{ + if (narg > 0) + error->all(FLERR, "Illegal improper_style {} argument: {}", force->improper_style, args[0]); +} + /* ---------------------------------------------------------------------- setup for energy, virial computation see integrate::ev_set() for bitwise settings of eflag/vflag diff --git a/src/improper.h b/src/improper.h index ae478ce14f..2013c7e548 100644 --- a/src/improper.h +++ b/src/improper.h @@ -48,7 +48,7 @@ class Improper : protected Pointers { virtual void init(); virtual void init_style() {} virtual void compute(int, int) = 0; - virtual void settings(int, char **) {} + virtual void settings(int, char **); virtual void coeff(int, char **) = 0; virtual void write_restart(FILE *) = 0; virtual void read_restart(FILE *) = 0;