From d11d8a4acb0f1ebe5e330702b09457b9b6a03e15 Mon Sep 17 00:00:00 2001 From: athomps Date: Tue, 17 Sep 2013 19:09:29 +0000 Subject: [PATCH] Extended to cover all units styles git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10798 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/pair_zbl.cpp | 8 ++------ src/pair_zbl.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pair_zbl.cpp b/src/pair_zbl.cpp index c44c9542b4..a1f0f9a5ff 100644 --- a/src/pair_zbl.cpp +++ b/src/pair_zbl.cpp @@ -240,10 +240,6 @@ void PairZBL::init_style() cut_innersq = cut_inner * cut_inner; 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 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; d2a[i][j] = d2*ainv; d3a[i][j] = d3*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]; d2a[j][i] = d2a[i][j]; diff --git a/src/pair_zbl.h b/src/pair_zbl.h index c93106369f..0f6330ecf4 100644 --- a/src/pair_zbl.h +++ b/src/pair_zbl.h @@ -37,7 +37,7 @@ class PairZBL : public Pair { protected: double cut_global, cut_inner; - double cut_globalsq, cut_innersq, econv; + double cut_globalsq, cut_innersq; double *z; double **d1a,**d2a,**d3a,**d4a,**zze; double **sw1,**sw2,**sw3,**sw4,**sw5;