From db36c8bcc31ec4ec4dd12b7efef0962199d0e56a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Oct 2016 14:51:09 -0400 Subject: [PATCH] stop with error, if molecule command requires special bond auto-generation before box is defined --- src/molecule.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/molecule.cpp b/src/molecule.cpp index 5e9aa292d0..0febb784c8 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -595,6 +595,10 @@ void Molecule::read(int flag) // set maxspecial on first pass, so allocate() has a size if (bondflag && specialflag == 0) { + if (domain->box_exist == 0) + error->all(FLERR,"Cannot auto-generate special bonds before " + "simulation box is defined"); + maxspecial = atom->maxspecial; if (flag) { special_generate();