diff --git a/fortran/lammps.f90 b/fortran/lammps.f90 index 1ff351fad4..4166335e23 100644 --- a/fortran/lammps.f90 +++ b/fortran/lammps.f90 @@ -44,7 +44,8 @@ MODULE LIBLAMMPS ! Data type constants for extracting data from global, atom, compute, and fix ! ! Must be kept in sync with the equivalent declarations in - ! src/library.h and python/lammps/constants.py + ! src/library.h, python/lammps/constants.py, tools/swig/lammps.i, + ! and examples/COUPLE/plugin/liblammpsplugin.h ! ! These are NOT part of the API (the part the user sees) INTEGER(c_int), PARAMETER :: & diff --git a/python/lammps/constants.py b/python/lammps/constants.py index a006d0b17a..8fd6a9eaf5 100644 --- a/python/lammps/constants.py +++ b/python/lammps/constants.py @@ -22,8 +22,8 @@ LAMMPS_INT64 = 4 LAMMPS_INT64_2D = 5 LAMMPS_STRING = 6 -# these must be kept in sync with the enums in src/library.h, tools/swig/lammps.i -# and the constants in fortran/lammps.f90 +# these must be kept in sync with the enums in src/library.h, tools/swig/lammps.i, +# examples/COUPLE/plugin/liblammpsplugin.h, and the constants in fortran/lammps.f90 LMP_STYLE_GLOBAL = 0 LMP_STYLE_ATOM = 1 LMP_STYLE_LOCAL = 2 diff --git a/src/library.h b/src/library.h index 4ec6b21655..26006a3e9e 100644 --- a/src/library.h +++ b/src/library.h @@ -41,7 +41,7 @@ /** Data type constants for extracting data from atoms, computes and fixes * * Must be kept in sync with the equivalent constants in python/lammps/constants.py, - * fortran/lammps.f90, and tools/swig/lammps.i */ + * fortran/lammps.f90, tools/swig/lammps.i, examples/COUPLE/plugin/liblammpsplugin.h */ enum _LMP_DATATYPE_CONST { LAMMPS_INT = 0, /*!< 32-bit integer (array) */ @@ -56,7 +56,7 @@ enum _LMP_DATATYPE_CONST { /** Style constants for extracting data from computes and fixes. * * Must be kept in sync with the equivalent constants in python/lammps/constants.py, - * fortran/lammps.f90, and tools/swig/lammps.i */ + * fortran/lammps.f90, tools/swig/lammps.i, and examples/COUPLE/plugin/liblammpsplugin.h */ enum _LMP_STYLE_CONST { LMP_STYLE_GLOBAL = 0, /*!< return global data */ @@ -67,7 +67,7 @@ enum _LMP_STYLE_CONST { /** Type and size constants for extracting data from computes and fixes. * * Must be kept in sync with the equivalent constants in python/lammps/constants.py, - * fortran/lammps.f90, and tools/swig/lammps.i */ + * fortran/lammps.f90, tools/swig/lammps.i, and examples/COUPLE/plugin/liblammpsplugin.h */ enum _LMP_TYPE_CONST { LMP_TYPE_SCALAR = 0, /*!< return scalar */ @@ -81,7 +81,7 @@ enum _LMP_TYPE_CONST { /** Error codes to select the suitable function in the Error class * * Must be kept in sync with the equivalent constants in python/lammps/constants.py, - * fortran/lammps.f90, and tools/swig/lammps.i */ + * fortran/lammps.f90, tools/swig/lammps.i, and examples/COUPLE/plugin/liblammpsplugin.h */ enum _LMP_ERROR_CONST { LMP_ERROR_WARNING = 0, /*!< call Error::warning() */ @@ -94,7 +94,7 @@ enum _LMP_ERROR_CONST { /** Variable style constants for extracting data from variables. * * Must be kept in sync with the equivalent constants in python/lammps/constants.py, - * fortran/lammps.f90, and tools/swig/lammps.i */ + * fortran/lammps.f90, tools/swig/lammps.i, and examples/COUPLE/plugin/liblammpsplugin.h */ enum _LMP_VAR_CONST { LMP_VAR_EQUAL = 0, /*!< compatible with equal-style variables */ @@ -260,15 +260,14 @@ void lammps_decode_image_flags(int64_t image, int *flags); #if defined(LAMMPS_BIGBIG) typedef void (*FixExternalFnPtr)(void *, int64_t, int, int64_t *, double **, double **); -void lammps_set_fix_external_callback(void *handle, const char *id, FixExternalFnPtr funcptr, - void *ptr); #elif defined(LAMMPS_SMALLBIG) typedef void (*FixExternalFnPtr)(void *, int64_t, int, int *, double **, double **); -void lammps_set_fix_external_callback(void *, const char *, FixExternalFnPtr, void *); #else typedef void (*FixExternalFnPtr)(void *, int, int, int *, double **, double **); -void lammps_set_fix_external_callback(void *, const char *, FixExternalFnPtr, void *); #endif + +void lammps_set_fix_external_callback(void *handle, const char *id, FixExternalFnPtr funcptr, + void *ptr); double **lammps_fix_external_get_force(void *handle, const char *id); void lammps_fix_external_set_energy_global(void *handle, const char *id, double eng); void lammps_fix_external_set_energy_peratom(void *handle, const char *id, double *eng);