diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index 56282052c4..336fbed5b0 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -330,14 +330,14 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) : int flag; index[i] = atom->find_custom(&arg[iarg][2],flag); if (index[i] < 0 || flag != 0) - error->all(FLERR,"Compute property/atom floating point " + error->all(FLERR,"Compute property/atom integer " "vector does not exist"); pack_choice[i] = &ComputePropertyAtom::pack_iname; } else if (strstr(arg[iarg],"d_") == arg[iarg]) { int flag; index[i] = atom->find_custom(&arg[iarg][2],flag); if (index[i] < 0 || flag != 1) - error->all(FLERR,"Compute property/atom integer " + error->all(FLERR,"Compute property/atom floating point " "vector does not exist"); pack_choice[i] = &ComputePropertyAtom::pack_dname; diff --git a/src/molecule.cpp b/src/molecule.cpp index 7ca3a6ff55..f72bebe802 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -1129,8 +1129,8 @@ void Molecule::allocate() if (radiusflag) memory->create(radius,natoms,"molecule:radius"); if (rmassflag) memory->create(rmass,natoms,"molecule:rmass"); - // always allocate num_bond,num_angle,etc and nspecial even if not in file - // initialize to 0 even if not in molecule file + // always allocate num_bond,num_angle,etc and special+nspecial + // even if not in molecule file, initialize to 0 // this is so methods that use these arrays don't have to check they exist memory->create(num_bond,natoms,"molecule:num_bond"); @@ -1141,8 +1141,10 @@ void Molecule::allocate() for (int i = 0; i < natoms; i++) num_dihedral[i] = 0; memory->create(num_improper,natoms,"molecule:num_improper"); for (int i = 0; i < natoms; i++) num_improper[i] = 0; + + memory->create(special,natoms,maxspecial,"molecule:special"); memory->create(nspecial,natoms,3,"molecule:nspecial"); - for (int i = 0; i < natoms; i++) + for (int i = 0; i < natoms; i++) nspecial[i][0] = nspecial[i][1] = nspecial[i][2] = 0; if (bondflag) { @@ -1189,9 +1191,6 @@ void Molecule::allocate() "molecule:improper_atom4"); } - if (specialflag) - memory->create(special,natoms,maxspecial,"molecule:special"); - if (shakeflag) { memory->create(shake_flag,natoms,"molecule:shake_flag"); memory->create(shake_atom,natoms,4,"molecule:shake_flag");