git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10984 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-11-06 15:33:13 +00:00
parent 767784895d
commit aa9502ec5a
4 changed files with 8 additions and 4 deletions

View File

@ -58,7 +58,8 @@ Angle::~Angle()
void Angle::init()
{
if (!allocated) error->all(FLERR,"Angle coeffs are not set");
if (!allocated && atom->nangletypes)
error->all(FLERR,"Angle coeffs are not set");
for (int i = 1; i <= atom->nangletypes; i++)
if (setflag[i] == 0) error->all(FLERR,"All angle coeffs are not set");

View File

@ -59,7 +59,8 @@ Bond::~Bond()
void Bond::init()
{
if (!allocated) error->all(FLERR,"Bond coeffs are not set");
if (!allocated && atom->nbondtypes)
error->all(FLERR,"Bond coeffs are not set");
for (int i = 1; i <= atom->nbondtypes; i++)
if (setflag[i] == 0) error->all(FLERR,"All bond coeffs are not set");
init_style();

View File

@ -59,7 +59,8 @@ Dihedral::~Dihedral()
void Dihedral::init()
{
if (!allocated) error->all(FLERR,"Dihedral coeffs are not set");
if (!allocated && atom->ndihedraltypes)
error->all(FLERR,"Dihedral coeffs are not set");
for (int i = 1; i <= atom->ndihedraltypes; i++)
if (setflag[i] == 0) error->all(FLERR,"All dihedral coeffs are not set");
init_style();

View File

@ -56,7 +56,8 @@ Improper::~Improper()
void Improper::init()
{
if (!allocated) error->all(FLERR,"Improper coeffs are not set");
if (!allocated && atom->nimpropertypes)
error->all(FLERR,"Improper coeffs are not set");
for (int i = 1; i <= atom->nimpropertypes; i++)
if (setflag[i] == 0) error->all(FLERR,"All improper coeffs are not set");
}