Extended to cover all units styles
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10798 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -240,10 +240,6 @@ void PairZBL::init_style()
|
|||||||
|
|
||||||
cut_innersq = cut_inner * cut_inner;
|
cut_innersq = cut_inner * cut_inner;
|
||||||
cut_globalsq = cut_global * cut_global;
|
cut_globalsq = cut_global * cut_global;
|
||||||
// metal units: e^2/angstrom = 2*Ryd*bohr
|
|
||||||
// econv = 2.0*13.6058*0.529177 = 14.3998;
|
|
||||||
// all units:
|
|
||||||
econv = force->qqr2e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
@ -253,12 +249,12 @@ void PairZBL::init_style()
|
|||||||
double PairZBL::init_one(int i, int j)
|
double PairZBL::init_one(int i, int j)
|
||||||
{
|
{
|
||||||
|
|
||||||
double ainv = (pow(z[i],pzbl) + pow(z[j],pzbl))/a0;
|
double ainv = (pow(z[i],pzbl) + pow(z[j],pzbl))/(a0*force->angstrom);
|
||||||
d1a[i][j] = d1*ainv;
|
d1a[i][j] = d1*ainv;
|
||||||
d2a[i][j] = d2*ainv;
|
d2a[i][j] = d2*ainv;
|
||||||
d3a[i][j] = d3*ainv;
|
d3a[i][j] = d3*ainv;
|
||||||
d4a[i][j] = d4*ainv;
|
d4a[i][j] = d4*ainv;
|
||||||
zze[i][j] = z[i]*z[j]*econv;
|
zze[i][j] = z[i]*z[j]*force->qqr2e*force->qelectron*force->qelectron;
|
||||||
|
|
||||||
d1a[j][i] = d1a[i][j];
|
d1a[j][i] = d1a[i][j];
|
||||||
d2a[j][i] = d2a[i][j];
|
d2a[j][i] = d2a[i][j];
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class PairZBL : public Pair {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
double cut_global, cut_inner;
|
double cut_global, cut_inner;
|
||||||
double cut_globalsq, cut_innersq, econv;
|
double cut_globalsq, cut_innersq;
|
||||||
double *z;
|
double *z;
|
||||||
double **d1a,**d2a,**d3a,**d4a,**zze;
|
double **d1a,**d2a,**d3a,**d4a,**zze;
|
||||||
double **sw1,**sw2,**sw3,**sw4,**sw5;
|
double **sw1,**sw2,**sw3,**sw4,**sw5;
|
||||||
|
|||||||
Reference in New Issue
Block a user