diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index 08d5abb58f..142a265b69 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -1258,26 +1258,8 @@ double PairBOP::sigmaBo(int itmp, int jtmp) i_tag=tag[i]; itype = map[type[i]]+1; + memset(bt_sg,0,sizeof(struct B_SG)*nb_sg); for(m=0;mme == 0 && screen) + fprintf(screen," element[%d] = %-2s, z = %g\n",i+1,elements[map[i+1]],z); + for (j = 0; j < ncoul; j++) { exp2er = exp(-2.0 * z * r); phin[j][i] = 1.0 - exp2er * (1.0 + 2.0 * z * r * (1.0 + z * r)); @@ -1432,10 +1437,12 @@ void PairComb::sm_table() } for (i = 0; i < n; i ++) { + if (map[i+1] < 0) continue; for (j = 0; j < n; j ++) { + if (map[j+1] < 0) continue; r = drin; if (j == i) { - itype = params[i].ielement; + itype = params[map[i+1]].ielement; inty = intype[itype][itype]; iparam_i = elem2param[itype][itype][itype]; z = params[iparam_i].esm1; @@ -1460,8 +1467,8 @@ void PairComb::sm_table() r += dra; } } else if (j != i) { - itype = params[i].ielement; - jtype = params[j].ielement; + itype = params[map[i+1]].ielement; + jtype = params[map[j+1]].ielement; inty = intype[itype][jtype]; iparam_ij = elem2param[itype][jtype][jtype]; ea = params[iparam_ij].esm1; diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index eda87cdc0c..0ee1913a2e 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -2441,13 +2441,17 @@ void PairComb3::tables() // direct 1/r energy with Slater 1S orbital overlap for (i = 0; i < n; i++) { + if (map[i+1] < 0) continue; r = drin - dra; - itype = i; + itype = map[i+1]; iparam_i = elem2param[itype][itype][itype]; z = params[iparam_i].esm; exp2ershift = exp(-2.0*z*rc); afbshift = -exp2ershift*(z+1.0/rc); dafbshift = exp2ershift*(2.0*z*z+2.0*z/rc+1.0/(rc*rc)); + + if (comm->me == 0 && screen) + fprintf(screen," element[%d] = %-2s, z = %g\n",i+1,elements[map[i+1]],z); for (j = 0; j < ncoul; j++) { exp2er = exp(-2.0 * z * r); @@ -2460,10 +2464,12 @@ void PairComb3::tables() } for (i = 0; i < n; i ++) { + if (map[i+1] < 0) continue; for (j = 0; j < n; j ++) { + if (map[j+1] < 0) continue; r = drin - dra; if (j == i) { - itype = i; + itype = map[i+1]; inty = intype[itype][itype]; iparam_i = elem2param[itype][itype][itype]; z = params[iparam_i].esm; @@ -2488,8 +2494,8 @@ void PairComb3::tables() r += dra; } } else if (j != i) { - itype = i; - jtype = j; + itype = map[i+1]; + jtype = map[j+1]; inty = intype[itype][jtype]; iparam_ij = elem2param[itype][jtype][jtype]; ea = params[iparam_ij].esm; diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index cdccf6ee91..99d0bb2ab5 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -304,7 +304,7 @@ void BondTable::read_table(Table *tb, char *file, char *keyword) while (1) { if (fgets(line,MAXLINE,fp) == NULL) error->one(FLERR,"Did not find keyword in table file"); - if (strspn(line," \t\n") == strlen(line)) continue; // blank line + if (strspn(line," \t\n\r") == strlen(line)) continue; // blank line if (line[0] == '#') continue; // comment char *word = strtok(line," \t\n\r"); if (strcmp(word,keyword) == 0) break; // matching keyword diff --git a/src/QEQ/fix_qeq_dynamic.cpp b/src/QEQ/fix_qeq_dynamic.cpp index 8c7e156299..42f9cd324d 100644 --- a/src/QEQ/fix_qeq_dynamic.cpp +++ b/src/QEQ/fix_qeq_dynamic.cpp @@ -160,7 +160,7 @@ void FixQEqDynamic::pre_force(int vflag) if (comm->me == 0) { if (iloop == maxiter) { char str[128]; - sprintf(str,"Charges did not converge at step "BIGINT_FORMAT + sprintf(str,"Charges did not converge at step " BIGINT_FORMAT ": %lg",update->ntimestep,enegchk); error->warning(FLERR,str); } diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index 4223aab822..4c3c6b8f20 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -250,6 +250,9 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : if (domain->dimension == 2) fflag[i][2] = tflag[i][0] = tflag[i][1] = 0.0; } + // number of linear rigid bodies is counted later + nlinear = 0; + // parse optional args int seed; @@ -687,6 +690,7 @@ void FixRigid::init() ndof += fflag[ibody][0] + fflag[ibody][1] + fflag[ibody][2]; ndof += tflag[ibody][0] + tflag[ibody][1] + tflag[ibody][2]; } + ndof -= nlinear; if (ndof > 0.0) tfactor = force->mvv2e / (ndof * force->boltz); else tfactor = 0.0; } @@ -1140,12 +1144,16 @@ int FixRigid::dof(int tgroup) // 2d body with any finite-size M should have 3 dof, remove (2N+3M) - 3 int n = 0; + nlinear = 0; if (domain->dimension == 3) { for (int ibody = 0; ibody < nbody; ibody++) if (nall[ibody]+mall[ibody] == nrigid[ibody]) { n += 3*nall[ibody] + 6*mall[ibody] - 6; if (inertia[ibody][0] == 0.0 || inertia[ibody][1] == 0.0 || - inertia[ibody][2] == 0.0) n++; + inertia[ibody][2] == 0.0) { + n++; + nlinear++; + } } } else if (domain->dimension == 2) { for (int ibody = 0; ibody < nbody; ibody++) diff --git a/src/RIGID/fix_rigid.h b/src/RIGID/fix_rigid.h index f3ba9c71ff..50314bd792 100644 --- a/src/RIGID/fix_rigid.h +++ b/src/RIGID/fix_rigid.h @@ -72,6 +72,7 @@ class FixRigid : public Fix { int dimension; // # of dimensions int nbody; // # of rigid bodies + int nlinear; // # of linear rigid bodies int *nrigid; // # of atoms in each rigid body int *mol2body; // convert mol-ID to rigid body index int *body2mol; // convert rigid body index to mol-ID diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 75a4416e8f..39d778cba5 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -58,18 +58,20 @@ FixRigidNHSmall::FixRigidNHSmall(LAMMPS *lmp, int narg, char **arg) : (p_flag[1] == 1 && p_period[1] <= 0.0) || (p_flag[2] == 1 && p_period[2] <= 0.0)) error->all(FLERR,"Fix rigid/small npt/nph period must be > 0.0"); + + dimension = domain->dimension; - if (domain->dimension == 2 && p_flag[2]) + if (dimension == 2 && p_flag[2]) error->all(FLERR,"Invalid fix rigid/small npt/nph command " "for a 2d simulation"); - if (domain->dimension == 2 && (pcouple == YZ || pcouple == XZ)) + if (dimension == 2 && (pcouple == YZ || pcouple == XZ)) error->all(FLERR,"Invalid fix rigid/small npt/nph command " "for a 2d simulation"); if (pcouple == XYZ && (p_flag[0] == 0 || p_flag[1] == 0)) error->all(FLERR,"Invalid fix rigid/small npt/nph command " "pressure settings"); - if (pcouple == XYZ && domain->dimension == 3 && p_flag[2] == 0) + if (pcouple == XYZ && dimension == 3 && p_flag[2] == 0) error->all(FLERR,"Invalid fix rigid/small npt/nph command " "pressure settings"); if (pcouple == XY && (p_flag[0] == 0 || p_flag[1] == 0)) @@ -97,12 +99,12 @@ FixRigidNHSmall::FixRigidNHSmall(LAMMPS *lmp, int narg, char **arg) : "Cannot use fix rigid/small npt/nph on a " "non-periodic dimension"); - if (pcouple == XYZ && domain->dimension == 3 && + if (pcouple == XYZ && dimension == 3 && (p_start[0] != p_start[1] || p_start[0] != p_start[2] || p_stop[0] != p_stop[1] || p_stop[0] != p_stop[2] || p_period[0] != p_period[1] || p_period[0] != p_period[2])) error->all(FLERR,"Invalid fix rigid/small npt/nph command pressure settings"); - if (pcouple == XYZ && domain->dimension == 2 && + if (pcouple == XYZ && dimension == 2 && (p_start[0] != p_start[1] || p_stop[0] != p_stop[1] || p_period[0] != p_period[1])) error->all(FLERR,"Invalid fix rigid/small npt/nph command pressure settings"); @@ -224,7 +226,6 @@ void FixRigidNHSmall::init() boltz = force->boltz; nktv2p = force->nktv2p; mvv2e = force->mvv2e; - dimension = domain->dimension; if (force->kspace) kspace_flag = 1; else kspace_flag = 0; @@ -322,7 +323,7 @@ void FixRigidNHSmall::setup(int vflag) nf_r = dimension * nlocal_body; for (int ibody = 0; ibody < nlocal_body; ibody++) { Body *b = &body[ibody]; - for (int k = 0; k < domain->dimension; k++) + for (int k = 0; k < dimension; k++) if (fabs(b->inertia[k]) < EPSILON) nf_r--; } } else if (dimension == 2) { diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index e80bf86529..1d7569bcfc 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -123,6 +123,9 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : MPI_Allreduce(&maxmol,&itmp,1,MPI_LMP_TAGINT,MPI_MAX,world); maxmol = itmp; + // number of linear molecules is counted later + nlinear = 0; + // parse optional args int seed; @@ -1028,12 +1031,16 @@ int FixRigidSmall::dof(int tgroup) double *inertia; int n = 0; + nlinear = 0; if (domain->dimension == 3) { for (int ibody = 0; ibody < nlocal_body; ibody++) { if (counts[ibody][0]+counts[ibody][1] == counts[ibody][2]) { n += 3*counts[ibody][0] + 6*counts[ibody][1] - 6; inertia = body[ibody].inertia; - if (inertia[0] == 0.0 || inertia[1] == 0.0 || inertia[2] == 0.0) n++; + if (inertia[0] == 0.0 || inertia[1] == 0.0 || inertia[2] == 0.0) { + n++; + nlinear++; + } } } } else if (domain->dimension == 2) { @@ -3404,7 +3411,7 @@ double FixRigidSmall::compute_scalar() double tall; MPI_Allreduce(&t,&tall,1,MPI_DOUBLE,MPI_SUM,world); - double tfactor = force->mvv2e / (6.0*nbody * force->boltz); + double tfactor = force->mvv2e / ((6.0*nbody - nlinear) * force->boltz); tall *= tfactor; return tall; } diff --git a/src/RIGID/fix_rigid_small.h b/src/RIGID/fix_rigid_small.h index d1305d813c..5d6c2fe363 100644 --- a/src/RIGID/fix_rigid_small.h +++ b/src/RIGID/fix_rigid_small.h @@ -81,6 +81,7 @@ class FixRigidSmall : public Fix { int setupflag; // 1 if body properties are setup, else 0 int commflag; // various modes of forward/reverse comm int nbody; // total # of rigid bodies + int nlinear; // total # of linear rigid bodies tagint maxmol; // max mol-ID double maxextent; // furthest distance from body owner to body atom diff --git a/src/USER-MISC/compute_ackland_atom.cpp b/src/USER-MISC/compute_ackland_atom.cpp index d768074aaa..064e14ef93 100644 --- a/src/USER-MISC/compute_ackland_atom.cpp +++ b/src/USER-MISC/compute_ackland_atom.cpp @@ -232,47 +232,50 @@ void ComputeAcklandAtom::compute_peratom() } } - // Deviations from the different lattice structures + if (chi[7] > 0 || n0 < 11) structure[i] = UNKNOWN; + else if (chi[0] == 7) structure[i] = BCC; + else if (chi[0] == 6) structure[i] = FCC; + else if (chi[0] == 3) structure[i] = HCP; + else { + // Deviations from the different lattice structures - double delta_bcc = 0.35*chi[4]/(double)(chi[5]+chi[6]-chi[4]); - double delta_cp = fabs(1.-(double)chi[6]/24.); - double delta_fcc = 0.61*(fabs((double)(chi[0]+chi[1]-6.))+ - (double)chi[2])/6.0; - double delta_hcp = (fabs((double)chi[0]-3.)+ - fabs((double)chi[0]+(double)chi[1]+ - (double)chi[2]+(double)chi[3]-9.0))/12.0; + double delta_cp = fabs(1.-(double)chi[6]/24.); - // Identification of the local structure according to the reference + // ensure we do not get divide by zero + // and if we will, make delta_bcc irrelevant + double delta_bcc = delta_cp + 1.0; + int chi56m4 = chi[5]+chi[6]-chi[4]; - if (chi[0] == 7) { delta_bcc = 0.; } - else if (chi[0] == 6) { delta_fcc = 0.; } - else if (chi[0] <= 3) { delta_hcp = 0.; } + // note that chi[7] presumed zero + if (chi56m4 != 0) delta_bcc = 0.35*chi[4]/(double)chi56m4; - if (chi[7] > 0.) - structure[i] = UNKNOWN; - else - if (chi[4] < 3.) - { - if (n1 > 13 || n1 < 11) - structure[i] = UNKNOWN; - else - structure[i] = ICO; - } else - if (delta_bcc <= delta_cp) - { - if (n1 < 11) - structure[i] = UNKNOWN; - else - structure[i] = BCC; - } else - if (n1 > 12 || n1 < 11) - structure[i] = UNKNOWN; - else - if (delta_fcc < delta_hcp) - structure[i] = FCC; - else - structure[i] = HCP; + double delta_fcc = 0.61*(fabs((double)(chi[0]+chi[1]-6)) + +(double)chi[2])/6.0; + double delta_hcp = (fabs((double)chi[0]-3.)+fabs((double)chi[0] + +(double)chi[1]+(double)chi[2]+(double)chi[3] + -9.0))/12.0; + + // Identification of the local structure according to the reference + + if (delta_bcc >= 0.1 && delta_cp >= 0.1 && delta_fcc >= 0.1 + && delta_hcp >= 0.1) structure[i] = UNKNOWN; + + // not part of Ackland-Jones 2006; included for backward compatibility + if (chi[4] < 3. && n1 == 12) structure[i] = ICO; + + else { + if (delta_bcc <= delta_cp && n1 > 10 && n1 < 13) structure[i] = BCC; + else { + if (n0 > 12) structure[i] = UNKNOWN; + else { + if (delta_fcc < delta_hcp) structure[i] = FCC; + else + structure[i] = HCP; + } + } + } + } } else structure[i] = 0.0; } } diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 90fca0a981..d3c88d7533 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -67,7 +67,7 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg],"zlo") == 0) newwall = ZLO; else if (strcmp(arg[iarg],"zhi") == 0) newwall = ZHI; - for (int m = 0; m < nwall; m++) + for (int m = 0; (m < nwall) && (m < 6); m++) if (newwall == wallwhich[m]) error->all(FLERR,"Wall defined twice in fix wall command"); diff --git a/src/fix_wall_reflect.cpp b/src/fix_wall_reflect.cpp index adcb893a4e..e748d7f163 100644 --- a/src/fix_wall_reflect.cpp +++ b/src/fix_wall_reflect.cpp @@ -58,7 +58,7 @@ FixWallReflect::FixWallReflect(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg],"zlo") == 0) newwall = ZLO; else if (strcmp(arg[iarg],"zhi") == 0) newwall = ZHI; - for (int m = 0; m < nwall; m++) + for (int m = 0; (m < nwall) && (m < 6); m++) if (newwall == wallwhich[m]) error->all(FLERR,"Wall defined twice in fix wall/reflect command"); diff --git a/src/force.cpp b/src/force.cpp index f539c6de8b..850714f828 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -106,6 +106,13 @@ Force::~Force() if (improper) delete improper; if (kspace) delete kspace; + pair = NULL; + bond = NULL; + angle = NULL; + dihedral = NULL; + improper = NULL; + kspace = NULL; + delete pair_map; } diff --git a/src/read_data.cpp b/src/read_data.cpp index 4e575a268c..65b363b167 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -1557,6 +1557,7 @@ void ReadData::open(char *file) void ReadData::parse_keyword(int first) { int eof = 0; + int done = 0; // proc 0 reads upto non-blank line plus 1 following line // eof is set to 1 if any read hits end-of-file @@ -1565,8 +1566,11 @@ void ReadData::parse_keyword(int first) if (!first) { if (fgets(line,MAXLINE,fp) == NULL) eof = 1; } - while (eof == 0 && strspn(line," \t\n\r") == strlen(line)) { - if (fgets(line,MAXLINE,fp) == NULL) eof = 1; + while (eof == 0 && done == 0) { + int blank = strspn(line," \t\n\r"); + if ((blank == strlen(line)) || (line[blank] == '#')) { + if (fgets(line,MAXLINE,fp) == NULL) eof = 1; + } else done = 1; } if (fgets(buffer,MAXLINE,fp) == NULL) eof = 1; } diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 1b4caacbd2..8b76181e4b 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -60,7 +60,9 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT, SPECIAL_LJ,SPECIAL_COUL, MASS,PAIR,BOND,ANGLE,DIHEDRAL,IMPROPER, MULTIPROC,MPIIO,PROCSPERFILE,PERPROC, - IMAGEINT,BOUNDMIN}; + IMAGEINT,BOUNDMIN,TIMESTEP, + ATOM_ID,ATOM_MAP_STYLE,ATOM_MAP_USER,ATOM_SORTFREQ,ATOM_SORTBIN, + COMM_MODE,COMM_CUTOFF,COMM_VEL}; #define LB_FACTOR 1.1 @@ -866,6 +868,27 @@ void ReadRestart::header(int incompatible) read_int(); read_double_vec(3,&force->special_coul[1]); + } else if (flag == TIMESTEP) { + update->dt = read_double(); + + } else if (flag == ATOM_ID) { + atom->tag_enable = read_int(); + } else if (flag == ATOM_MAP_STYLE) { + atom->map_style = read_int(); + } else if (flag == ATOM_MAP_USER) { + atom->map_user = read_int(); + } else if (flag == ATOM_SORTFREQ) { + atom->sortfreq = read_int(); + } else if (flag == ATOM_SORTBIN) { + atom->userbinsize = read_double(); + + } else if (flag == COMM_MODE) { + comm->mode = read_int(); + } else if (flag == COMM_CUTOFF) { + comm->cutghostuser = read_double(); + } else if (flag == COMM_VEL) { + comm->ghost_velocity = read_int(); + } else error->all(FLERR,"Invalid flag in header section of restart file"); flag = read_int(); diff --git a/src/thermo.cpp b/src/thermo.cpp index 642453fe80..ee7ab0fa76 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -306,7 +306,7 @@ void Thermo::compute(int flag) // check for lost atoms // turn off normflag if natoms = 0 to avoid divide by 0 - natoms = lost_check(); + natoms = atom->natoms = lost_check(); if (natoms == 0) normflag = 0; else normflag = normvalue; @@ -380,11 +380,8 @@ bigint Thermo::lost_check() if (ntotal == atom->natoms) return ntotal; // if not checking or already warned, just return - // reset total atom count - if (lostflag == IGNORE) return ntotal; if (lostflag == WARN && lostbefore == 1) { - atom->natoms = ntotal; return ntotal; } @@ -552,7 +549,7 @@ void Thermo::modify_params(int narg, char **arg) format_float_user = new char[n]; strcpy(format_float_user,arg[iarg+2]); } else { - int i = atoi(arg[iarg+1]) - 1; + int i = force->inumeric(FLERR,arg[iarg+1]) - 1; if (i < 0 || i >= nfield_initial) error->all(FLERR,"Illegal thermo_modify command"); if (format_user[i]) delete [] format_user[i]; diff --git a/src/write_data.cpp b/src/write_data.cpp index 03faf0249d..2bf1ad84f8 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -73,6 +73,7 @@ void WriteData::command(int narg, char **arg) // noinit is a hidden arg, only used by -r command-line switch pairflag = II; + coeffflag = 1; int noinit = 0; int iarg = 1; @@ -86,6 +87,9 @@ void WriteData::command(int narg, char **arg) } else if (strcmp(arg[iarg],"noinit") == 0) { noinit = 1; iarg++; + } else if (strcmp(arg[iarg],"nocoeff") == 0) { + coeffflag = 0; + iarg++; } else error->all(FLERR,"Illegal write_data command"); } @@ -176,7 +180,7 @@ void WriteData::write(char *file) if (me == 0) { header(); type_arrays(); - force_fields(); + if (coeffflag) force_fields(); } // per atom info diff --git a/src/write_data.h b/src/write_data.h index 66f8d42bc2..8a4fdfac4c 100644 --- a/src/write_data.h +++ b/src/write_data.h @@ -34,6 +34,7 @@ class WriteData : protected Pointers { private: int me,nprocs; int pairflag; + int coeffflag; FILE *fp; bigint nbonds_local,nbonds; bigint nangles_local,nangles; diff --git a/src/write_dump.cpp b/src/write_dump.cpp index e4810cea12..e906e23007 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -22,6 +22,8 @@ #include "dump_image.h" #include "atom.h" #include "group.h" +#include "input.h" +#include "update.h" #include "error.h" using namespace LAMMPS_NS; @@ -75,6 +77,9 @@ void WriteDump::command(int narg, char **arg) if (strcmp(arg[1],"cfg") == 0) ((DumpCFG *) dump)->multifile_override = 1; + if (update->first_update == 0) + error->warning(FLERR,"Calling write_dump before a full system init."); + dump->init(); dump->write(); diff --git a/src/write_dump.h b/src/write_dump.h index 3441205a9d..18fff6345b 100644 --- a/src/write_dump.h +++ b/src/write_dump.h @@ -47,4 +47,12 @@ E: Unknown dump style The choice of dump style is unknown. +W: Calling write_dump before a full system init. + +The write_dump command is used before the system has been fully +initialized as part of a 'run' or 'minimize' command. Not all dump +styles and features are fully supported at this point and thus the +command may fail or produce incomplete or incorrect output. Insert +a "run 0" command, if a full system init is required. + */ diff --git a/src/write_restart.cpp b/src/write_restart.cpp index e74479e357..d891a7f782 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -59,7 +59,9 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT, SPECIAL_LJ,SPECIAL_COUL, MASS,PAIR,BOND,ANGLE,DIHEDRAL,IMPROPER, MULTIPROC,MPIIO,PROCSPERFILE,PERPROC, - IMAGEINT,BOUNDMIN}; + IMAGEINT,BOUNDMIN,TIMESTEP, + ATOM_ID,ATOM_MAP_STYLE,ATOM_MAP_USER,ATOM_SORTFREQ,ATOM_SORTBIN, + COMM_MODE,COMM_CUTOFF,COMM_VEL}; enum{IGNORE,WARN,ERROR}; // same as thermo.cpp @@ -497,6 +499,18 @@ void WriteRestart::header() write_double_vec(SPECIAL_LJ,3,&force->special_lj[1]); write_double_vec(SPECIAL_COUL,3,&force->special_coul[1]); + write_double(TIMESTEP,update->dt); + + write_int(ATOM_ID,atom->tag_enable); + write_int(ATOM_MAP_STYLE,atom->map_style); + write_int(ATOM_MAP_USER,atom->map_user); + write_int(ATOM_SORTFREQ,atom->sortfreq); + write_double(ATOM_SORTBIN,atom->userbinsize); + + write_int(COMM_MODE,comm->mode); + write_double(COMM_CUTOFF,comm->cutghostuser); + write_int(COMM_VEL,comm->ghost_velocity); + // -1 flag signals end of header int flag = -1;