forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7061 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
76da1a753b
commit
6d849fea0e
|
@ -76,7 +76,7 @@ void PairHbondDreidingLJ::compute(int eflag, int vflag)
|
|||
{
|
||||
int i,j,k,m,ii,jj,kk,inum,jnum,knum,itype,jtype,ktype;
|
||||
double delx,dely,delz,rsq,rsq1,rsq2,r1,r2;
|
||||
double factor_hb,force_angle,force_kernel,evdwl,eng_lj;
|
||||
double factor_hb,force_angle,force_kernel,evdwl,eng_lj,ehbond;
|
||||
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 r2inv,r10inv;
|
||||
|
@ -84,7 +84,7 @@ void PairHbondDreidingLJ::compute(int eflag, int vflag)
|
|||
int *ilist,*jlist,*klist,*numneigh,**firstneigh;
|
||||
Param *pm;
|
||||
|
||||
evdwl = 0.0;
|
||||
evdwl = ehbond = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
|
@ -186,6 +186,7 @@ void PairHbondDreidingLJ::compute(int eflag, int vflag)
|
|||
if (eflag) {
|
||||
evdwl = eng_lj * pow(c,pm->ap);
|
||||
evdwl *= factor_hb;
|
||||
ehbond += evdwl;
|
||||
}
|
||||
|
||||
a = factor_hb*force_angle/s;
|
||||
|
@ -234,7 +235,7 @@ void PairHbondDreidingLJ::compute(int eflag, int vflag)
|
|||
|
||||
if (eflag_global) {
|
||||
pvector[0] = hbcount;
|
||||
pvector[1] = evdwl;
|
||||
pvector[1] = ehbond;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,14 +46,14 @@ void PairHbondDreidingMorse::compute(int eflag, int vflag)
|
|||
{
|
||||
int i,j,k,m,ii,jj,kk,inum,jnum,knum,itype,jtype,ktype;
|
||||
double delx,dely,delz,rsq,rsq1,rsq2,r1,r2;
|
||||
double factor_hb,force_angle,force_kernel,evdwl;
|
||||
double factor_hb,force_angle,force_kernel,evdwl,ehbond;
|
||||
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,*klist,*numneigh,**firstneigh;
|
||||
Param *pm;
|
||||
|
||||
evdwl = 0.0;
|
||||
evdwl = ehbond = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
|
@ -154,6 +154,7 @@ void PairHbondDreidingMorse::compute(int eflag, int vflag)
|
|||
if (eflag) {
|
||||
evdwl = eng_morse * pow(c,params[m].ap);
|
||||
evdwl *= factor_hb;
|
||||
ehbond += evdwl;
|
||||
}
|
||||
|
||||
a = factor_hb*force_angle/s;
|
||||
|
@ -202,7 +203,7 @@ void PairHbondDreidingMorse::compute(int eflag, int vflag)
|
|||
|
||||
if (eflag_global) {
|
||||
pvector[0] = hbcount;
|
||||
pvector[1] = evdwl;
|
||||
pvector[1] = ehbond;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,28 +137,32 @@ void FixAddForce::init()
|
|||
|
||||
if (xstr) {
|
||||
xvar = input->variable->find(xstr);
|
||||
if (xvar < 0) error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (xvar < 0)
|
||||
error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (input->variable->equalstyle(xvar)) xstyle = EQUAL;
|
||||
else if (input->variable->atomstyle(xvar)) xstyle = ATOM;
|
||||
else error->all(FLERR,"Variable for fix addforce is invalid style");
|
||||
}
|
||||
if (ystr) {
|
||||
yvar = input->variable->find(ystr);
|
||||
if (yvar < 0) error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (yvar < 0)
|
||||
error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (input->variable->equalstyle(yvar)) ystyle = EQUAL;
|
||||
else if (input->variable->atomstyle(yvar)) ystyle = ATOM;
|
||||
else error->all(FLERR,"Variable for fix addforce is invalid style");
|
||||
}
|
||||
if (zstr) {
|
||||
zvar = input->variable->find(zstr);
|
||||
if (zvar < 0) error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (zvar < 0)
|
||||
error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (input->variable->equalstyle(zvar)) zstyle = EQUAL;
|
||||
else if (input->variable->atomstyle(zvar)) zstyle = ATOM;
|
||||
else error->all(FLERR,"Variable for fix addforce is invalid style");
|
||||
}
|
||||
if (estr) {
|
||||
evar = input->variable->find(estr);
|
||||
if (evar < 0) error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (evar < 0)
|
||||
error->all(FLERR,"Variable name for fix addforce does not exist");
|
||||
if (input->variable->atomstyle(evar)) estyle = ATOM;
|
||||
else error->all(FLERR,"Variable for fix addforce is invalid style");
|
||||
} else estyle = NONE;
|
||||
|
@ -167,7 +171,8 @@ void FixAddForce::init()
|
|||
|
||||
if (iregion >= 0) {
|
||||
iregion = domain->find_region(idregion);
|
||||
if (iregion == -1) error->all(FLERR,"Region ID for fix addforce does not exist");
|
||||
if (iregion == -1)
|
||||
error->all(FLERR,"Region ID for fix addforce does not exist");
|
||||
}
|
||||
|
||||
if (xstyle == ATOM || ystyle == ATOM || zstyle == ATOM)
|
||||
|
|
Loading…
Reference in New Issue