From 23045d62c57ce16f048aff722a234054fa38db84 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 27 Jan 2025 14:27:34 -0500 Subject: [PATCH] add plugin wrapper and swig interface to new LAMMPS library functions --- examples/COUPLE/plugin/liblammpsplugin.c | 3 +++ examples/COUPLE/plugin/liblammpsplugin.h | 3 +++ tools/swig/lammps.i | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/examples/COUPLE/plugin/liblammpsplugin.c b/examples/COUPLE/plugin/liblammpsplugin.c index 99e38df32b..619b8828fc 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.c +++ b/examples/COUPLE/plugin/liblammpsplugin.c @@ -118,6 +118,9 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib) ADDSYM(set_internal_variable); ADDSYM(variable_info); ADDSYM(eval); + ADDSYM(clearstep_compute); + ADDSYM(addstep_compute); + ADDSYM(addstep_compute_all); ADDSYM(gather_atoms); ADDSYM(gather_atoms_concat); diff --git a/examples/COUPLE/plugin/liblammpsplugin.h b/examples/COUPLE/plugin/liblammpsplugin.h index dd1c9628f5..c765b0adc3 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.h +++ b/examples/COUPLE/plugin/liblammpsplugin.h @@ -164,6 +164,9 @@ struct _liblammpsplugin { int (*set_internal_variable)(void *, const char *, double); int (*variable_info)(void *, int, char *, int); double (*eval)(void *, const char *); + void (*clearstep_compute)(void *); + void (*addstep_compute)(void *, void *); + void (*addstep_compute_all)(void *, void *); void (*gather_atoms)(void *, const char *, int, int, void *); void (*gather_atoms_concat)(void *, const char *, int, int, void *); diff --git a/tools/swig/lammps.i b/tools/swig/lammps.i index bc9f46f407..476e6ad17d 100644 --- a/tools/swig/lammps.i +++ b/tools/swig/lammps.i @@ -143,6 +143,9 @@ extern int lammps_set_string_variable(void *, const char *, const char *); extern int lammps_set_internal_variable(void *, const char *, double); extern int lammps_variable_info(void *handle, int idx, char *buf, int bufsize); extern double lammps_eval(void *handle, const char *expr); +extern void lammps_clearstep_compute(void *handle); +extern void lammps_addstep_compute(void *handle, void *nstep); +extern void lammps_addstep_compute_all(void *handle, void *nstep); extern void lammps_gather_atoms(void *, char *, int, int, void *); extern void lammps_gather_atoms_concat(void *, char *, int, int, void *); @@ -336,6 +339,9 @@ extern int lammps_set_string_variable(void *, const char *, const char *); extern int lammps_set_internal_variable(void *, const char *, double); extern int lammps_variable_info(void *handle, int idx, char *buf, int bufsize); extern double lammps_eval(void *handle, const char *expr); +extern void lammps_clearstep_compute(void *handle); +extern void lammps_addstep_compute(void *handle, void *nstep); +extern void lammps_addstep_compute_all(void *handle, void *nstep); extern void lammps_gather_atoms(void *, char *, int, int, void *); extern void lammps_gather_atoms_concat(void *, char *, int, int, void *);