git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10811 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -40,7 +40,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
// also in reader_native.cpp
|
// also in reader_native.cpp
|
||||||
|
|
||||||
enum{ID,TYPE,X,Y,Z,VX,VY,VZ,IX,IY,IZ};
|
enum{ID,TYPE,X,Y,Z,VX,VY,VZ,Q,IX,IY,IZ};
|
||||||
enum{UNSET,NOSCALE_NOWRAP,NOSCALE_WRAP,SCALE_NOWRAP,SCALE_WRAP};
|
enum{UNSET,NOSCALE_NOWRAP,NOSCALE_WRAP,SCALE_NOWRAP,SCALE_WRAP};
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -589,6 +589,11 @@ int ReadDump::fields_and_keywords(int narg, char **arg)
|
|||||||
else if (strcmp(arg[iarg],"vx") == 0) fieldtype[nfield++] = VX;
|
else if (strcmp(arg[iarg],"vx") == 0) fieldtype[nfield++] = VX;
|
||||||
else if (strcmp(arg[iarg],"vy") == 0) fieldtype[nfield++] = VY;
|
else if (strcmp(arg[iarg],"vy") == 0) fieldtype[nfield++] = VY;
|
||||||
else if (strcmp(arg[iarg],"vz") == 0) fieldtype[nfield++] = VZ;
|
else if (strcmp(arg[iarg],"vz") == 0) fieldtype[nfield++] = VZ;
|
||||||
|
else if (strcmp(arg[iarg],"q") == 0) {
|
||||||
|
if (!atom->q_flag)
|
||||||
|
error->all(FLERR,"Read dump of atom property that isn't allocated");
|
||||||
|
fieldtype[nfield++] = Q;
|
||||||
|
}
|
||||||
else if (strcmp(arg[iarg],"ix") == 0) fieldtype[nfield++] = IX;
|
else if (strcmp(arg[iarg],"ix") == 0) fieldtype[nfield++] = IX;
|
||||||
else if (strcmp(arg[iarg],"iy") == 0) fieldtype[nfield++] = IY;
|
else if (strcmp(arg[iarg],"iy") == 0) fieldtype[nfield++] = IY;
|
||||||
else if (strcmp(arg[iarg],"iz") == 0) fieldtype[nfield++] = IZ;
|
else if (strcmp(arg[iarg],"iz") == 0) fieldtype[nfield++] = IZ;
|
||||||
@ -710,6 +715,7 @@ void ReadDump::process_atoms(int n)
|
|||||||
|
|
||||||
double **x = atom->x;
|
double **x = atom->x;
|
||||||
double **v = atom->v;
|
double **v = atom->v;
|
||||||
|
double *q = atom->q;
|
||||||
tagint *image = atom->image;
|
tagint *image = atom->image;
|
||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
int map_tag_max = atom->map_tag_max;
|
int map_tag_max = atom->map_tag_max;
|
||||||
@ -754,6 +760,9 @@ void ReadDump::process_atoms(int n)
|
|||||||
case VX:
|
case VX:
|
||||||
v[m][0] = fields[i][ifield];
|
v[m][0] = fields[i][ifield];
|
||||||
break;
|
break;
|
||||||
|
case Q:
|
||||||
|
q[m] = fields[i][ifield];
|
||||||
|
break;
|
||||||
case VY:
|
case VY:
|
||||||
v[m][1] = fields[i][ifield];
|
v[m][1] = fields[i][ifield];
|
||||||
break;
|
break;
|
||||||
@ -831,6 +840,7 @@ void ReadDump::process_atoms(int n)
|
|||||||
nadd++;
|
nadd++;
|
||||||
|
|
||||||
v = atom->v;
|
v = atom->v;
|
||||||
|
q = atom->q;
|
||||||
image = atom->image;
|
image = atom->image;
|
||||||
|
|
||||||
// set atom attributes from other dump file fields
|
// set atom attributes from other dump file fields
|
||||||
@ -848,6 +858,9 @@ void ReadDump::process_atoms(int n)
|
|||||||
case VZ:
|
case VZ:
|
||||||
v[m][2] = fields[i][ifield];
|
v[m][2] = fields[i][ifield];
|
||||||
break;
|
break;
|
||||||
|
case Q:
|
||||||
|
q[m] = fields[i][ifield];
|
||||||
|
break;
|
||||||
case IX:
|
case IX:
|
||||||
xbox = static_cast<int> (fields[i][ifield]);
|
xbox = static_cast<int> (fields[i][ifield]);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
// also in read_dump.cpp
|
// also in read_dump.cpp
|
||||||
|
|
||||||
enum{ID,TYPE,X,Y,Z,VX,VY,VZ,IX,IY,IZ};
|
enum{ID,TYPE,X,Y,Z,VX,VY,VZ,Q,IX,IY,IZ};
|
||||||
enum{UNSET,NOSCALE_NOWRAP,NOSCALE_WRAP,SCALE_NOWRAP,SCALE_WRAP};
|
enum{UNSET,NOSCALE_NOWRAP,NOSCALE_WRAP,SCALE_NOWRAP,SCALE_WRAP};
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -247,6 +247,10 @@ bigint ReaderNative::read_header(double box[3][3], int &triclinic,
|
|||||||
fieldindex[i] = find_label("vy",nwords,labels);
|
fieldindex[i] = find_label("vy",nwords,labels);
|
||||||
else if (fieldtype[i] == VZ)
|
else if (fieldtype[i] == VZ)
|
||||||
fieldindex[i] = find_label("vz",nwords,labels);
|
fieldindex[i] = find_label("vz",nwords,labels);
|
||||||
|
|
||||||
|
else if (fieldtype[i] == Q)
|
||||||
|
fieldindex[i] = find_label("q",nwords,labels);
|
||||||
|
|
||||||
else if (fieldtype[i] == IX)
|
else if (fieldtype[i] == IX)
|
||||||
fieldindex[i] = find_label("ix",nwords,labels);
|
fieldindex[i] = find_label("ix",nwords,labels);
|
||||||
else if (fieldtype[i] == IY)
|
else if (fieldtype[i] == IY)
|
||||||
|
|||||||
Reference in New Issue
Block a user