From feea204f7c0062e4bcc767fc9c1ee6ee9907a593 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 6 Feb 2025 15:37:59 +0200 Subject: [PATCH] implement reinit & set reinitflag flag to 1 --- src/improper.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/improper.cpp b/src/improper.cpp index 3476bcdb50..136e913dd0 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -30,6 +30,7 @@ Improper::Improper(LAMMPS *_lmp) : Pointers(_lmp) { energy = 0.0; writedata = 0; + reinitflag = 1; for (int i = 0; i < 4; i++) symmatoms[i] = 0; allocated = 0; @@ -421,3 +422,15 @@ double Improper::memory_usage() bytes += (double) comm->nthreads * maxvatom * 6 * sizeof(double); return bytes; } + +/* ----------------------------------------------------------------------- + reset all type-based improper params via init() +-------------------------------------------------------------------------- */ + +void Improper::reinit() +{ + if (!reinitflag) + error->all(FLERR, "Fix adapt interface to this improper style not supported"); + + init(); +}