diff --git a/src/MOLECULE/fix_bond_swap.cpp b/src/MOLECULE/fix_bond_swap.cpp index 42f5366b521cf76ae168ab28f771ec2d92a758f7..36bd71de53de666471081f6fe7a6469e73a826fa 100644 --- a/src/MOLECULE/fix_bond_swap.cpp +++ b/src/MOLECULE/fix_bond_swap.cpp @@ -122,6 +122,9 @@ void FixBondSwap::init() if (force->pair == NULL || force->bond == NULL) error->all("Fix bond/swap requires pair and bond styles"); + if (force->angle == NULL && atom->nangles > 0 && comm->me == 0) + error->warning("Fix bond/swap will ignore defined angles"); + if (force->dihedral || force->improper) error->all("Fix bond/swap cannot use dihedral or improper styles"); diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 52bec4155d902f0fbeb180e410d7c24da6257631..e2fe51d4c4d104209f50a2bf07dd7a4e0fe5f923 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -994,10 +994,10 @@ void Neighbor::build() (this->*pair_build[blist[i]])(lists[blist[i]]); if (atom->molecular) { - if (atom->nbonds) (this->*bond_build)(); - if (atom->nangles) (this->*angle_build)(); - if (atom->ndihedrals) (this->*dihedral_build)(); - if (atom->nimpropers) (this->*improper_build)(); + if (force->bond) (this->*bond_build)(); + if (force->angle) (this->*angle_build)(); + if (force->dihedral) (this->*dihedral_build)(); + if (force->improper) (this->*improper_build)(); } }