diff --git a/src/ML-IAP/Install.sh b/src/ML-IAP/Install.sh index 18812c6026..2f2fa50921 100755 --- a/src/ML-IAP/Install.sh +++ b/src/ML-IAP/Install.sh @@ -40,6 +40,17 @@ for file in *.cpp *.h; do test -f ${file} && action $file done +# Edit makefile for ace descriptors if ML-PACE is available +if (test $1 = 1) then + if (test -e ../Makefile.package) then + if (test -e ../compute_pace.h) then + sed -i -e 's|^PKG_INC =[ \t]*|&-DMLIAP_ACE |' ../Makefile.package + fi + else + rm -f ../mliap_descriptor_ace.cpp ../mliap_descriptor_ace.h + fi +fi + # Install cython pyx file only if also Python is available action mliap_model_python_couple.pyx python_impl.cpp action mliap_unified_couple.pyx python_impl.cpp diff --git a/src/ML-IAP/compute_mliap.cpp b/src/ML-IAP/compute_mliap.cpp index ac9d2dd1c4..0f87e2b13f 100644 --- a/src/ML-IAP/compute_mliap.cpp +++ b/src/ML-IAP/compute_mliap.cpp @@ -91,6 +91,7 @@ ComputeMLIAP::ComputeMLIAP(LAMMPS *lmp, int narg, char **arg) : if (iarg+2 > narg) error->all(FLERR,"Illegal compute mliap command"); if (strcmp(arg[iarg+1],"sna") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal compute mliap command"); + if (lmp->kokkos) error->all(FLERR,"Cannot (yet) use KOKKOS package with SNAP descriptors"); descriptor = new MLIAPDescriptorSNAP(lmp,arg[iarg+2]); iarg += 3; } else if (strcmp(arg[iarg+1],"so3") == 0) { @@ -101,6 +102,7 @@ ComputeMLIAP::ComputeMLIAP(LAMMPS *lmp, int narg, char **arg) : #ifdef MLIAP_ACE else if (strcmp(arg[iarg+1],"ace") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal pair_style mliap command"); + if (lmp->kokkos) error->all(FLERR,"Cannot (yet) use KOKKOS package with ACE descriptors"); descriptor = new MLIAPDescriptorACE(lmp,arg[iarg+2]); iarg += 3; } diff --git a/src/ML-IAP/pair_mliap.cpp b/src/ML-IAP/pair_mliap.cpp index c242f4cdcc..0686cd2f71 100644 --- a/src/ML-IAP/pair_mliap.cpp +++ b/src/ML-IAP/pair_mliap.cpp @@ -178,6 +178,7 @@ void PairMLIAP::settings(int narg, char ** arg) if (descriptor != nullptr) error->all(FLERR,"Illegal multiple pair_style mliap descriptor definition"); if (strcmp(arg[iarg+1],"sna") == 0) { if (iarg+3 > narg) utils::missing_cmd_args(FLERR, "pair_style mliap descriptor sna", error); + if (lmp->kokkos) error->all(FLERR,"Cannot (yet) use KOKKOS package with SNAP descriptors"); descriptor = new MLIAPDescriptorSNAP(lmp,arg[iarg+2]); iarg += 3; } else if (strcmp(arg[iarg+1],"so3") == 0) { @@ -188,6 +189,7 @@ void PairMLIAP::settings(int narg, char ** arg) #ifdef MLIAP_ACE else if (strcmp(arg[iarg+1],"ace") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal pair_style mliap command"); + if (lmp->kokkos) error->all(FLERR,"Cannot (yet) use KOKKOS package with ACE descriptors"); descriptor = new MLIAPDescriptorACE(lmp,arg[iarg+2]); iarg += 3; }