From ea23af48d37556e4c64a266872505ef2b3ae3fd9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 14 Jun 2025 11:47:24 -0400 Subject: [PATCH] only perform size check if section is present --- src/molecule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/molecule.cpp b/src/molecule.cpp index d7c92a6b7f..fdfbe8fce8 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -307,7 +307,7 @@ void Molecule::from_json(const std::string &molid, const json &moldata) "Molecule template {}: JSON data for molecule does not contain required '{}' field", id, \ #field); \ } \ - if (sizecheck && (sizecheck != sizevar)) \ + if (flagvar && sizecheck && (sizecheck != sizevar)) \ error->all(FLERR, Error::NOLASTLINE, \ "Molecule template {}: Found {} instead of {} data entries for '{}'", id, sizevar, \ sizecheck, #field);