Handle mass better
This commit is contained in:
@ -145,6 +145,7 @@ void DumpExtXYZ::pack(tagint *ids)
|
|||||||
double **v = atom->v;
|
double **v = atom->v;
|
||||||
double **f = atom->f;
|
double **f = atom->f;
|
||||||
double *mass = atom->mass;
|
double *mass = atom->mass;
|
||||||
|
double *rmass = atom->rmass;
|
||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
|
|
||||||
m = n = 0;
|
m = n = 0;
|
||||||
@ -166,8 +167,12 @@ void DumpExtXYZ::pack(tagint *ids)
|
|||||||
buf[m++] = f[i][2];
|
buf[m++] = f[i][2];
|
||||||
}
|
}
|
||||||
if (with_mass) {
|
if (with_mass) {
|
||||||
|
if (rmass) {
|
||||||
|
buf[m++] = rmass[i];
|
||||||
|
} else {
|
||||||
buf[m++] = mass[type[i]];
|
buf[m++] = mass[type[i]];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ids) ids[n++] = tag[i];
|
if (ids) ids[n++] = tag[i];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user