diff --git a/doc/src/pair_wf_cut.rst b/doc/src/pair_wf_cut.rst index 8f6e352665..c3c0c0baf9 100644 --- a/doc/src/pair_wf_cut.rst +++ b/doc/src/pair_wf_cut.rst @@ -84,8 +84,8 @@ little to be gained by choosing other values of :math:`\nu` and This pair style does not support the :doc:`pair_modify ` mixing and table options. -The :doc:`pair_modify ` tail option is not relevant -for this pair style as it goes to zero at the cut-off radius. +The :doc:`pair_modify ` tail and shift options are not +relevant for this pair style as it goes to zero at the cut-off radius. This pair style writes its information to :doc:`binary restart files `, so pair_style and pair_coeff commands do not need to be diff --git a/src/EXTRA-PAIR/pair_wf_cut.cpp b/src/EXTRA-PAIR/pair_wf_cut.cpp index b25e519bcf..3bfe46921f 100644 --- a/src/EXTRA-PAIR/pair_wf_cut.cpp +++ b/src/EXTRA-PAIR/pair_wf_cut.cpp @@ -56,7 +56,6 @@ PairWFCut::~PairWFCut() memory->destroy(e0nm); //Alpha * epsilon memory->destroy(rcmu); memory->destroy(sigma_mu); - memory->destroy(offset); } } @@ -127,8 +126,7 @@ void PairWFCut::compute(int eflag, int vflag) } if (eflag) { - evdwl = e0nm[itype][jtype] * - (rm*powint(rn,2*nu[itype][jtype])) - offset[itype][jtype]; + evdwl = e0nm[itype][jtype] * (rm*powint(rn,2*nu[itype][jtype])); evdwl *= factor_lj; } @@ -166,7 +164,6 @@ void PairWFCut::allocate() memory->create(e0nm,n+1,n+1,"pair:e0nm"); memory->create(rcmu,n+1,n+1,"pair:rcmu"); memory->create(sigma_mu,n+1,n+1,"pair:sigma_mu"); - memory->create(offset,n+1,n+1,"pair:offset"); } /* ---------------------------------------------------------------------- @@ -242,10 +239,6 @@ double PairWFCut::init_one(int i, int j) rcmu[i][j] = powint(cut[i][j],2*mu[i][j]); sigma_mu[i][j] = powint(sigma[i][j], 2*mu[i][j]); - if (offset_flag && (cut[i][j] > 0.0)) { - offset[i][j] = 0.0; - } else offset[i][j] = 0.0; - epsilon[j][i] = epsilon[i][j]; nu[j][i] = nu[i][j]; mu[j][i] = mu[i][j]; @@ -254,7 +247,6 @@ double PairWFCut::init_one(int i, int j) e0nm[j][i] = e0nm[i][j]; rcmu[j][i] = rcmu[i][j]; sigma_mu[j][i] = sigma_mu[i][j]; - offset[j][i] = offset[i][j]; return cut[i][j]; } @@ -320,7 +312,6 @@ void PairWFCut::read_restart(FILE *fp) void PairWFCut::write_restart_settings(FILE *fp) { fwrite(&cut_global,sizeof(double),1,fp); - fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); } @@ -332,11 +323,9 @@ void PairWFCut::read_restart_settings(FILE *fp) { if (comm->me == 0) { utils::sfread(FLERR, &cut_global,sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR, &offset_flag,sizeof(int),1,fp,nullptr,error); utils::sfread(FLERR, &mix_flag,sizeof(int),1,fp,nullptr,error); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); - MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); } @@ -378,8 +367,7 @@ double PairWFCut::single(int /*i*/, int /*j*/, int itype, int jtype, + 4.0*nm[itype][jtype] *rcmu[itype][jtype]*rm*powint(rn,2*nu[itype][jtype]-1); fforce = factor_lj*e0nm[itype][jtype]*forcenm*powint(r2inv,mu[itype][jtype]+1); - phinm = e0nm[itype][jtype] * rm*powint(rn,2*nu[itype][jtype]) - - offset[itype][jtype]; + phinm = e0nm[itype][jtype] * rm*powint(rn,2*nu[itype][jtype]); return factor_lj*phinm; } diff --git a/src/EXTRA-PAIR/pair_wf_cut.h b/src/EXTRA-PAIR/pair_wf_cut.h index 15d02448ed..80059ab1d9 100644 --- a/src/EXTRA-PAIR/pair_wf_cut.h +++ b/src/EXTRA-PAIR/pair_wf_cut.h @@ -47,7 +47,7 @@ class PairWFCut : public Pair { double cut_global; double **cut; double **epsilon, **sigma; - double **nm, **e0nm, **rcmu, **sigma_mu, **offset; + double **nm, **e0nm, **rcmu, **sigma_mu; void allocate(); };