diff --git a/src/domain.cpp b/src/domain.cpp index 3c0273926b..c84e619cbd 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -72,6 +72,10 @@ Domain::Domain(LAMMPS *lmp) : Pointers(lmp) boundary[1][0] = boundary[1][1] = 0; boundary[2][0] = boundary[2][1] = 0; + minxlo = minxhi = 0.0; + minylo = minyhi = 0.0; + minzlo = minzhi = 0.0; + triclinic = 0; tiltsmall = 1; diff --git a/src/read_restart.cpp b/src/read_restart.cpp index e2e2a264fb..1b4caacbd2 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -60,7 +60,7 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT, SPECIAL_LJ,SPECIAL_COUL, MASS,PAIR,BOND,ANGLE,DIHEDRAL,IMPROPER, MULTIPROC,MPIIO,PROCSPERFILE,PERPROC, - IMAGEINT}; + IMAGEINT,BOUNDMIN}; #define LB_FACTOR 1.1 @@ -794,6 +794,14 @@ void ReadRestart::header(int incompatible) domain->nonperiodic = 2; } + } else if (flag == BOUNDMIN) { + double minbound[6]; + read_int(); + read_double_vec(6,minbound); + domain->minxlo = minbound[0]; domain->minxhi = minbound[1]; + domain->minylo = minbound[2]; domain->minyhi = minbound[3]; + domain->minzlo = minbound[4]; domain->minzhi = minbound[5]; + // create new AtomVec class using any stored args } else if (flag == ATOM_STYLE) { diff --git a/src/update.cpp b/src/update.cpp index 4300a3c92e..e012449b9c 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -141,7 +141,7 @@ void Update::set_units(const char *style) force->hplanck = 95.306976368; force->mvv2e = 48.88821291 * 48.88821291; force->ftm2v = 1.0 / 48.88821291 / 48.88821291; - force->mv2d = 1.0 / 0.602214179; + force->mv2d = 1.0 / 0.602214129; force->nktv2p = 68568.415; force->qqr2e = 332.06371; force->qe2f = 23.060549; @@ -162,7 +162,7 @@ void Update::set_units(const char *style) force->hplanck = 4.135667403e-3; force->mvv2e = 1.0364269e-4; force->ftm2v = 1.0 / 1.0364269e-4; - force->mv2d = 1.0 / 0.602214179; + force->mv2d = 1.0 / 0.602214129; force->nktv2p = 1.6021765e6; force->qqr2e = 14.399645; force->qe2f = 1.0; diff --git a/src/write_restart.cpp b/src/write_restart.cpp index 83edc522fe..e74479e357 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -59,7 +59,7 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT, SPECIAL_LJ,SPECIAL_COUL, MASS,PAIR,BOND,ANGLE,DIHEDRAL,IMPROPER, MULTIPROC,MPIIO,PROCSPERFILE,PERPROC, - IMAGEINT}; + IMAGEINT,BOUNDMIN}; enum{IGNORE,WARN,ERROR}; // same as thermo.cpp @@ -454,6 +454,14 @@ void WriteRestart::header() write_int(ZPERIODIC,domain->zperiodic); write_int_vec(BOUNDARY,6,&domain->boundary[0][0]); + // added field for shrink-wrap boundaries with minimum - 2 Jul 2015 + + double minbound[6]; + minbound[0] = domain->minxlo; minbound[1] = domain->minxhi; + minbound[2] = domain->minylo; minbound[3] = domain->minyhi; + minbound[4] = domain->minzlo; minbound[5] = domain->minzhi; + write_double_vec(BOUNDMIN,6,minbound); + // write atom_style and its args write_string(ATOM_STYLE,atom->atom_style);