diff --git a/src/fix_rigid.cpp b/src/fix_rigid.cpp index 633916748a..bbd29a6a1d 100644 --- a/src/fix_rigid.cpp +++ b/src/fix_rigid.cpp @@ -93,8 +93,8 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[3],"molecule") == 0) { iarg = 4; - if (atom->molecular == 0) - error->all("Must use a molecular atom style with fix rigid molecule"); + if (atom->molecule_flag == 0) + error->all("Fix rigid molecule requires atom attribute molecule"); int *mask = atom->mask; int *molecule = atom->molecule; diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 4cd449659f..bc45df5592 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -1417,9 +1417,9 @@ void Neighbor::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg+1],"molecule") == 0) { if (iarg+3 > narg) error->all("Illegal neigh_modify command"); - if (atom->molecular == 0) { + if (atom->molecule_flag == 0) { char *str = (char *) - "Must use molecular atom style with neigh_modify exclude molecule"; + "Neigh_modify exclude molecule requires atom attribute molecule"; error->all(str); } if (nex_mol == maxex_mol) {