diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 237b0b2b4b..4753845af7 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -108,6 +108,9 @@ int FixLangevin::setmask() void FixLangevin::init() { + if (atom->mass == NULL) + error->all("Cannot use fix langevin without per-type mass defined"); + // set force prefactors for (int i = 1; i <= atom->ntypes; i++) {