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

This commit is contained in:
sjplimp 2014-01-31 14:46:30 +00:00
parent 479c7ec151
commit 823675d6be
13 changed files with 75 additions and 24 deletions

View File

@ -115,7 +115,8 @@ void BondFENEExpandOMP::eval(int nfrom, int nto, ThrData * const thr)
if (rlogarg < 0.1) {
char str[128];
sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %d %d %g",
sprintf(str,"FENE bond too long: " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " %g",
update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq));
error->warning(FLERR,str,0);

View File

@ -111,7 +111,8 @@ void BondFENEOMP::eval(int nfrom, int nto, ThrData * const thr)
if (rlogarg < 0.1) {
char str[128];
sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %d %d %g",
sprintf(str,"FENE bond too long: " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " %g",
update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq));
error->warning(FLERR,str,0);

View File

@ -172,7 +172,9 @@ void DihedralCharmmOMP::eval(int nfrom, int nto, ThrData * const thr)
if (screen) {
char str[128];
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -159,7 +159,9 @@ void DihedralCosineShiftExpOMP::eval(int nfrom, int nto, ThrData * const thr)
if (screen) {
char str[128];
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -158,7 +158,9 @@ void DihedralHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr)
if (screen) {
char str[128];
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -180,7 +180,9 @@ void DihedralMultiHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr)
int me = comm->me;
if (screen) {
char str[128];
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -188,7 +188,9 @@ void DihedralOPLSOMP::eval(int nfrom, int nto, ThrData * const thr)
if (screen) {
char str[128];
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -130,7 +130,9 @@ void ImproperCossqOMP::eval(int nfrom, int nto, ThrData * const thr)
if (screen) {
char str[128];
sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -187,7 +187,9 @@ void ImproperFourierOMP::add1_thr(const int i1,const int i2,
if (screen) {
char str[128];
sprintf(str,
"Improper problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
"Improper problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -152,7 +152,9 @@ void ImproperUmbrellaOMP::eval(int nfrom, int nto, ThrData * const thr)
if (screen) {
char str[128];
sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " %d %d %d %d",
sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT,
me,thr->get_tid(),update->ntimestep,
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
error->warning(FLERR,str,0);

View File

@ -15,6 +15,8 @@
#include "math.h"
#include "pair_hbond_dreiding_lj_omp.h"
#include "atom.h"
#include "atom_vec.h"
#include "molecule.h"
#include "comm.h"
#include "domain.h"
#include "force.h"
@ -113,7 +115,8 @@ void PairHbondDreidingLJOMP::compute(int eflag, int vflag)
template <int EVFLAG, int EFLAG, int NEWTON_PAIR>
void PairHbondDreidingLJOMP::eval(int iifrom, int iito, ThrData * const thr)
{
int i,j,k,m,ii,jj,kk,jnum,itype,jtype,ktype;
int i,j,k,m,ii,jj,kk,jnum,knum,itype,jtype,ktype,iatom,imol;
tagint tagprev;
double xtmp,ytmp,ztmp,delx,dely,delz,rsq,rsq1,rsq2,r1,r2;
double factor_hb,force_angle,force_kernel,evdwl,eng_lj;
double c,s,a,b,ac,a11,a12,a22,vx1,vx2,vy1,vy2,vz1,vz2;
@ -121,22 +124,27 @@ void PairHbondDreidingLJOMP::eval(int iifrom, int iito, ThrData * const thr)
double r2inv,r10inv;
double switch1,switch2;
int *ilist,*jlist,*numneigh,**firstneigh;
const tagint *klist;
evdwl = 0.0;
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0];
const tagint * _noalias const tag = atom->tag;
const int * _noalias const molindex = atom->molindex;
const int * _noalias const molatom = atom->molatom;
const int * _noalias const type = atom->type;
const double * _noalias const special_lj = force->special_lj;
const int * const * const nspecial = atom->nspecial;
const tagint * const * const special = atom->special;
const int molecular = atom->molecular;
Molecule * const * const onemols = atom->avec->onemols;
double fxtmp,fytmp,fztmp;
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
// ii = loop over donors
// jj = loop over acceptors
// kk = loop over hydrogens bonded to donor
@ -145,13 +153,20 @@ void PairHbondDreidingLJOMP::eval(int iifrom, int iito, ThrData * const thr)
double hbeng = 0.0;
for (ii = iifrom; ii < iito; ++ii) {
i = ilist[ii];
itype = type[i];
if (!donor[itype]) continue;
const tagint * const klist = special[i];
const int knum = nspecial[i][0];
if (molecular == 1) {
klist = special[i];
knum = nspecial[i][0];
} else {
if (molindex[i] < 0) continue;
imol = molindex[i];
iatom = molatom[i];
klist = onemols[imol]->special[iatom];
knum = onemols[imol]->nspecial[iatom][0];
tagprev = tag[i] - iatom - 1;
}
jlist = firstneigh[i];
jnum = numneigh[i];
fxtmp=fytmp=fztmp=0.0;
@ -174,7 +189,8 @@ void PairHbondDreidingLJOMP::eval(int iifrom, int iito, ThrData * const thr)
rsq = delx*delx + dely*dely + delz*delz;
for (kk = 0; kk < knum; kk++) {
k = atom->map(klist[kk]);
if (molecular == 1) k = atom->map(klist[kk]);
else k = atom->map(klist[kk]+tagprev);
if (k < 0) continue;
ktype = type[k];
m = type2param[itype][jtype][ktype];

View File

@ -15,6 +15,8 @@
#include "math.h"
#include "pair_hbond_dreiding_morse_omp.h"
#include "atom.h"
#include "atom_vec.h"
#include "molecule.h"
#include "comm.h"
#include "domain.h"
#include "force.h"
@ -113,29 +115,35 @@ void PairHbondDreidingMorseOMP::compute(int eflag, int vflag)
template <int EVFLAG, int EFLAG, int NEWTON_PAIR>
void PairHbondDreidingMorseOMP::eval(int iifrom, int iito, ThrData * const thr)
{
int i,j,k,m,ii,jj,kk,jnum,itype,jtype,ktype;
int i,j,k,m,ii,jj,kk,jnum,knum,itype,jtype,ktype,imol,iatom;
tagint tagprev;
double xtmp,ytmp,ztmp,delx,dely,delz,rsq,rsq1,rsq2,r1,r2;
double factor_hb,force_angle,force_kernel,evdwl;
double c,s,a,b,ac,a11,a12,a22,vx1,vx2,vy1,vy2,vz1,vz2;
double fi[3],fj[3],delr1[3],delr2[3];
double r,dr,dexp,eng_morse,switch1,switch2;
int *ilist,*jlist,*numneigh,**firstneigh;
const tagint *klist;
evdwl = 0.0;
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0];
const tagint * _noalias const tag = atom->tag;
const int * _noalias const type = atom->type;
const int * _noalias const molindex = atom->molindex;
const int * _noalias const molatom = atom->molatom;
const double * _noalias const special_lj = force->special_lj;
const int * const * const nspecial = atom->nspecial;
const tagint * const * const special = atom->special;
const int molecular = atom->molecular;
Molecule * const * const onemols = atom->avec->onemols;
double fxtmp,fytmp,fztmp;
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
// ii = loop over donors
// jj = loop over acceptors
// kk = loop over hydrogens bonded to donor
@ -148,9 +156,17 @@ void PairHbondDreidingMorseOMP::eval(int iifrom, int iito, ThrData * const thr)
i = ilist[ii];
itype = type[i];
if (!donor[itype]) continue;
const tagint * const klist = special[i];
const int knum = nspecial[i][0];
if (molecular == 1) {
klist = special[i];
knum = nspecial[i][0];
} else {
if (molindex[i] < 0) continue;
imol = molindex[i];
iatom = molatom[i];
klist = onemols[imol]->special[iatom];
knum = onemols[imol]->nspecial[iatom][0];
tagprev = tag[i] - iatom - 1;
}
jlist = firstneigh[i];
jnum = numneigh[i];
fxtmp=fytmp=fztmp=0.0;
@ -173,7 +189,8 @@ void PairHbondDreidingMorseOMP::eval(int iifrom, int iito, ThrData * const thr)
rsq = delx*delx + dely*dely + delz*delz;
for (kk = 0; kk < knum; kk++) {
k = atom->map(klist[kk]);
if (molecular == 1) k = atom->map(klist[kk]);
else k = atom->map(klist[kk]+tagprev);
if (k < 0) continue;
ktype = type[k];
m = type2param[itype][jtype][ktype];

View File

@ -62,7 +62,7 @@ class AtomVecMeso : public AtomVec {
bigint memory_usage();
private:
int *tag;
tagint *tag;
int *type,*mask;
imageint *image;
double **x,**v,**f;