add check to require atom attribute molecule to avoid segfaults, when it is missing
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user