From a8725da04f63a5ea0770c5514d93da12f83ef6ae Mon Sep 17 00:00:00 2001 From: MoseyQAQ Date: Tue, 23 Dec 2025 18:41:38 +0800 Subject: [PATCH] refactor(NEP): Update the name of `NEP` class, and modify the makefile Recently, the NEP_CPU has relesaed a breaking change related to the `qNEP`, the original API has been changed: 1. reaname the `NEP3` to `NEP` 2. add the `ewald.cpp` and `neighbor.cpp`. --- source/source_esolver/esolver_nep.h | 2 +- toolchain/scripts/stage4/install_nep.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/source_esolver/esolver_nep.h b/source/source_esolver/esolver_nep.h index 82432d2e45..dfec17a83c 100644 --- a/source/source_esolver/esolver_nep.h +++ b/source/source_esolver/esolver_nep.h @@ -90,7 +90,7 @@ class ESolver_NEP : public ESolver * @note These variables are only defined if the __NEP preprocessor macro is defined. */ #ifdef __NEP - NEP3 nep; ///< NEP3 object for NEP calculations + NEP nep; ///< NEP object for NEP calculations #endif std::string nep_file; ///< directory of NEP model file diff --git a/toolchain/scripts/stage4/install_nep.sh b/toolchain/scripts/stage4/install_nep.sh index 3a5ad8eb6f..a4b659abcb 100755 --- a/toolchain/scripts/stage4/install_nep.sh +++ b/toolchain/scripts/stage4/install_nep.sh @@ -63,7 +63,7 @@ CXXFLAGS = -O2 -fPIC -std=c++11 INCLUDES = -I./src # Source files -SRCS = ./src/nep.cpp +SRCS = ./src/nep.cpp ./src/ewald.cpp ./src/neighbor.cpp # Object files OBJS = \$(SRCS:.cpp=.o) @@ -91,7 +91,7 @@ install: mkdir -p \$(PREFIX)/lib mkdir -p \$(PREFIX)/include cp \$(TARGET) \$(PREFIX)/lib/ - cp src/nep.h \$(PREFIX)/include/ + cp src/*.h \$(PREFIX)/include/ EOF make > make.log 2>&1 || tail -n ${LOG_LINES} make.log