From 2a054c17beacbbe0a16644699b2dcb99165bb98a Mon Sep 17 00:00:00 2001 From: Yury Lysogorskiy Date: Thu, 2 Jun 2022 23:01:54 +0200 Subject: [PATCH] - set species type for NULL atom type to -1. species_type=-1 value will not reach ACE Evaluator::compute_atom, but if it will ,then error will be thrown there - updating lib pace MD5SUM (for both make and cmake installation scenario), but use same tag name v.2021.10.25.fix2 (add override keyword to ACERadialFunctions, add check for species_type==-1, fix yaml_cpp CMakeLists.txt) --- cmake/Modules/Packages/ML-PACE.cmake | 2 +- lib/pace/Install.py | 2 +- src/ML-PACE/pair_pace.cpp | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/Packages/ML-PACE.cmake b/cmake/Modules/Packages/ML-PACE.cmake index 8f8d93f3ae..adfdd8ebf8 100644 --- a/cmake/Modules/Packages/ML-PACE.cmake +++ b/cmake/Modules/Packages/ML-PACE.cmake @@ -1,6 +1,6 @@ set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2021.10.25.fix2.tar.gz" CACHE STRING "URL for PACE evaluator library sources") -set(PACELIB_MD5 "d1984c9d5bf88715fc20b23dcf95aa12" CACHE STRING "MD5 checksum of PACE evaluator library tarball") +set(PACELIB_MD5 "32394d799bc282bb57696c78c456e64f" CACHE STRING "MD5 checksum of PACE evaluator library tarball") mark_as_advanced(PACELIB_URL) mark_as_advanced(PACELIB_MD5) diff --git a/lib/pace/Install.py b/lib/pace/Install.py index 165b90774e..790acd4cf4 100644 --- a/lib/pace/Install.py +++ b/lib/pace/Install.py @@ -24,7 +24,7 @@ checksums = { \ 'v.2021.9.28' : 'f98363bb98adc7295ea63974738c2a1b', 'v.2021.10.25' : 'a2ac3315c41a1a4a5c912bcb1bc9c5cc', 'v.2021.10.25.fix': 'e0572de57039d4afedefb25707b6ceae', - 'v.2021.10.25.fix2': 'd1984c9d5bf88715fc20b23dcf95aa12' + 'v.2021.10.25.fix2': '32394d799bc282bb57696c78c456e64f' } diff --git a/src/ML-PACE/pair_pace.cpp b/src/ML-PACE/pair_pace.cpp index 56463a921e..87e580b8d3 100644 --- a/src/ML-PACE/pair_pace.cpp +++ b/src/ML-PACE/pair_pace.cpp @@ -180,7 +180,7 @@ void PairPACE::compute(int eflag, int vflag) try { aceimpl->ace->compute_atom(i, x, type, jnum, jlist); - } catch (exception &e) { + } catch (std::exception &e) { error->one(FLERR, e.what()); } @@ -317,7 +317,9 @@ void PairPACE::coeff(int narg, char **arg) for (int i = 1; i <= n; i++) { char *elemname = arg[2 + i]; if (strcmp(elemname, "NULL") == 0) { - aceimpl->ace->element_type_mapping(i) = 0; + // species_type=-1 value will not reach ACE Evaluator::compute_atom, + // but if it will ,then error will be thrown there + aceimpl->ace->element_type_mapping(i) = -1; map[i] = -1; if (comm->me == 0) utils::logmesg(lmp, "Skipping LAMMPS atom type #{}(NULL)\n", i); } else {