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

add check to require atom attribute molecule to avoid segfaults, when it is missing

parent 48e42a4e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -231,6 +231,8 @@ void PairCoulShield::init_style()
{
  if (!atom->q_flag)
    error->all(FLERR,"Pair style coul/shield requires atom attribute q");
  if (!atom->molecule_flag)
    error->all(FLERR,"Pair style coul/shield requires atom attribute molecule");

  neighbor->request(this,instance_me);
}
+3 −1
Original line number Diff line number Diff line
@@ -636,7 +636,9 @@ void PairILPGrapheneHBN::calc_normal()
void PairILPGrapheneHBN::init_style()
{
  if (force->newton_pair == 0)
    error->all(FLERR,"Pair style ILP requires newton pair on");
    error->all(FLERR,"Pair style ilp/graphene/hbn requires newton pair on");
  if (!atom->molecule_flag)
    error->all(FLERR,"Pair style ilp/graphene/hbn requires atom attribute molecule");

  // need a full neighbor list, including neighbors of ghosts

+3 −1
Original line number Diff line number Diff line
@@ -640,7 +640,9 @@ void PairKolmogorovCrespiFull::calc_normal()
void PairKolmogorovCrespiFull::init_style()
{
  if (force->newton_pair == 0)
    error->all(FLERR,"Pair style KC requires newton pair on");
    error->all(FLERR,"Pair style kolmolgorov/crespi/full requires newton pair on");
  if (!atom->molecule_flag)
    error->all(FLERR,"Pair style kolmolgorov/crespi/full requires atom attribute molecule");

  // need a full neighbor list, including neighbors of ghosts