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

This commit is contained in:
sjplimp 2014-04-11 14:41:25 +00:00
parent 9065c2c612
commit 1b6af8196f
11 changed files with 56 additions and 38 deletions

View File

@ -127,7 +127,7 @@ void ComputeTI::init()
for (int m = 0; m < nterms; m++) {
ivar1[m] = input->variable->find(var1[m]);
ivar2[m] = input->variable->find(var2[m]);
if (ivar1[m] < 0 || ivar2 < 0)
if (ivar1[m] < 0 || ivar2[m] < 0)
error->all(FLERR,"Variable name for compute ti does not exist");
if (!input->variable->equalstyle(ivar1[m]) ||
!input->variable->equalstyle(ivar2[m]))
@ -185,7 +185,7 @@ double ComputeTI::compute_scalar()
double *eatom = pptr[m]->eatom;
if (force->newton) npair += atom->nghost;
if (force->newton_pair) npair += atom->nghost;
for (int i = 0; i < npair; i++)
if ((ilo[m]<=type[i])&(ihi[m]>=type[i])) eng += eatom[i];
MPI_Allreduce(&eng,&engall,1,MPI_DOUBLE,MPI_SUM,world);

View File

@ -73,7 +73,7 @@ support = ["Makefile","Make.sh","Makefile.package.empty",
extlibs = {"USER-ATC": "atc", "USER-AWPMD": "awpmd", "USER-COLVARS": "colvars",
"USER-CUDA": "cuda","GPU": "gpu","MEAM": "meam", "POEMS": "poems",
"REAX": "reax"}
"USER-QMMM": "qmmm", "REAX": "reax"}
# help messages

View File

@ -22,7 +22,7 @@ PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \
user-omp user-phonon user-qmmm user-reaxc user-sph
PACKLIB = gpu kim meam poems reax voronoi \
user-atc user-awpmd user-colvars user-cuda user-molfile
user-atc user-awpmd user-colvars user-qmmm user-cuda user-molfile
PACKALL = $(PACKAGE) $(PACKUSER)
@ -50,7 +50,7 @@ help:
@echo 'make install-python install LAMMPS wrapper in Python'
@echo ''
@echo 'make package list available packages'
@echo 'make package-status status of all packages'
@echo 'make package-status (ps) status of all packages'
@echo 'make yes-package install a single package in src dir'
@echo 'make no-package remove a single package from src dir'
@echo 'make yes-all install all packages in src dir'
@ -61,9 +61,9 @@ help:
@echo 'make no-user remove all user packages'
@echo 'make no-lib remove all packages with external libs'
@echo ''
@echo 'make package-update replace src files with package files'
@echo 'make package-update (pu) replace src files with updated package files'
@echo 'make package-overwrite replace package files with src files'
@echo 'make package-diff diff src files against package files'
@echo 'make package-diff (pd) diff src files against package files'
@echo ''
@echo 'make machine build LAMMPS where machine is one of:'
@echo ''
@ -108,18 +108,18 @@ purge: Purge.list
# Create a tarball of src dir and packages
tar:
@cd STUBS; make clean
@cd STUBS; $(MAKE) clean
@cd ..; tar cvzf src/$(ROOT)_src.tar.gz \
src/Make* src/Package.sh src/MAKE src/*.cpp src/*.h src/STUBS \
$(patsubst %,src/%,$(PACKAGEUC)) $(patsubst %,src/%,$(PACKUSERUC)) \
--exclude=*/.svn
@cd STUBS; make
@cd STUBS; $(MAKE)
@echo "Created $(ROOT)_src.tar.gz"
# Make MPI STUBS library
stubs:
@cd STUBS; make clean; make
@cd STUBS; $(MAKE) clean; $(MAKE)
# Create Makefile.lib, Makefile.shlib, and Makefile.list

View File

@ -54,7 +54,7 @@ void FixQEQCombOMP::init()
if (!atom->q_flag)
error->all(FLERR,"Fix qeq/comb/omp requires atom attribute q");
if (NULL == force->pair_match("comb3",0))
if (NULL != force->pair_match("comb3",0))
error->all(FLERR,"No support for comb3 currently available in USER-OMP");
comb = (PairComb *) force->pair_match("comb/omp",1);
@ -79,10 +79,6 @@ void FixQEQCombOMP::init()
}
int irequest = neighbor->request(this);
neighbor->requests[irequest]->pair = 0;
neighbor->requests[irequest]->fix = 1;
neighbor->requests[irequest]->half = 0;
neighbor->requests[irequest]->full = 1;
neighbor->requests[irequest]->omp = use_omp;
}

View File

@ -255,7 +255,7 @@ void Neighbor::full_bin_omp(NeighList *list)
{
// bin owned & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -367,7 +367,7 @@ void Neighbor::full_bin_ghost_omp(NeighList *list)
{
// bin owned & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = atom->nlocal;
const int nall = nlocal + atom->nghost;
@ -510,7 +510,7 @@ void Neighbor::full_multi_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;

View File

@ -96,7 +96,7 @@ void Neighbor::granular_nsq_no_newton_omp(NeighList *list)
touchptr = ipage_touch->vget();
shearptr = dpage_shear->vget();
}
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
@ -271,7 +271,7 @@ void Neighbor::granular_bin_no_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
@ -424,7 +424,7 @@ void Neighbor::granular_bin_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
@ -533,7 +533,7 @@ void Neighbor::granular_bin_newton_tri_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;

View File

@ -35,7 +35,7 @@ void Neighbor::half_bin_no_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -152,7 +152,7 @@ void Neighbor::half_bin_no_newton_ghost_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = atom->nlocal;
const int nall = nlocal + atom->nghost;
@ -299,7 +299,7 @@ void Neighbor::half_bin_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -447,7 +447,7 @@ void Neighbor::half_bin_newton_tri_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;

View File

@ -36,7 +36,7 @@ void Neighbor::half_multi_no_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -158,7 +158,7 @@ void Neighbor::half_multi_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -314,7 +314,7 @@ void Neighbor::half_multi_newton_tri_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;

View File

@ -143,7 +143,7 @@ void Neighbor::respa_nsq_no_newton_omp(NeighList *list)
tag[j]-tagprev);
else which = 0;
if (which == 0) neighptr[n++] = j;
else if (minchange = domain->minimum_image_check(delx,dely,delz))
else if ((minchange = domain->minimum_image_check(delx,dely,delz)))
neighptr[n++] = j;
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
} else neighptr[n++] = j;
@ -328,7 +328,7 @@ void Neighbor::respa_nsq_newton_omp(NeighList *list)
tag[j]-tagprev);
else which = 0;
if (which == 0) neighptr[n++] = j;
else if (minchange = domain->minimum_image_check(delx,dely,delz))
else if ((minchange = domain->minimum_image_check(delx,dely,delz)))
neighptr[n++] = j;
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
} else neighptr[n++] = j;
@ -390,7 +390,7 @@ void Neighbor::respa_bin_no_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -506,7 +506,7 @@ void Neighbor::respa_bin_no_newton_omp(NeighList *list)
tag[j]-tagprev);
else which = 0;
if (which == 0) neighptr[n++] = j;
else if (minchange = domain->minimum_image_check(delx,dely,delz))
else if ((minchange = domain->minimum_image_check(delx,dely,delz)))
neighptr[n++] = j;
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
} else neighptr[n++] = j;
@ -569,7 +569,7 @@ void Neighbor::respa_bin_newton_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -688,7 +688,7 @@ void Neighbor::respa_bin_newton_omp(NeighList *list)
tag[j]-tagprev);
else which = 0;
if (which == 0) neighptr[n++] = j;
else if (minchange = domain->minimum_image_check(delx,dely,delz))
else if ((minchange = domain->minimum_image_check(delx,dely,delz)))
neighptr[n++] = j;
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
} else neighptr[n++] = j;
@ -732,7 +732,7 @@ void Neighbor::respa_bin_newton_omp(NeighList *list)
tag[j]-tagprev);
else which = 0;
if (which == 0) neighptr[n++] = j;
else if (minchange = domain->minimum_image_check(delx,dely,delz))
else if ((minchange = domain->minimum_image_check(delx,dely,delz)))
neighptr[n++] = j;
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
} else neighptr[n++] = j;
@ -795,7 +795,7 @@ void Neighbor::respa_bin_newton_tri_omp(NeighList *list)
{
// bin local & ghost atoms
bin_atoms();
if (binatomflag) bin_atoms();
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
const int molecular = atom->molecular;
@ -919,7 +919,7 @@ void Neighbor::respa_bin_newton_tri_omp(NeighList *list)
tag[j]-tagprev);
else which = 0;
if (which == 0) neighptr[n++] = j;
else if (minchange = domain->minimum_image_check(delx,dely,delz))
else if ((minchange = domain->minimum_image_check(delx,dely,delz)))
neighptr[n++] = j;
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
} else neighptr[n++] = j;

View File

@ -337,6 +337,11 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner3z;
} else if (strcmp(arg[iarg],"nbonds") == 0) {
if (!atom->molecule_flag)
error->all(FLERR,"Compute property/atom for "
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_nbonds;
} else if (strstr(arg[iarg],"i_") == arg[iarg]) {
int flag;
index[i] = atom->find_custom(&arg[iarg][2],flag);
@ -1687,6 +1692,21 @@ void ComputePropertyAtom::pack_corner3z(int n)
/* ---------------------------------------------------------------------- */
void ComputePropertyAtom::pack_nbonds(int n)
{
int *num_bond = atom->num_bond;
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) buf[n] = num_bond[i];
else buf[n] = 0.0;
n += nvalues;
}
}
/* ---------------------------------------------------------------------- */
void ComputePropertyAtom::pack_iname(int n)
{
int *ivector = atom->ivector[index[n]];

View File

@ -121,6 +121,8 @@ class ComputePropertyAtom : public Compute {
void pack_corner3y(int);
void pack_corner3z(int);
void pack_nbonds(int);
void pack_iname(int);
void pack_dname(int);
};