forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10811 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
7a583cef49
commit
6a189f3188
|
@ -40,7 +40,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
// 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};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@ -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],"vy") == 0) fieldtype[nfield++] = VY;
|
||||
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],"iy") == 0) fieldtype[nfield++] = IY;
|
||||
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 **v = atom->v;
|
||||
double *q = atom->q;
|
||||
tagint *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
int map_tag_max = atom->map_tag_max;
|
||||
|
@ -754,6 +760,9 @@ void ReadDump::process_atoms(int n)
|
|||
case VX:
|
||||
v[m][0] = fields[i][ifield];
|
||||
break;
|
||||
case Q:
|
||||
q[m] = fields[i][ifield];
|
||||
break;
|
||||
case VY:
|
||||
v[m][1] = fields[i][ifield];
|
||||
break;
|
||||
|
@ -831,6 +840,7 @@ void ReadDump::process_atoms(int n)
|
|||
nadd++;
|
||||
|
||||
v = atom->v;
|
||||
q = atom->q;
|
||||
image = atom->image;
|
||||
|
||||
// set atom attributes from other dump file fields
|
||||
|
@ -848,6 +858,9 @@ void ReadDump::process_atoms(int n)
|
|||
case VZ:
|
||||
v[m][2] = fields[i][ifield];
|
||||
break;
|
||||
case Q:
|
||||
q[m] = fields[i][ifield];
|
||||
break;
|
||||
case IX:
|
||||
xbox = static_cast<int> (fields[i][ifield]);
|
||||
break;
|
||||
|
|
|
@ -24,7 +24,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
// 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};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@ -247,6 +247,10 @@ bigint ReaderNative::read_header(double box[3][3], int &triclinic,
|
|||
fieldindex[i] = find_label("vy",nwords,labels);
|
||||
else if (fieldtype[i] == VZ)
|
||||
fieldindex[i] = find_label("vz",nwords,labels);
|
||||
|
||||
else if (fieldtype[i] == Q)
|
||||
fieldindex[i] = find_label("q",nwords,labels);
|
||||
|
||||
else if (fieldtype[i] == IX)
|
||||
fieldindex[i] = find_label("ix",nwords,labels);
|
||||
else if (fieldtype[i] == IY)
|
||||
|
|
Loading…
Reference in New Issue