forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6486 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
40ac5cd2fb
commit
aedbb28b6c
|
@ -340,7 +340,7 @@ void PairGayBerne::coeff(int narg, char **arg)
|
|||
|
||||
void PairGayBerne::init_style()
|
||||
{
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
// per-type shape precalculations
|
||||
// require that atom shapes are identical within each type
|
||||
|
|
|
@ -324,7 +324,7 @@ void PairRESquared::coeff(int narg, char **arg)
|
|||
|
||||
void PairRESquared::init_style()
|
||||
{
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
// per-type shape precalculations
|
||||
// require that atom shapes are identical within each type
|
||||
|
|
|
@ -251,7 +251,7 @@ void PairLJClass2CoulCut::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all("Pair style lj/class2/coul/cut requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -260,7 +260,7 @@ void PairLJClass2CoulLong::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all("Pair style lj/class2/coul/long requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
cut_coulsq = cut_coul * cut_coul;
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ void PairLubricate::compute(int eflag, int vflag)
|
|||
double vt1,vt2,vt3,w1,w2,w3,v_shear1,v_shear2,v_shear3;
|
||||
double omega_t_1,omega_t_2,omega_t_3;
|
||||
double n_cross_omega_t_1,n_cross_omega_t_2,n_cross_omega_t_3;
|
||||
double wr1,wr2,wr3,wnnr,wn1,wn2,wn3,inv_inertia;
|
||||
double wr1,wr2,wr3,wnnr,wn1,wn2,wn3;
|
||||
double P_dot_wrel_1,P_dot_wrel_2,P_dot_wrel_3;
|
||||
double a_squeeze,a_shear,a_pump,a_twist;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
@ -87,7 +87,6 @@ void PairLubricate::compute(int eflag, int vflag)
|
|||
double **omega = atom->omega;
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
double *rmass = atom->rmass;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
@ -383,7 +382,7 @@ void PairLubricate::init_style()
|
|||
if (comm->ghost_velocity == 0)
|
||||
error->all("Pair lubricate requires ghost atoms store velocity");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
// require that atom radii are identical within each type
|
||||
// require monodisperse system with same radii for all types
|
||||
|
|
|
@ -124,7 +124,7 @@ void PairYukawaColloid::init_style()
|
|||
if (!atom->sphere_flag)
|
||||
error->all("Pair yukawa/colloid requires atom style sphere");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
// require that atom radii are identical within each type
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ void PairDipoleCut::init_style()
|
|||
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
|
||||
error->all("Pair dipole/cut requires atom attributes q, mu, torque");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -239,7 +239,6 @@ void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **f = atom->f;
|
||||
double **tor = atom->torque;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -184,7 +184,6 @@ void PairLJ96CutGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -238,7 +238,6 @@ void PairLJCharmmCoulLongGPU::cpu_compute(int start, int inum, int eflag,
|
|||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
|
|
@ -202,7 +202,7 @@ void PairLJClass2CoulLongGPU::cpu_compute(int start, int inum, int eflag,
|
|||
int vflag, int *ilist, int *numneigh,
|
||||
int **firstneigh)
|
||||
{
|
||||
int i,j,ii,jj,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
|
||||
double rsq,r,rinv,r2inv,r3inv,r6inv,forcecoul,forcelj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
|
@ -215,7 +215,6 @@ void PairLJClass2CoulLongGPU::cpu_compute(int start, int inum, int eflag,
|
|||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
|
|
@ -181,7 +181,6 @@ void PairLJClass2GPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -197,10 +197,8 @@ void PairLJCutCoulCutGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -223,7 +223,6 @@ void PairLJCutCoulLongGPU::cpu_compute(int start, int inum, int eflag,
|
|||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
|
|
@ -183,7 +183,6 @@ void PairLJCutGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -184,8 +184,6 @@ void PairLJExpandGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -181,8 +181,6 @@ void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -234,7 +234,6 @@ void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||
double **f = atom->f;
|
||||
double **tor = atom->torque;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
|
|
@ -355,7 +355,7 @@ void PairBornCoulLong::init_style()
|
|||
error->all("Pair style is incompatible with KSpace style");
|
||||
g_ewald = force->kspace->g_ewald;
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -332,7 +332,7 @@ void PairBuckCoulLong::init_style()
|
|||
error->all("Pair style is incompatible with KSpace style");
|
||||
g_ewald = force->kspace->g_ewald;
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -235,12 +235,10 @@ void PairCoulLong::coeff(int narg, char **arg)
|
|||
|
||||
void PairCoulLong::init_style()
|
||||
{
|
||||
int i,j;
|
||||
|
||||
if (!atom->q_flag)
|
||||
error->all("Pair style lj/cut/coul/long requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
cut_coulsq = cut_coul * cut_coul;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ SHELL = /bin/sh
|
|||
# specify flags and libraries needed for your compiler
|
||||
|
||||
CC = g++4
|
||||
CCFLAGS = -g -O
|
||||
CCFLAGS = -g -O # -Wunused
|
||||
DEPFLAGS = -M
|
||||
LINK = g++4
|
||||
LINKFLAGS = -g -O
|
||||
|
|
|
@ -127,8 +127,7 @@ void PairADP::compute(int eflag, int vflag)
|
|||
double *coeff;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double delmux,delmuy,delmuz,trdelmu,tradellam;
|
||||
double adpx,adpy,adpz,adpx2,adpy2,adpz2;
|
||||
double fx,fy,fz;
|
||||
double adpx,adpy,adpz,fx,fy,fz;
|
||||
double sumlamxx,sumlamyy,sumlamzz,sumlamyz,sumlamxz,sumlamxy;
|
||||
|
||||
evdwl = 0.0;
|
||||
|
@ -512,7 +511,7 @@ void PairADP::init_style()
|
|||
file2array();
|
||||
array2spline();
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -575,7 +574,7 @@ void PairADP::read_file(char *filename)
|
|||
|
||||
char **words = new char*[file->nelements+1];
|
||||
nwords = 0;
|
||||
char *first = strtok(line," \t\n\r\f");
|
||||
strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
|
|
@ -296,7 +296,7 @@ double PairAIREBO::init_one(int i, int j)
|
|||
|
||||
void PairAIREBO::REBO_neigh()
|
||||
{
|
||||
int i,j,ii,jj,m,n,allnum,jnum,itype,jtype;
|
||||
int i,j,ii,jj,n,allnum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,rsq,dS;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
int *neighptr;
|
||||
|
|
|
@ -114,7 +114,6 @@ void PairComb::compute(int eflag, int vflag)
|
|||
double rsq,rsq1,rsq2;
|
||||
double delr1[3],delr2[3],fi[3],fj[3],fk[3];
|
||||
double zeta_ij,prefactor;
|
||||
double fqi,fqij;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
int mr1,mr2,mr3;
|
||||
int rsc,inty;
|
||||
|
@ -143,7 +142,6 @@ void PairComb::compute(int eflag, int vflag)
|
|||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
int ntype = atom->ntypes;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
|
@ -429,7 +427,6 @@ void PairComb::settings(int narg, char **arg)
|
|||
void PairComb::coeff(int narg, char **arg)
|
||||
{
|
||||
int i,j,n;
|
||||
double r;
|
||||
|
||||
if (!allocated) allocate();
|
||||
|
||||
|
@ -1224,7 +1221,7 @@ double PairComb::comb_gijk(double costheta, Param *param)
|
|||
|
||||
return (1.0 + pow(comb_c/comb_d,2.0) -
|
||||
pow(comb_c,2.0) / (pow(comb_d,2.0) + pow(param->h - costheta,2.0)));
|
||||
};
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
@ -1346,7 +1343,6 @@ void PairComb::sm_table()
|
|||
double exp2ear,exp2ebr,exp2earsh,exp2ebrsh,fafbsh,dfafbsh;
|
||||
|
||||
int n = atom->ntypes;
|
||||
int *type = atom->type;
|
||||
|
||||
dra = 0.001; // lookup table step size
|
||||
drin = 0.1; // starting distance of 1/r
|
||||
|
@ -1498,7 +1494,7 @@ void PairComb::sm_table()
|
|||
|
||||
void PairComb::potal_calc(double &calc1, double &calc2, double &calc3)
|
||||
{
|
||||
double potal,alf,rcoul,fac11,fac11e,esucon;
|
||||
double alf,rcoul,esucon;
|
||||
int m;
|
||||
|
||||
rcoul = 0.0;
|
||||
|
@ -1521,7 +1517,6 @@ void PairComb::tri_point(double rsq, int &mr1, int &mr2,
|
|||
double &sr3, int &itype)
|
||||
{
|
||||
double r, rin, dr, dd, rr1, rridr, rridr2;
|
||||
int m = itype;
|
||||
|
||||
rin = 0.10; dr = 0.0010;
|
||||
r = sqrt(rsq);
|
||||
|
@ -1552,7 +1547,7 @@ void PairComb::direct(int inty, int mr1, int mr2, int mr3, double rsq,
|
|||
double potal, double fac11, double fac11e,
|
||||
double &pot_tmp, double &pot_d)
|
||||
{
|
||||
double r,erfcc,fafbn1,potij,sme2,chrij,esucon;
|
||||
double r,erfcc,fafbn1,potij,sme2,esucon;
|
||||
double r3,erfcd,dfafbn1,smf2,dvdrr,alf,alfdpi;
|
||||
|
||||
r = sqrt(rsq);
|
||||
|
@ -1620,20 +1615,17 @@ void PairComb::field(Param *param, double rsq, double iq,double jq,
|
|||
double PairComb::yasu_char(double *qf_fix, int &igroup)
|
||||
{
|
||||
int i,j,k,ii,jj,kk,jnum;
|
||||
int itag,jtag,itype,jtype,ktype,iparam_i,iparam_ij,iparam_ijk;
|
||||
double xtmp,ytmp,ztmp,evdwl,fpair;
|
||||
double rsq,rsq1,rsq2,delr1[3],delr2[3],zeta_ij;
|
||||
int itype,jtype,ktype,iparam_i,iparam_ij,iparam_ijk;
|
||||
double xtmp,ytmp,ztmp;
|
||||
double rsq1,rsq2,delr1[3],delr2[3],zeta_ij;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double iq,jq,fqi,fqj,fqij,fqjj,ecoul,yaself,yaself_d;
|
||||
double iq,jq,fqi,fqj,fqij,fqjj;
|
||||
double potal,fac11,fac11e,sr1,sr2,sr3;
|
||||
int mr1,mr2,mr3,inty;
|
||||
int zeta_flag;
|
||||
|
||||
double **x = atom->x;
|
||||
double *q = atom->q;
|
||||
int *tag = atom->tag;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
int inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
|
@ -1931,10 +1923,10 @@ void PairComb::qfo_short(Param *param, double rsq, double zeta_ij,
|
|||
10.0*QOchj*param->bB2*pow(fabs(QOchj),(10.0-2.0));
|
||||
|
||||
if (Asi > 0.0 && Asj > 0.0) caj = 1.0/(2.0*sqrt(Asi*Asj)) * romie;
|
||||
else caj == 0.0;
|
||||
else caj = 0.0;
|
||||
|
||||
if (Bsi > 0.0 && Bsj > 0.0) cbj = 1.0/(2.0*sqrt(Bsi*Bsj)) * romib ;
|
||||
else cbj == 0.0;
|
||||
else cbj = 0.0;
|
||||
|
||||
cfqr = 0.50 * tmp_fc * (1.0 + vrcs); // 0.5 b/c full atom loop
|
||||
cfqs = -0.50 * tmp_fc * bij;
|
||||
|
|
|
@ -398,7 +398,7 @@ void PairEAM::init_style()
|
|||
file2array();
|
||||
array2spline();
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -150,7 +150,7 @@ void PairEAMAlloy::read_file(char *filename)
|
|||
|
||||
char **words = new char*[file->nelements+1];
|
||||
nwords = 0;
|
||||
char *first = strtok(line," \t\n\r\f");
|
||||
strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
|
|
@ -150,7 +150,7 @@ void PairEAMFS::read_file(char *filename)
|
|||
|
||||
char **words = new char*[file->nelements+1];
|
||||
nwords = 0;
|
||||
char *first = strtok(line," \t\n\r\f");
|
||||
strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
|
|
@ -433,7 +433,7 @@ void PairEIM::init_style()
|
|||
file2array();
|
||||
array2spline();
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -709,7 +709,7 @@ double PairTersoff::ters_gijk(double costheta, Param *param)
|
|||
|
||||
return param->gamma*(1.0 + pow(ters_c/ters_d,2.0) -
|
||||
pow(ters_c,2.0) / (pow(ters_d,2.0) + pow(param->h - costheta,2.0)));
|
||||
};
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
@ -796,4 +796,4 @@ void PairTersoff::costheta_d(double *rij_hat, double rij,
|
|||
vec3_scale(1.0/rik,drk,drk);
|
||||
vec3_add(drj,drk,dri);
|
||||
vec3_scale(-1.0,dri,dri);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -117,9 +117,9 @@ PairMEAM::~PairMEAM()
|
|||
|
||||
void PairMEAM::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,n,inum_half,itype,jtype,errorflag;
|
||||
int i,j,ii,n,inum_half,errorflag;
|
||||
double evdwl;
|
||||
int *ilist_half,*jlist_half,*numneigh_half,**firstneigh_half;
|
||||
int *ilist_half,*numneigh_half,**firstneigh_half;
|
||||
int *numneigh_full,**firstneigh_full;
|
||||
|
||||
evdwl = 0.0;
|
||||
|
@ -127,8 +127,6 @@ void PairMEAM::compute(int eflag, int vflag)
|
|||
else evflag = vflag_fdotr = eflag_global = vflag_global =
|
||||
eflag_atom = vflag_atom = 0;
|
||||
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
// grow local arrays if necessary
|
||||
|
||||
if (atom->nmax > nmax) {
|
||||
|
@ -819,7 +817,7 @@ void PairMEAM::unpack_comm(int n, int first, double *buf)
|
|||
|
||||
int PairMEAM::pack_reverse_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i,k,m,last,size;
|
||||
int i,k,m,last;
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
|
|
|
@ -155,7 +155,7 @@ void FixBondBreak::init()
|
|||
|
||||
void FixBondBreak::post_integrate()
|
||||
{
|
||||
int i,j,k,m,n,i1,i2,n1,n3,possible,type;
|
||||
int i,j,k,m,n,i1,i2,n1,n3,type;
|
||||
double delx,dely,delz,rsq,min,max;
|
||||
int *slist;
|
||||
|
||||
|
@ -277,7 +277,7 @@ void FixBondBreak::post_integrate()
|
|||
// remove J from special bond list for atom I
|
||||
// atom J will also do this
|
||||
|
||||
slist = atom->special[i];
|
||||
slist = special[i];
|
||||
n1 = nspecial[i][0];
|
||||
n3 = nspecial[i][2];
|
||||
for (m = 0; m < n1; m++)
|
||||
|
|
|
@ -420,7 +420,7 @@ void FixBondCreate::post_integrate()
|
|||
// add a 1-2 neighbor to special bond list for atom I
|
||||
// atom J will also do this
|
||||
|
||||
slist = atom->special[i];
|
||||
slist = special[i];
|
||||
n1 = nspecial[i][0];
|
||||
n3 = nspecial[i][2];
|
||||
if (n3 == atom->maxspecial)
|
||||
|
|
|
@ -96,7 +96,6 @@ void PairHbondDreidingLJ::compute(int eflag, int vflag)
|
|||
int **special = atom->special;
|
||||
int *type = atom->type;
|
||||
int **nspecial = atom->nspecial;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
inum = list->inum;
|
||||
|
@ -448,7 +447,7 @@ double PairHbondDreidingLJ::single(int i, int j, int itype, int jtype,
|
|||
{
|
||||
int k,kk,ktype,knum,m;
|
||||
double eng,eng_lj,force_kernel,force_angle;
|
||||
double rsq1,rsq2,r1,r2,c,a,s,ac,r2inv,r10inv,factor_hb;
|
||||
double rsq1,rsq2,r1,r2,c,s,ac,r2inv,r10inv,factor_hb;
|
||||
double switch1,switch2;
|
||||
double delr1[3],delr2[3];
|
||||
int *klist;
|
||||
|
|
|
@ -65,7 +65,6 @@ void PairHbondDreidingMorse::compute(int eflag, int vflag)
|
|||
int **special = atom->special;
|
||||
int *type = atom->type;
|
||||
int **nspecial = atom->nspecial;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
inum = list->inum;
|
||||
|
@ -352,7 +351,7 @@ double PairHbondDreidingMorse::single(int i, int j, int itype, int jtype,
|
|||
{
|
||||
int k,kk,ktype,knum,m;
|
||||
double eng,eng_morse,force_kernel,force_angle;
|
||||
double rsq1,rsq2,r1,r2,c,a,s,ac,r,dr,dexp,factor_hb;
|
||||
double rsq1,rsq2,r1,r2,c,s,ac,r,dr,dexp,factor_hb;
|
||||
double switch1,switch2;
|
||||
double delr1[3],delr2[3];
|
||||
int *klist;
|
||||
|
|
|
@ -287,7 +287,7 @@ void PairLJCharmmCoulCharmm::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all("Pair style lj/charmm/coul/charmm requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
// require cut_lj_inner < cut_lj, cut_coul_inner < cut_coul
|
||||
|
||||
|
|
|
@ -127,8 +127,6 @@ void PairPeriLPS::compute(int eflag, int vflag)
|
|||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
double dt = update->dt;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
// need minimg() for x0 difference since not ghosted
|
||||
|
||||
|
@ -452,7 +450,7 @@ void PairPeriLPS::init_style()
|
|||
if (strcmp(modify->fix[i]->style,"PERI_NEIGH") == 0) ifix_peri = i;
|
||||
if (ifix_peri == -1) error->all("Fix peri neigh does not exist");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -389,7 +389,7 @@ void PairPeriPMB::init_style()
|
|||
if (strcmp(modify->fix[i]->style,"PERI_NEIGH") == 0) ifix_peri = i;
|
||||
if (ifix_peri == -1) error->all("Fix peri neigh does not exist");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -324,7 +324,7 @@ int FixPOEMS::setmask()
|
|||
|
||||
void FixPOEMS::init()
|
||||
{
|
||||
int i,j,ibody;
|
||||
int i,ibody;
|
||||
|
||||
// warn if more than one POEMS fix
|
||||
|
||||
|
@ -591,7 +591,7 @@ void FixPOEMS::init()
|
|||
|
||||
void FixPOEMS::setup(int vflag)
|
||||
{
|
||||
int i,j,n,ibody;
|
||||
int i,n,ibody;
|
||||
|
||||
// vcm = velocity of center-of-mass of each rigid body
|
||||
// angmom = angular momentum of each rigid body
|
||||
|
@ -708,7 +708,7 @@ void FixPOEMS::initial_integrate(int vflag)
|
|||
|
||||
void FixPOEMS::post_force(int vflag)
|
||||
{
|
||||
int i,j,ibody;
|
||||
int i,ibody;
|
||||
int xbox,ybox,zbox;
|
||||
double dx,dy,dz;
|
||||
|
||||
|
@ -823,8 +823,6 @@ void FixPOEMS::pre_neighbor() {}
|
|||
|
||||
int FixPOEMS::dof(int igroup)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
int groupbit = group->bitmask[igroup];
|
||||
|
||||
// ncount = # of atoms in each rigid body that are also in group
|
||||
|
@ -836,7 +834,7 @@ int FixPOEMS::dof(int igroup)
|
|||
int *ncount = new int[nbody];
|
||||
for (int ibody = 0; ibody < nbody; ibody++) ncount[ibody] = 0;
|
||||
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit)
|
||||
if (natom2body[i]) ncount[atom2body[i][0]]++;
|
||||
|
||||
|
@ -852,7 +850,7 @@ int FixPOEMS::dof(int igroup)
|
|||
// subtract 3 additional dof for each joint if atom is also in igroup
|
||||
|
||||
int m = 0;
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (natom2body[i] > 1 && (mask[i] & groupbit)) m += 3*(natom2body[i]-1);
|
||||
int mall;
|
||||
MPI_Allreduce(&m,&mall,1,MPI_INT,MPI_SUM,world);
|
||||
|
|
|
@ -265,7 +265,6 @@ void PairREAX::compute(int eflag, int vflag)
|
|||
|
||||
void PairREAX::write_reax_positions()
|
||||
{
|
||||
double xtmp, ytmp, ztmp;
|
||||
int j, jx, jy, jz, jia;
|
||||
|
||||
double **x = atom->x;
|
||||
|
@ -312,7 +311,6 @@ void PairREAX::write_reax_vlist()
|
|||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double delr2;
|
||||
double delx, dely, delz;
|
||||
double rtmp[3];
|
||||
|
||||
double **x = atom->x;
|
||||
int *tag = atom->tag;
|
||||
|
@ -669,7 +667,7 @@ void PairREAX::unpack_comm(int n, int first, double *buf)
|
|||
|
||||
int PairREAX::pack_reverse_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i,k,m,last,size;
|
||||
int i,m,last;
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
|
@ -683,7 +681,7 @@ int PairREAX::pack_reverse_comm(int n, int first, double *buf)
|
|||
|
||||
void PairREAX::unpack_reverse_comm(int n, int *list, double *buf)
|
||||
{
|
||||
int i,j,k,m;
|
||||
int i,j,m;
|
||||
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
|
@ -753,7 +751,6 @@ void PairREAX::compute_charge(double &energy_charge_equilibration)
|
|||
double qsum,qi;
|
||||
int nmatentries;
|
||||
double sw;
|
||||
double rtmp[3];
|
||||
int inum,jnum;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
|
@ -929,9 +926,6 @@ void PairREAX::charge_reax(const int & nlocal, const int & nghost,
|
|||
double ch[], double aval[], int acol_ind[],
|
||||
int arow_ptr[], double elcvec[])
|
||||
{
|
||||
double chpottmp, suma;
|
||||
double sumtmp;
|
||||
|
||||
cg_solve(nlocal,nghost,aval,acol_ind,arow_ptr,ch,elcvec);
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ void NEB::run()
|
|||
else color = 1;
|
||||
MPI_Comm_split(uworld,color,0,&roots);
|
||||
|
||||
int ineb,idamp;
|
||||
int ineb;
|
||||
for (ineb = 0; ineb < modify->nfix; ineb++)
|
||||
if (strcmp(modify->fix[ineb]->style,"neb") == 0) break;
|
||||
if (ineb == modify->nfix) error->all("NEB requires use of fix neb");
|
||||
|
@ -215,8 +215,6 @@ void NEB::run()
|
|||
// break induced if converged
|
||||
// damped dynamic min styles insure all replicas converge together
|
||||
|
||||
int flag,flagall;
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
|
||||
while (update->minimize->niter < n1steps) {
|
||||
|
@ -321,7 +319,6 @@ void NEB::readfile(char *file)
|
|||
double fraction = ireplica/(nreplica-1.0);
|
||||
|
||||
double **x = atom->x;
|
||||
int *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
char *buffer = new char[CHUNK*MAXLINE];
|
||||
|
|
|
@ -375,7 +375,6 @@ void FixMSST::setup(int vflag)
|
|||
// to bias initial compression
|
||||
|
||||
double **v = atom->v;
|
||||
double *mass = atom->mass;
|
||||
int *mask = atom->mask;
|
||||
double sqrt_initial_temperature_scaling = sqrt(1.0-tscale);
|
||||
|
||||
|
@ -658,9 +657,7 @@ void FixMSST::remap(int flag)
|
|||
int i,n;
|
||||
double oldlo,oldhi,ctr;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
int *mask = atom->mask;
|
||||
if (flag) n = atom->nlocal + atom->nghost;
|
||||
else n = atom->nlocal;
|
||||
|
||||
|
|
|
@ -413,7 +413,6 @@ void FixSRD::pre_neighbor()
|
|||
{
|
||||
int i,j,m,ix,iy,iz,jx,jy,jz,ibin,jbin,lo,hi;
|
||||
double rsq,cutbinsq;
|
||||
double xlamda[3];
|
||||
|
||||
// grow SRD per-atom bin arrays if necessary
|
||||
|
||||
|
@ -643,7 +642,6 @@ void FixSRD::pre_neighbor()
|
|||
void FixSRD::post_force(int vflag)
|
||||
{
|
||||
int i,m,ix,iy,iz;
|
||||
double xlamda[3];
|
||||
|
||||
// zero per-timestep stats
|
||||
|
||||
|
@ -775,7 +773,6 @@ void FixSRD::reset_velocities()
|
|||
double u[3],vave[3];
|
||||
double vx,vy,vz,vsq;
|
||||
double *vold,*vnew,*xlamda;
|
||||
double vstream[3];
|
||||
|
||||
// if requested, perform a dynamic shift
|
||||
|
||||
|
@ -2018,9 +2015,8 @@ void FixSRD::force_torque(double *vsold, double *vsnew,
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixSRD::force_wall(double *vsold, double *vsnew, int iwall)
|
||||
|
||||
{
|
||||
double dpdt[3],xs_xb[3];
|
||||
double dpdt[3];
|
||||
|
||||
double factor = mass_srd / dt_big / force->ftm2v;
|
||||
dpdt[0] = factor * (vsnew[0] - vsold[0]);
|
||||
|
@ -2411,7 +2407,6 @@ void FixSRD::big_static()
|
|||
if (avec_ellipsoid) ebonus = avec_ellipsoid->bonus;
|
||||
double *radius = atom->radius;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
int *type = atom->type;
|
||||
|
||||
double skinhalf = 0.5 * neighbor->skin;
|
||||
|
||||
|
|
|
@ -257,8 +257,6 @@ void DumpXTC::pack(int *ids)
|
|||
|
||||
void DumpXTC::write_data(int n, double *mybuf)
|
||||
{
|
||||
int j;
|
||||
|
||||
// copy buf atom coords into global array
|
||||
|
||||
int m = 0;
|
||||
|
|
|
@ -134,7 +134,6 @@ void ComputeCentroAtom::compute_peratom()
|
|||
|
||||
double **x = atom->x;
|
||||
int *mask = atom->mask;
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
double cutsq = force->pair->cutforce * force->pair->cutforce;
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
|
|
|
@ -139,7 +139,6 @@ void ComputeClusterAtom::compute_peratom()
|
|||
// then check if any proc made changes
|
||||
|
||||
double **x = atom->x;
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
|
||||
int change,done,anychange;
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ void ComputeCoordAtom::compute_peratom()
|
|||
|
||||
double **x = atom->x;
|
||||
int *mask = atom->mask;
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
|
|
|
@ -130,7 +130,6 @@ void ComputeGroupGroup::interact()
|
|||
int *type = atom->type;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
|
|
@ -123,7 +123,6 @@ int ComputePairLocal::compute_pairs(int flag)
|
|||
int *type = atom->type;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
|
|
@ -289,7 +289,6 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
|
|||
int *type = atom->type;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
|
|
@ -207,7 +207,6 @@ void ComputeRDF::compute_array()
|
|||
int *type = atom->type;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
|
|
|
@ -594,7 +594,6 @@ double ComputeReduce::compute_one(int m, int flag)
|
|||
bigint ComputeReduce::count(int m)
|
||||
{
|
||||
int vidx = value2index[m];
|
||||
int aidx = argindex[m];
|
||||
|
||||
if (which[m] == X || which[m] == V || which[m] == F)
|
||||
return group->count(igroup);
|
||||
|
|
|
@ -170,7 +170,6 @@ double ComputeReduceRegion::compute_one(int m, int flag)
|
|||
} else one = fix_vector[flag];
|
||||
} else {
|
||||
double **fix_array = fix->array_atom;
|
||||
int n = nlocal;
|
||||
int jm1 = j - 1;
|
||||
if (flag < 0) {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
|
@ -223,10 +222,6 @@ double ComputeReduceRegion::compute_one(int m, int flag)
|
|||
bigint ComputeReduceRegion::count(int m)
|
||||
{
|
||||
int n = value2index[m];
|
||||
int j = argindex[m];
|
||||
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
if (which[m] == X || which[m] == V || which[m] == F)
|
||||
return group->count(igroup,iregion);
|
||||
|
|
|
@ -244,7 +244,6 @@ void DeleteAtoms::delete_overlap(int narg, char **arg)
|
|||
int *tag = atom->tag;
|
||||
int *mask = atom->mask;
|
||||
double **x = atom->x;
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
|
|
|
@ -446,7 +446,6 @@ void DeleteBonds::command(int narg, char **arg)
|
|||
|
||||
if (comm->me == 0) {
|
||||
if (atom->avec->bonds_allow) {
|
||||
char str[128];
|
||||
if (screen) fprintf(screen,
|
||||
" " BIGINT_FORMAT " total bonds, " BIGINT_FORMAT
|
||||
" turned on, " BIGINT_FORMAT " turned off\n",
|
||||
|
|
|
@ -687,7 +687,7 @@ void Domain::closest_image(double *xi, double *xj, double *xjimage)
|
|||
} else {
|
||||
while (dy > 0.0) {
|
||||
dy -= yprd;
|
||||
dx == xy;
|
||||
dx -= xy;
|
||||
}
|
||||
if (dy < -yprd_half) {
|
||||
dy += yprd;
|
||||
|
|
|
@ -184,7 +184,6 @@ void DumpCFG::write_header(bigint n)
|
|||
void DumpCFG::write_data(int n, double *mybuf)
|
||||
{
|
||||
int i,j,m,itype;
|
||||
int tag_i,index;
|
||||
|
||||
double *rmass = atom->rmass;
|
||||
double *mass = atom->mass;
|
||||
|
|
|
@ -317,7 +317,6 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) :
|
|||
colortype = new double*[ntypes+1];
|
||||
colorelement = new double*[ntypes+1];
|
||||
|
||||
int *icolor;
|
||||
for (int i = 1; i <= ntypes; i++) {
|
||||
diamtype[i] = 1.0;
|
||||
if (i % 6 == 1) colortype[i] = color2rgb("red");
|
||||
|
@ -856,7 +855,7 @@ void DumpImage::color_minmax()
|
|||
|
||||
void DumpImage::create_image()
|
||||
{
|
||||
int i,j,k,m,itype,atom1,atom2;
|
||||
int i,j,m,itype,atom1,atom2;
|
||||
double diameter,delx,dely,delz;
|
||||
double *color,*color1,*color2;
|
||||
double xmid[3];
|
||||
|
@ -1125,7 +1124,6 @@ void DumpImage::draw_sphere(double *x, double *surfaceColor, double diameter)
|
|||
double dist = MathExtra::dot3(camPos,camDir) - MathExtra::dot3(xlocal,camDir);
|
||||
|
||||
double radius = 0.5*diameter;
|
||||
double radsq = radius*radius;
|
||||
double pixelWidth = (tanPerPixel > 0) ? tanPerPixel * dist :
|
||||
-tanPerPixel / zoom;
|
||||
double pixelRadiusFull = radius / pixelWidth;
|
||||
|
@ -1396,7 +1394,7 @@ void DumpImage::compute_SSAO()
|
|||
|
||||
// typical neighborhood value for shading
|
||||
|
||||
int x, y, s, r;
|
||||
int x,y,s;
|
||||
int hPart = height / nprocs;
|
||||
for (y = me * hPart; y < (me + 1) * hPart; y ++) {
|
||||
for (x = 0; x < width; x ++) {
|
||||
|
@ -1691,7 +1689,6 @@ int DumpImage::modify_param(int narg, char **arg)
|
|||
nentry = atoi(arg[5]);
|
||||
mentry = new MapEntry[nentry];
|
||||
int n = 6;
|
||||
int i = 0;
|
||||
for (int i = 0; i < nentry; i++) {
|
||||
if (mstyle == CONTINUOUS) {
|
||||
if (n+2 > narg) error->all("Illegal dump_modify command");
|
||||
|
@ -1732,7 +1729,6 @@ int DumpImage::modify_param(int narg, char **arg)
|
|||
if (nentry < 2) error->all("Invalid color map in dump_modify command");
|
||||
if (mentry[0].single != MINVALUE || mentry[nentry-1].single != MAXVALUE)
|
||||
error->all("Invalid color map in dump_modify command");
|
||||
if (nentry > 2) double value = mentry[1].svalue;
|
||||
for (int i = 2; i < nentry-1; i++)
|
||||
if (mentry[i].svalue <= mentry[i-1].svalue)
|
||||
error->all("Invalid color map in dump_modify command");
|
||||
|
|
|
@ -220,14 +220,12 @@ int DumpLocal::count()
|
|||
|
||||
nmine = -1;
|
||||
|
||||
int icompute;
|
||||
for (int i = 0; i < ncompute; i++) {
|
||||
if (nmine < 0) nmine = compute[i]->size_local_rows;
|
||||
else if (nmine != compute[i]->size_local_rows)
|
||||
error->one("Dump local count is not consistent across input fields");
|
||||
}
|
||||
|
||||
int ifix;
|
||||
for (int i = 0; i < nfix; i++) {
|
||||
if (nmine < 0) nmine = fix[i]->size_local_rows;
|
||||
else if (nmine != fix[i]->size_local_rows)
|
||||
|
|
|
@ -374,7 +374,7 @@ void FixAveCorrelate::setup(int vflag)
|
|||
|
||||
void FixAveCorrelate::end_of_step()
|
||||
{
|
||||
int i,j,k,m;
|
||||
int i,j,m;
|
||||
double scalar;
|
||||
|
||||
// skip if not step which requires doing something
|
||||
|
|
|
@ -364,8 +364,8 @@ double FixBoxRelax::min_energy(double *fextra)
|
|||
{
|
||||
double eng,scale,scalex,scaley,scalez,scalevol;
|
||||
|
||||
double t_current = temperature->compute_scalar();
|
||||
if (pstyle == ISO) double tmp = pressure->compute_scalar();
|
||||
temperature->compute_scalar();
|
||||
if (pstyle == ISO) pressure->compute_scalar();
|
||||
else {
|
||||
temperature->compute_vector();
|
||||
pressure->compute_vector();
|
||||
|
@ -735,7 +735,7 @@ int FixBoxRelax::modify_param(int narg, char **arg)
|
|||
|
||||
void FixBoxRelax::compute_sigma()
|
||||
{
|
||||
double pdevmod[3][3],pdeviatoric[3][3],htmp[3][3];
|
||||
double pdeviatoric[3][3],htmp[3][3];
|
||||
double tmp1[3][3],sigma_tensor[3][3],h_invtmp[3][3];
|
||||
|
||||
// reset reference box dimensions
|
||||
|
|
|
@ -307,7 +307,7 @@ void FixLangevin::post_force_no_tally()
|
|||
}
|
||||
|
||||
} else if (which == BIAS) {
|
||||
double tmp = temperature->compute_scalar();
|
||||
temperature->compute_scalar();
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
gamma1 = -rmass[i] / t_period / ftm2v;
|
||||
|
@ -352,7 +352,7 @@ void FixLangevin::post_force_no_tally()
|
|||
}
|
||||
|
||||
} else if (which == BIAS) {
|
||||
double tmp = temperature->compute_scalar();
|
||||
temperature->compute_scalar();
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
gamma1 = gfactor1[type[i]];
|
||||
|
@ -454,7 +454,7 @@ void FixLangevin::post_force_tally()
|
|||
}
|
||||
|
||||
} else if (which == BIAS) {
|
||||
double tmp = temperature->compute_scalar();
|
||||
temperature->compute_scalar();
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
gamma1 = -rmass[i] / t_period / ftm2v;
|
||||
|
@ -492,7 +492,7 @@ void FixLangevin::post_force_tally()
|
|||
}
|
||||
|
||||
} else if (which == BIAS) {
|
||||
double tmp = temperature->compute_scalar();
|
||||
temperature->compute_scalar();
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
gamma1 = gfactor1[type[i]];
|
||||
|
@ -582,7 +582,7 @@ void FixLangevin::angmom_thermostat(double tsqrt)
|
|||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double inertia[3],wbody[3],omega[3],tran[3],rot[3][3];
|
||||
double inertia[3],omega[3],tran[3];
|
||||
double *shape,*quat;
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
|
|
|
@ -225,7 +225,7 @@ int FixMinimize::unpack_exchange(int nlocal, double *buf)
|
|||
|
||||
int n = 0;
|
||||
for (m = 0; m < nvector; m++) {
|
||||
int nper = peratom[m];
|
||||
nper = peratom[m];
|
||||
ni = nper*nlocal;
|
||||
for (iper = 0; iper < nper; iper++) vectors[m][ni++] = buf[n++];
|
||||
}
|
||||
|
|
|
@ -737,10 +737,8 @@ void FixMove::final_integrate()
|
|||
else if (mstyle == ROTATE) zflag = 0;
|
||||
else if (mstyle == VARIABLE && (zvarstr || vzvarstr)) zflag = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **omega = atom->omega;
|
||||
double *rmass = atom->rmass;
|
||||
double *mass = atom->mass;
|
||||
int *type = atom->type;
|
||||
|
@ -897,7 +895,6 @@ void FixMove::set_arrays(int i)
|
|||
} else if (mstyle == WIGGLE) {
|
||||
double arg = omega_rotate * delta;
|
||||
double sine = sin(arg);
|
||||
double cosine = cos(arg);
|
||||
if (axflag) xoriginal[i][0] -= ax*sine;
|
||||
if (ayflag) xoriginal[i][1] -= ay*sine;
|
||||
if (azflag) xoriginal[i][2] -= az*sine;
|
||||
|
|
|
@ -666,7 +666,7 @@ void FixNH::setup(int vflag)
|
|||
|
||||
t_current = temperature->compute_scalar();
|
||||
if (pstat_flag) {
|
||||
if (pstyle == ISO) double tmp = pressure->compute_scalar();
|
||||
if (pstyle == ISO) pressure->compute_scalar();
|
||||
else pressure->compute_vector();
|
||||
couple();
|
||||
pressure->addstep(update->ntimestep+1);
|
||||
|
@ -741,7 +741,7 @@ void FixNH::initial_integrate(int vflag)
|
|||
if (pstat_flag) {
|
||||
if (pstyle == ISO) {
|
||||
temperature->compute_scalar();
|
||||
double tmp = pressure->compute_scalar();
|
||||
pressure->compute_scalar();
|
||||
} else {
|
||||
temperature->compute_vector();
|
||||
pressure->compute_vector();
|
||||
|
@ -788,7 +788,7 @@ void FixNH::final_integrate()
|
|||
|
||||
t_current = temperature->compute_scalar();
|
||||
if (pstat_flag) {
|
||||
if (pstyle == ISO) double tmp = pressure->compute_scalar();
|
||||
if (pstyle == ISO) pressure->compute_scalar();
|
||||
else pressure->compute_vector();
|
||||
couple();
|
||||
pressure->addstep(update->ntimestep+1);
|
||||
|
@ -807,8 +807,6 @@ void FixNH::final_integrate()
|
|||
|
||||
void FixNH::initial_integrate_respa(int vflag, int ilevel, int iloop)
|
||||
{
|
||||
int i;
|
||||
|
||||
// set timesteps by level
|
||||
|
||||
dtv = step_respa[ilevel];
|
||||
|
@ -844,7 +842,7 @@ void FixNH::initial_integrate_respa(int vflag, int ilevel, int iloop)
|
|||
if (pstat_flag) {
|
||||
if (pstyle == ISO) {
|
||||
temperature->compute_scalar();
|
||||
double tmp = pressure->compute_scalar();
|
||||
pressure->compute_scalar();
|
||||
} else {
|
||||
temperature->compute_vector();
|
||||
pressure->compute_vector();
|
||||
|
@ -1430,7 +1428,6 @@ double FixNH::compute_vector(int n)
|
|||
}
|
||||
}
|
||||
|
||||
int i;
|
||||
double volume;
|
||||
double kt = boltz * t_target;
|
||||
double lkt = tdof * kt;
|
||||
|
@ -1641,7 +1638,7 @@ void FixNH::nhc_temp_integrate()
|
|||
void FixNH::nhc_press_integrate()
|
||||
{
|
||||
int ich,i;
|
||||
double expfac,factor_etap,wmass,kecurrent;
|
||||
double expfac,factor_etap,kecurrent;
|
||||
double kt = boltz * t_target;
|
||||
double lkt_press = kt;
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ FixNHSphere::FixNHSphere(LAMMPS *lmp, int narg, char **arg) :
|
|||
|
||||
void FixNHSphere::init()
|
||||
{
|
||||
int i,itype;
|
||||
|
||||
// check that all particles are finite-size
|
||||
// no point particles allowed
|
||||
|
||||
|
@ -48,7 +46,7 @@ void FixNHSphere::init()
|
|||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit)
|
||||
if (radius[i] == 0.0)
|
||||
error->one("Fix nvt/sphere requires extended particles");
|
||||
|
|
|
@ -94,7 +94,6 @@ void FixNVESphere::init()
|
|||
|
||||
void FixNVESphere::initial_integrate(int vflag)
|
||||
{
|
||||
int itype;
|
||||
double dtfm,dtirotate,msq,scale;
|
||||
double g[3];
|
||||
|
||||
|
@ -105,7 +104,6 @@ void FixNVESphere::initial_integrate(int vflag)
|
|||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
double *rmass = atom->rmass;
|
||||
int *type = atom->type;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
|
||||
|
|
|
@ -104,7 +104,7 @@ void FixNVTSllod::nh_v_temp()
|
|||
// calculate temperature since some computes require temp
|
||||
// computed on current nlocal atoms to remove bias
|
||||
|
||||
if (nondeformbias) double tmp = temperature->compute_scalar();
|
||||
if (nondeformbias) temperature->compute_scalar();
|
||||
|
||||
double **v = atom->v;
|
||||
int *mask = atom->mask;
|
||||
|
|
|
@ -472,14 +472,14 @@ int FixRigid::setmask()
|
|||
|
||||
void FixRigid::init()
|
||||
{
|
||||
int i,itype,ibody;
|
||||
int i,ibody;
|
||||
|
||||
triclinic = domain->triclinic;
|
||||
|
||||
// warn if more than one rigid fix
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < modify->nfix; i++)
|
||||
for (i = 0; i < modify->nfix; i++)
|
||||
if (strcmp(modify->fix[i]->style,"rigid") == 0) count++;
|
||||
if (count > 1 && me == 0) error->warning("More than one fix rigid");
|
||||
|
||||
|
@ -632,7 +632,7 @@ void FixRigid::init()
|
|||
// dx,dy,dz = coords relative to center-of-mass
|
||||
// symmetric 3x3 inertia tensor stored in Voigt notation as 6-vector
|
||||
|
||||
double dx,dy,dz,rad;
|
||||
double dx,dy,dz;
|
||||
|
||||
for (ibody = 0; ibody < nbody; ibody++)
|
||||
for (i = 0; i < 6; i++) sum[ibody][i] = 0.0;
|
||||
|
@ -1519,7 +1519,7 @@ void FixRigid::deform(int flag)
|
|||
|
||||
void FixRigid::set_xv()
|
||||
{
|
||||
int ibody,itype;
|
||||
int ibody;
|
||||
int xbox,ybox,zbox;
|
||||
double x0,x1,x2,v0,v1,v2,fc0,fc1,fc2,massone;
|
||||
double xy,xz,yz;
|
||||
|
@ -1675,9 +1675,8 @@ void FixRigid::set_xv()
|
|||
|
||||
void FixRigid::set_v()
|
||||
{
|
||||
int ibody,itype;
|
||||
int ibody;
|
||||
int xbox,ybox,zbox;
|
||||
double dx,dy,dz;
|
||||
double x0,x1,x2,v0,v1,v2,fc0,fc1,fc2,massone;
|
||||
double xy,xz,yz;
|
||||
double ione[3],exone[3],eyone[3],ezone[3],delta[3],vr[6];
|
||||
|
|
|
@ -287,7 +287,7 @@ void FixRigidNVT::initial_integrate(int vflag)
|
|||
void FixRigidNVT::final_integrate()
|
||||
{
|
||||
int i,ibody;
|
||||
double tmp,scale_t,scale_r,akin_t,akin_r;
|
||||
double tmp,scale_t,scale_r;
|
||||
double dtfm,xy,xz,yz;
|
||||
|
||||
// compute velocity scales for translation and rotation
|
||||
|
|
|
@ -186,7 +186,6 @@ void FixWallRegion::post_force(int vflag)
|
|||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double *radius = atom->radius;
|
||||
int *type = atom->type;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
|
@ -335,12 +334,10 @@ void FixWallRegion::colloid(double r, double rad)
|
|||
double rinv2 = 1.0/r2;
|
||||
double r2inv2 = rinv2*rinv2;
|
||||
double r4inv2 = r2inv2*r2inv2;
|
||||
double r6inv2 = r4inv2*r2inv2;
|
||||
double r3 = r + 0.5*diam;
|
||||
double rinv3 = 1.0/r3;
|
||||
double r2inv3 = rinv3*rinv3;
|
||||
double r4inv3 = r2inv3*r2inv3;
|
||||
double r6inv3 = r4inv3*r2inv3;
|
||||
eng = coeff3*((-3.5*diam+r)*r4inv2*r2inv2*rinv2
|
||||
+ (3.5*diam+r)*r4inv3*r2inv3*rinv3) -
|
||||
coeff4*((-diam*r+r2*r3*(log(-r2)-log(r3)))*
|
||||
|
|
|
@ -575,8 +575,7 @@ void Input::ifthenelse()
|
|||
ncommands++;
|
||||
}
|
||||
|
||||
for (int i = 0; i < ncommands; i++)
|
||||
char *command = input->one(commands[i]);
|
||||
for (int i = 0; i < ncommands; i++) input->one(commands[i]);
|
||||
|
||||
for (int i = 0; i < ncommands; i++) delete [] commands[i];
|
||||
delete [] commands;
|
||||
|
@ -632,8 +631,7 @@ void Input::ifthenelse()
|
|||
|
||||
// execute the list of commands
|
||||
|
||||
for (int i = 0; i < ncommands; i++)
|
||||
char *command = input->one(commands[i]);
|
||||
for (int i = 0; i < ncommands; i++) input->one(commands[i]);
|
||||
|
||||
// clean up
|
||||
|
||||
|
|
|
@ -354,7 +354,6 @@ void Min::run(int n)
|
|||
{
|
||||
// minimizer iterations
|
||||
|
||||
int iter_start = niter;
|
||||
stop_condition = iterate(n);
|
||||
stopstr = stopstrings(stop_condition);
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ int MinLineSearch::linemin_quadratic(double eoriginal, double &alpha)
|
|||
int i,m,n;
|
||||
double fdothall,fdothme,hme,hmax,hmaxall;
|
||||
double de_ideal,de;
|
||||
double delfh,engprev,relerr,alphaprev,fhprev,ff,fh,alpha0,fh0,ff0;
|
||||
double delfh,engprev,relerr,alphaprev,fhprev,ff,fh,alpha0;
|
||||
double dot[2],dotall[2];
|
||||
double *xatom,*x0atom,*fatom,*hatom;
|
||||
double alphamax;
|
||||
|
|
|
@ -76,7 +76,7 @@ void MinQuickMin::reset_vectors()
|
|||
|
||||
/* ----------------------------------------------------------------------
|
||||
minimization via QuickMin damped dynamics
|
||||
/* ---------------------------------------------------------------------- */
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int MinQuickMin::iterate(int maxiter)
|
||||
{
|
||||
|
|
|
@ -214,7 +214,7 @@ void Pair::reinit()
|
|||
|
||||
void Pair::init_style()
|
||||
{
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -259,7 +259,7 @@ void PairBuckCoulCut::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all("Pair style buck/coul/cut requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -202,7 +202,7 @@ void PairCoulCut::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all("Pair style coul/cut requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -258,7 +258,7 @@ void PairDPD::init_style()
|
|||
if (force->newton_pair == 0 && comm->me == 0) error->warning(
|
||||
"Pair dpd needs newton pair on for momentum conservation");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -66,7 +66,7 @@ void PairGauss::compute(int eflag, int vflag)
|
|||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double r,rsq,r2inv,r6inv,forcelj,rexp;
|
||||
double r,rsq,r2inv,forcelj;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = 0.0;
|
||||
|
@ -316,7 +316,7 @@ double PairGauss::single(int i, int j, int itype, int jtype, double rsq,
|
|||
double factor_coul, double factor_lj,
|
||||
double &fforce)
|
||||
{
|
||||
double r2inv,r6inv,forcelj,philj,r;
|
||||
double r2inv,forcelj,philj,r;
|
||||
|
||||
r = sqrt(rsq);
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ void PairLJCutCoulCut::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all("Pair style lj/cut/coul/cut requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -273,7 +273,7 @@ void PairLJGromacsCoulGromacs::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all("Pair style lj/gromacs/coul/gromacs requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
cut_lj_innersq = cut_lj_inner * cut_lj_inner;
|
||||
cut_ljsq = cut_lj * cut_lj;
|
||||
|
|
|
@ -231,8 +231,7 @@ void Run::command(int narg, char **arg)
|
|||
|
||||
if (ncommands) {
|
||||
modify->clearstep_compute();
|
||||
for (int i = 0; i < ncommands; i++)
|
||||
char *command = input->one(commands[i]);
|
||||
for (int i = 0; i < ncommands; i++) input->one(commands[i]);
|
||||
modify->addstep_compute(update->ntimestep + nevery);
|
||||
}
|
||||
|
||||
|
|
|
@ -469,7 +469,6 @@ void Set::setrandom(int keyword)
|
|||
// dipole length is determined by dipole type array
|
||||
|
||||
} else if (keyword == DIPOLE_RANDOM) {
|
||||
int *type = atom->type;
|
||||
double **mu = atom->mu;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ using namespace LAMMPS_NS;
|
|||
|
||||
Update::Update(LAMMPS *lmp) : Pointers(lmp)
|
||||
{
|
||||
int n;
|
||||
char *str;
|
||||
|
||||
ntimestep = 0;
|
||||
|
|
|
@ -666,7 +666,7 @@ double Variable::evaluate(char *str, Tree **tree)
|
|||
|
||||
if (tree) {
|
||||
Tree *newtree;
|
||||
double tmp = evaluate(contents,&newtree);
|
||||
evaluate(contents,&newtree);
|
||||
treestack[ntreestack++] = newtree;
|
||||
} else argstack[nargstack++] = evaluate(contents,NULL);
|
||||
|
||||
|
@ -1135,7 +1135,7 @@ double Variable::evaluate(char *str, Tree **tree)
|
|||
if (tree == NULL)
|
||||
error->all("Atom-style variable in equal-style variable formula");
|
||||
Tree *newtree;
|
||||
double tmp = evaluate(data[ivar][0],&newtree);
|
||||
evaluate(data[ivar][0],&newtree);
|
||||
treestack[ntreestack++] = newtree;
|
||||
|
||||
// v_name[N] = scalar from atom-style per-atom vector
|
||||
|
@ -1408,7 +1408,7 @@ double Variable::evaluate(char *str, Tree **tree)
|
|||
|
||||
double Variable::collapse_tree(Tree *tree)
|
||||
{
|
||||
double arg1,arg2,arg3;
|
||||
double arg1,arg2;
|
||||
|
||||
if (tree->type == VALUE) return tree->value;
|
||||
if (tree->type == ATOMARRAY) return 0.0;
|
||||
|
@ -1660,8 +1660,8 @@ double Variable::collapse_tree(Tree *tree)
|
|||
// random() or normal() do not become a single collapsed value
|
||||
|
||||
if (tree->type == RANDOM) {
|
||||
double lower = collapse_tree(tree->left);
|
||||
double upper = collapse_tree(tree->middle);
|
||||
collapse_tree(tree->left);
|
||||
collapse_tree(tree->middle);
|
||||
if (randomatom == NULL) {
|
||||
int seed = static_cast<int> (collapse_tree(tree->right));
|
||||
if (seed <= 0) error->one("Invalid math function in variable formula");
|
||||
|
@ -1671,7 +1671,7 @@ double Variable::collapse_tree(Tree *tree)
|
|||
}
|
||||
|
||||
if (tree->type == NORMAL) {
|
||||
double mu = collapse_tree(tree->left);
|
||||
collapse_tree(tree->left);
|
||||
double sigma = collapse_tree(tree->middle);
|
||||
if (sigma < 0.0) error->one("Invalid math function in variable formula");
|
||||
if (randomatom == NULL) {
|
||||
|
@ -3142,7 +3142,6 @@ double Variable::evaluate_boolean(char *str)
|
|||
int op,opprevious;
|
||||
double value1,value2;
|
||||
char onechar;
|
||||
char *ptr;
|
||||
|
||||
double argstack[MAXLEVEL];
|
||||
int opstack[MAXLEVEL];
|
||||
|
|
Loading…
Reference in New Issue