From 353121c942ad09a3410956a2ab33a34648fb9341 Mon Sep 17 00:00:00 2001 From: exapde Date: Fri, 21 Jun 2024 22:08:20 -0400 Subject: [PATCH] update compute descriptors --- src/ML-POD/fitpod_command.cpp | 26 +++++++++++++------------- src/ML-POD/pair_pod.cpp | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/ML-POD/fitpod_command.cpp b/src/ML-POD/fitpod_command.cpp index 805c0d745a..47feb19f58 100644 --- a/src/ML-POD/fitpod_command.cpp +++ b/src/ML-POD/fitpod_command.cpp @@ -73,21 +73,21 @@ void FitPOD::command(int narg, char **arg) if (coeff_file != "") podArrayCopy(desc.c, fastpodptr->coeff, fastpodptr->nCoeffAll); + if (((int) envdata.data_path.size() > 1) && (desc.nClusters > 1)) { + environment_cluster_calculation(envdata); + //error->all(FLERR, "stop after environment_cluster_calculation"); + memory->destroy(envdata.lattice); + memory->destroy(envdata.energy); + memory->destroy(envdata.stress); + memory->destroy(envdata.position); + memory->destroy(envdata.force); + memory->destroy(envdata.atomtype); + memory->destroy(envdata.we); + memory->destroy(envdata.wf); + } + if (compute_descriptors==0) { - if (((int) envdata.data_path.size() > 1) && (desc.nClusters > 1)) { - environment_cluster_calculation(envdata); - //error->all(FLERR, "stop after environment_cluster_calculation"); - memory->destroy(envdata.lattice); - memory->destroy(envdata.energy); - memory->destroy(envdata.stress); - memory->destroy(envdata.position); - memory->destroy(envdata.force); - memory->destroy(envdata.atomtype); - memory->destroy(envdata.we); - memory->destroy(envdata.wf); - } - // compute POD coefficients using least-squares method if (coeff_file == "") { least_squares_fit(traindata); diff --git a/src/ML-POD/pair_pod.cpp b/src/ML-POD/pair_pod.cpp index c6d0de7c0d..bbcc62ef3a 100644 --- a/src/ML-POD/pair_pod.cpp +++ b/src/ML-POD/pair_pod.cpp @@ -161,7 +161,7 @@ void PairPOD::compute(int eflag, int vflag) // // we must enforce using F dot r, since we have no energy or stress tally calls. // vflag_fdotr = 1; -// +// // if (peratom_warn && (vflag_atom || eflag_atom)) { // peratom_warn = false; // if (comm->me == 0)