git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10891 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-10-30 14:49:31 +00:00
parent 166d6df67e
commit ee61fe3043
3 changed files with 26 additions and 1 deletions

View File

@ -540,7 +540,8 @@ int DumpCustom::count()
tagint *image = atom->image;
double yprd = domain->yprd;
for (i = 0; i < nlocal; i++)
dchoose[i] = x[i][1] + ((image[i] >> IMGBITS & IMGMASK) - IMGMAX) * yprd;
dchoose[i] = x[i][1] +
((image[i] >> IMGBITS & IMGMASK) - IMGMAX) * yprd;
ptr = dchoose;
nstride = 1;
} else if (thresh_array[ithresh] == ZU) {

View File

@ -20,6 +20,8 @@
#include "force.h"
#include "update.h"
#include "respa.h"
#include "modify.h"
#include "comm.h"
#include "error.h"
using namespace LAMMPS_NS;
@ -65,6 +67,14 @@ void FixNVELimit::init()
if (strstr(update->integrate_style,"respa"))
step_respa = ((Respa *) update->integrate)->step;
// warn if using fix shake, which will lead to invalid constraint forces
for (int i = 0; i < modify->nfix; i++)
if (strcmp(modify->fix[i]->style,"shake") == 0) {
if (comm->me == 0)
error->warning(FLERR,"Should not use fix nve/limit with fix shake");
}
}
/* ----------------------------------------------------------------------

View File

@ -674,6 +674,20 @@ void Set::set(int keyword)
atom->angmom[i][2] = zvalue;
}
// reset any or all of 3 image flags
else if (keyword == IMAGE) {
int xbox = (atom->image[i] & IMGMASK) - IMGMAX;
int ybox = (atom->image[i] >> IMGBITS & IMGMASK) - IMGMAX;
int zbox = (atom->image[i] >> IMG2BITS) - IMGMAX;
if (ximageflag) xbox = ximage;
if (yimageflag) ybox = yimage;
if (zimageflag) zbox = zimage;
atom->image[i] = ((tagint) (xbox + IMGMAX) & IMGMASK) |
(((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) |
(((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS);
}
// set value for custom integer or double vector
else if (keyword == INAME) {