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

This commit is contained in:
Axel Kohlmeyer
2016-10-21 14:51:09 -04:00
parent 991034b632
commit db36c8bcc3

View File

@ -595,6 +595,10 @@ void Molecule::read(int flag)
// set maxspecial on first pass, so allocate() has a size // set maxspecial on first pass, so allocate() has a size
if (bondflag && specialflag == 0) { 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; maxspecial = atom->maxspecial;
if (flag) { if (flag) {
special_generate(); special_generate();