Commit db36c8bc authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

stop with error, if molecule command requires special bond auto-generation before box is defined

parent 991034b6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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();