git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11775 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -337,6 +337,11 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
"atom property that isn't allocated");
|
||||
pack_choice[i] = &ComputePropertyAtom::pack_corner3z;
|
||||
|
||||
} else if (strcmp(arg[iarg],"nbonds") == 0) {
|
||||
if (!atom->molecule_flag)
|
||||
error->all(FLERR,"Compute property/atom for "
|
||||
"atom property that isn't allocated");
|
||||
pack_choice[i] = &ComputePropertyAtom::pack_nbonds;
|
||||
} else if (strstr(arg[iarg],"i_") == arg[iarg]) {
|
||||
int flag;
|
||||
index[i] = atom->find_custom(&arg[iarg][2],flag);
|
||||
@ -1687,6 +1692,21 @@ void ComputePropertyAtom::pack_corner3z(int n)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputePropertyAtom::pack_nbonds(int n)
|
||||
{
|
||||
int *num_bond = atom->num_bond;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) buf[n] = num_bond[i];
|
||||
else buf[n] = 0.0;
|
||||
n += nvalues;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputePropertyAtom::pack_iname(int n)
|
||||
{
|
||||
int *ivector = atom->ivector[index[n]];
|
||||
|
||||
Reference in New Issue
Block a user