From 8bfa0b2b048e4d28b4d1df4446dedc2a0913a321 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 15 Aug 2023 01:03:25 -0400 Subject: [PATCH] add option to query Update::setupflag to see if thermo data is valid --- src/library.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/library.cpp b/src/library.cpp index 0d8711c520..abc2dc3e0b 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -773,6 +773,10 @@ argument string. - Description of return value - Data type - Uses index + * - setup + - 1 if setup is not completed and thus thermo data invalid, 0 otherwise + - pointer to int + - no * - step - timestep when the last thermo output was generated or -1 - pointer to bigint @@ -811,7 +815,10 @@ void *lammps_last_thermo(void *handle, const char *what, int index) BEGIN_CAPTURE { - if (strcmp(what, "step") == 0) { + if (strcmp(what, "setup") == 0) { + val = (void *) &lmp->update->setupflag; + + } else if (strcmp(what, "step") == 0) { val = (void *) th->get_timestep(); } else if (strcmp(what, "num") == 0) {