update pace plugin loader to include the two additional styles added
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
project(paceplugin VERSION 1.0 LANGUAGES CXX)
|
project(paceplugin VERSION 1.1 LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
include(CheckIncludeFileCXX)
|
include(CheckIncludeFileCXX)
|
||||||
@ -15,7 +15,11 @@ include(ML-PACE)
|
|||||||
##########################
|
##########################
|
||||||
# building the plugins
|
# building the plugins
|
||||||
|
|
||||||
add_library(paceplugin MODULE paceplugin.cpp ${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace.cpp)
|
add_library(paceplugin MODULE paceplugin.cpp
|
||||||
|
${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace.cpp
|
||||||
|
${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace_extrapolation.cpp
|
||||||
|
${LAMMPS_SOURCE_DIR}/ML-PACE/compute_pace.cpp)
|
||||||
|
|
||||||
target_link_libraries(paceplugin PRIVATE pace)
|
target_link_libraries(paceplugin PRIVATE pace)
|
||||||
target_link_libraries(paceplugin PRIVATE lammps)
|
target_link_libraries(paceplugin PRIVATE lammps)
|
||||||
target_include_directories(paceplugin PRIVATE ${LAMMPS_SOURCE_DIR}/ML-PACE)
|
target_include_directories(paceplugin PRIVATE ${LAMMPS_SOURCE_DIR}/ML-PACE)
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#include "pair_pace.h"
|
#include "pair_pace.h"
|
||||||
|
#include "pair_pace_extrapolation.h"
|
||||||
|
#include "compute_pace.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -11,6 +13,16 @@ static Pair *pair_pace_creator(LAMMPS *lmp)
|
|||||||
return new PairPACE(lmp);
|
return new PairPACE(lmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Pair *pair_pace_extrapolation_creator(LAMMPS *lmp)
|
||||||
|
{
|
||||||
|
return new PairPACEExtrapolation(lmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Compute *compute_pace_creator(LAMMPS *lmp, int argc, char **argv)
|
||||||
|
{
|
||||||
|
return new ComputePACE(lmp, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
|
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
|
||||||
{
|
{
|
||||||
lammpsplugin_t plugin;
|
lammpsplugin_t plugin;
|
||||||
@ -25,4 +37,24 @@ extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
|
|||||||
plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_pace_creator;
|
plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_pace_creator;
|
||||||
plugin.handle = handle;
|
plugin.handle = handle;
|
||||||
(*register_plugin)(&plugin, lmp);
|
(*register_plugin)(&plugin, lmp);
|
||||||
|
|
||||||
|
// register pace/extrapolation pair style
|
||||||
|
plugin.version = LAMMPS_VERSION;
|
||||||
|
plugin.style = "pair";
|
||||||
|
plugin.name = "pace/extrapolation";
|
||||||
|
plugin.info = "PACE plugin extrapolation pair style v1.0";
|
||||||
|
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
|
||||||
|
plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_pace_extrapolation_creator;
|
||||||
|
plugin.handle = handle;
|
||||||
|
(*register_plugin)(&plugin, lmp);
|
||||||
|
|
||||||
|
// register pace compute style
|
||||||
|
plugin.version = LAMMPS_VERSION;
|
||||||
|
plugin.style = "compute";
|
||||||
|
plugin.name = "pace";
|
||||||
|
plugin.info = "PACE plugin compute style v1.0";
|
||||||
|
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
|
||||||
|
plugin.creator.v2 = (lammpsplugin_factory2 *) &compute_pace_creator;
|
||||||
|
plugin.handle = handle;
|
||||||
|
(*register_plugin)(&plugin, lmp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user