git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12615 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -330,14 +330,14 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
int flag;
|
int flag;
|
||||||
index[i] = atom->find_custom(&arg[iarg][2],flag);
|
index[i] = atom->find_custom(&arg[iarg][2],flag);
|
||||||
if (index[i] < 0 || flag != 0)
|
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");
|
"vector does not exist");
|
||||||
pack_choice[i] = &ComputePropertyAtom::pack_iname;
|
pack_choice[i] = &ComputePropertyAtom::pack_iname;
|
||||||
} else if (strstr(arg[iarg],"d_") == arg[iarg]) {
|
} else if (strstr(arg[iarg],"d_") == arg[iarg]) {
|
||||||
int flag;
|
int flag;
|
||||||
index[i] = atom->find_custom(&arg[iarg][2],flag);
|
index[i] = atom->find_custom(&arg[iarg][2],flag);
|
||||||
if (index[i] < 0 || flag != 1)
|
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");
|
"vector does not exist");
|
||||||
pack_choice[i] = &ComputePropertyAtom::pack_dname;
|
pack_choice[i] = &ComputePropertyAtom::pack_dname;
|
||||||
|
|
||||||
|
|||||||
@ -1129,8 +1129,8 @@ void Molecule::allocate()
|
|||||||
if (radiusflag) memory->create(radius,natoms,"molecule:radius");
|
if (radiusflag) memory->create(radius,natoms,"molecule:radius");
|
||||||
if (rmassflag) memory->create(rmass,natoms,"molecule:rmass");
|
if (rmassflag) memory->create(rmass,natoms,"molecule:rmass");
|
||||||
|
|
||||||
// always allocate num_bond,num_angle,etc and nspecial even if not in file
|
// always allocate num_bond,num_angle,etc and special+nspecial
|
||||||
// initialize to 0 even if not in molecule file
|
// even if not in molecule file, initialize to 0
|
||||||
// this is so methods that use these arrays don't have to check they exist
|
// this is so methods that use these arrays don't have to check they exist
|
||||||
|
|
||||||
memory->create(num_bond,natoms,"molecule:num_bond");
|
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;
|
for (int i = 0; i < natoms; i++) num_dihedral[i] = 0;
|
||||||
memory->create(num_improper,natoms,"molecule:num_improper");
|
memory->create(num_improper,natoms,"molecule:num_improper");
|
||||||
for (int i = 0; i < natoms; i++) num_improper[i] = 0;
|
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");
|
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;
|
nspecial[i][0] = nspecial[i][1] = nspecial[i][2] = 0;
|
||||||
|
|
||||||
if (bondflag) {
|
if (bondflag) {
|
||||||
@ -1189,9 +1191,6 @@ void Molecule::allocate()
|
|||||||
"molecule:improper_atom4");
|
"molecule:improper_atom4");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (specialflag)
|
|
||||||
memory->create(special,natoms,maxspecial,"molecule:special");
|
|
||||||
|
|
||||||
if (shakeflag) {
|
if (shakeflag) {
|
||||||
memory->create(shake_flag,natoms,"molecule:shake_flag");
|
memory->create(shake_flag,natoms,"molecule:shake_flag");
|
||||||
memory->create(shake_atom,natoms,4,"molecule:shake_flag");
|
memory->create(shake_atom,natoms,4,"molecule:shake_flag");
|
||||||
|
|||||||
Reference in New Issue
Block a user