Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collected small changes and bugfixes #2717

Merged
merged 30 commits into from Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1c80c94
whitespace fixes
akohlmey Apr 21, 2021
6ceeee2
Merge branch 'master' into collected-small-changes
akohlmey Apr 22, 2021
b4efeb9
update and sort lists of packages for different presets and categories
akohlmey Apr 21, 2021
96baae2
fix bug flagged by compiler warning
akohlmey Apr 22, 2021
a1e07d3
fix memory leak in fix atom/swap
akohlmey Apr 22, 2021
4127faa
substitute unicode general punctuation left/right single/double quotes
akohlmey Apr 22, 2021
e7cb20e
replace non-ASCII character in docs
akohlmey Apr 22, 2021
c257939
silence compiler warnings
akohlmey Apr 22, 2021
eb85edf
make naming of the compiled pace library consistent with those of oth…
akohlmey Apr 22, 2021
65cef12
print compiled in accelerator configuration with ./lmp -h
akohlmey Apr 22, 2021
a2e46c4
download only a specific tag/version of MathJax when cloning
akohlmey Apr 22, 2021
53a0ded
update MathJax version for CMake based doc build
akohlmey Apr 22, 2021
7bae94c
fix cut-n-paste bug detected by coverity scan
akohlmey Apr 23, 2021
92cc30e
correctly determine the number of active pair style instances
akohlmey Apr 23, 2021
cbf81a5
make detection of styles more specific and still support suffixed ver…
akohlmey Apr 23, 2021
a438c2b
tweak unit test YAML epsilon values for GPU mixed precision tests to …
akohlmey Apr 23, 2021
8ea5b8c
add false positives for recently added docs
akohlmey Apr 23, 2021
5a12bae
remove dead code and silence compiler warnings
akohlmey Apr 23, 2021
8541b0d
reduce compiler warnings by avoiding to redeclare variables so they s…
akohlmey Apr 23, 2021
fe063b2
silence compiler warnings
akohlmey Apr 23, 2021
f759e6f
don't implicitly assume an undefined define equals 0
akohlmey Apr 23, 2021
ef858ae
silence compiler warnings
akohlmey Apr 23, 2021
15ce976
simplify
akohlmey Apr 23, 2021
b7272bb
restore variable declaration
akohlmey Apr 23, 2021
f47333b
Update MathJax to 3.1.4 hotfix version
akohlmey Apr 23, 2021
99fa6ed
delay part of the variable.cpp refactoring until we have better unit …
akohlmey Apr 23, 2021
917cd1b
silence more compiler warnings
akohlmey Apr 23, 2021
8a49bf3
fix missing argument bug in velocity code and simplify a second case
akohlmey Apr 23, 2021
ed92681
simplify
akohlmey Apr 23, 2021
9cdd926
remove excess quotes
akohlmey Apr 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/Modules/Documentation.cmake
Expand Up @@ -55,8 +55,8 @@ if(BUILD_DOC)
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
)

set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.2.tar.gz" CACHE STRING "URL for MathJax tarball")
set(MATHJAX_MD5 "a4a6a093a89bc2ccab1452d766b98e53" CACHE STRING "MD5 checksum of MathJax tarball")
set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.3.tar.gz" CACHE STRING "URL for MathJax tarball")
set(MATHJAX_MD5 "d1c98c746888bfd52ca8ebc10704f92f" CACHE STRING "MD5 checksum of MathJax tarball")
mark_as_advanced(MATHJAX_URL)

# download mathjax distribution and unpack to folder "mathjax"
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/Packages/USER-PACE.cmake
Expand Up @@ -20,7 +20,7 @@ file(GLOB PACE_EVALUATOR_SOURCES ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PAC
list(FILTER PACE_EVALUATOR_SOURCES EXCLUDE REGEX pair_pace.cpp)

add_library(pace STATIC ${PACE_EVALUATOR_SOURCES})
set_target_properties(pace PROPERTIES OUTPUT_NAME pace${LAMMPS_MACHINE})
set_target_properties(pace PROPERTIES OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
target_include_directories(pace PUBLIC ${PACE_EVALUATOR_INCLUDE_DIR})
target_link_libraries(lammps PRIVATE pace)

20 changes: 10 additions & 10 deletions cmake/presets/all_off.cmake
Expand Up @@ -2,16 +2,16 @@
# an existing package selection without losing any other settings

set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE MLIAP
MOLECULE MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK
SNAP SPIN SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-INTEL
USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD USER-MESONT USER-MGPT
USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP USER-PACE USER-PHONON
USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION USER-REAXC
USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
USER-VTK USER-YAFF)

foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
Expand Down
20 changes: 10 additions & 10 deletions cmake/presets/all_on.cmake
Expand Up @@ -4,16 +4,16 @@
# with just a working C++ compiler and an MPI library.

set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE MLIAP
MOLECULE MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK
SNAP SPIN SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-INTEL
USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD USER-MESONT USER-MGPT
USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP USER-PACE USER-PHONON
USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION USER-REAXC
USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
USER-VTK USER-YAFF)

foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
Expand Down
9 changes: 5 additions & 4 deletions cmake/presets/nolib.cmake
@@ -1,10 +1,11 @@
# preset that turns off all packages that require some form of external
# library or special compiler (fortran or cuda) or equivalent.

set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MPIIO MSCG PYTHON
VORONOI USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-LB
USER-MOLFILE USER-MESONT USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP
USER-SCAFACOS USER-SMD USER-VTK)
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MESSAGE MPIIO MSCG
PYTHON VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-LB USER-MOLFILE USER-MESONT
USER-NETCDF USER-PACE USER-PLUMED USER-QMMM USER-QUIP USER-SCAFACOS
USER-SMD USER-VTK)

foreach(PKG ${PACKAGES_WITH_LIB})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile
Expand Up @@ -236,7 +236,7 @@ $(VENV):
)

$(MATHJAX):
@git clone --depth 1 git://github.com/mathjax/MathJax.git $@
@git clone -b 3.1.4 -c advice.detachedHead=0 --depth 1 git://github.com/mathjax/MathJax.git $@

$(TXT2RST) $(ANCHORCHECK): $(VENV)
@( \
Expand Down
16 changes: 8 additions & 8 deletions doc/src/fix_precession_spin.rst
Expand Up @@ -125,10 +125,10 @@ axis along the :math:`(1 1 1)`-type cube diagonals). :math:`K_2^c >
diagonals. See chapter 2 of :ref:`(Skomski) <Skomski1>` for more
details on cubic anisotropies.

Style *stt* is used to simulate the interaction between the spins and
Style *stt* is used to simulate the interaction between the spins and
a spin-transfer torque.
See equation (7) of :ref:`(Chirac) <Chirac1>` for more details about the
implemented spin-transfer torque term.
See equation (7) of :ref:`(Chirac) <Chirac1>` for more details about the
implemented spin-transfer torque term.

In all cases, the choice of :math:`(x y z)` only imposes the vector
directions for the forces. Only the direction of the vector is
Expand All @@ -139,12 +139,12 @@ Those styles can be combined within one single command line.

.. note::

The norm of all vectors defined with the precession/spin command
The norm of all vectors defined with the precession/spin command
have to be non-zero. For example, defining
"fix 1 all precession/spin zeeman 0.1 0.0 0.0 0.0" would result
in an error message.
in an error message.
Since those vector components are used to compute the inverse of the
field (or anisotropy) vector norm, setting a zero-vector would result
field (or anisotropy) vector norm, setting a zero-vector would result
in a division by zero.

----------
Expand Down Expand Up @@ -197,6 +197,6 @@ Oxford University Press.

.. _Chirac1:

**(Chirac)** Chirac, Théophile, et al. Ultrafast antiferromagnetic
switching in NiO induced by spin transfer torques.
**(Chirac)** Chirac, Theophile, et al. Ultrafast antiferromagnetic
switching in NiO induced by spin transfer torques.
Physical Review B 102.13 (2020): 134415.
5 changes: 5 additions & 0 deletions doc/utils/sphinx-config/false_positives.txt
Expand Up @@ -101,6 +101,7 @@ anisotropic
anisotropies
anisotropy
ansi
antiferromagnetic
antiquewhite
Antisymmetrized
antisymmetry
Expand Down Expand Up @@ -2177,6 +2178,7 @@ nimpropers
nimpropertypes
Nimpropertype
Ninteger
NiO
Nissila
nist
nitride
Expand Down Expand Up @@ -3163,6 +3165,7 @@ th
thb
thei
Theodorou
Theophile
Theor
thermalization
thermalize
Expand Down Expand Up @@ -3315,6 +3318,7 @@ Uleft
uloop
Ulomek
ulsph
Ultrafast
uMech
umin
Umin
Expand Down Expand Up @@ -3595,6 +3599,7 @@ ZBL
Zc
zcm
Zeeman
zeeman
Zemer
Zepeda
zflag
Expand Down
3 changes: 2 additions & 1 deletion src/KOKKOS/atom_vec_spin_kokkos.cpp
Expand Up @@ -637,11 +637,12 @@ int AtomVecSpinKokkos::unpack_border_hybrid(int n, int first, double *buf)

m = 0;
last = first + n;
for (i = first; i < last; i++)
for (i = first; i < last; i++) {
akohlmey marked this conversation as resolved.
Show resolved Hide resolved
h_sp(i,0) = buf[m++];
h_sp(i,1) = buf[m++];
h_sp(i,2) = buf[m++];
h_sp(i,3) = buf[m++];
}
return m;
}

Expand Down
6 changes: 3 additions & 3 deletions src/KOKKOS/fix_eos_table_rx_kokkos.cpp
Expand Up @@ -531,11 +531,11 @@ void FixEOStableRXKokkos<DeviceType>::create_kokkos_tables()
h_table->hi[i] = tb->hi;
h_table->invdelta[i] = tb->invdelta;

for (int j = 0; j<h_table->r.extent(1); j++)
for (int j = 0; j < (int)h_table->r.extent(1); j++)
h_table->r(i,j) = tb->r[j];
for (int j = 0; j<h_table->e.extent(1); j++)
for (int j = 0; j < (int)h_table->e.extent(1); j++)
h_table->e(i,j) = tb->e[j];
for (int j = 0; j<h_table->de.extent(1); j++)
for (int j = 0; j < (int)h_table->de.extent(1); j++)
h_table->de(i,j) = tb->de[j];
}

Expand Down
2 changes: 1 addition & 1 deletion src/KOKKOS/fix_rx_kokkos.cpp
Expand Up @@ -1451,7 +1451,7 @@ void FixRxKokkos<DeviceType>::solve_reactions(const int /*vflag*/, const bool is
{
const int count = nlocal + (newton_pair ? nghost : 0);

if (count > k_dpdThetaLocal.template view<DeviceType>().extent(0)) {
if (count > (int) k_dpdThetaLocal.template view<DeviceType>().extent(0)) {
memoryKK->destroy_kokkos (k_dpdThetaLocal, dpdThetaLocal);
memoryKK->create_kokkos (k_dpdThetaLocal, dpdThetaLocal, count, "FixRxKokkos::dpdThetaLocal");
this->d_dpdThetaLocal = k_dpdThetaLocal.template view<DeviceType>();
Expand Down
1 change: 0 additions & 1 deletion src/KSPACE/ewald_dipole.cpp
Expand Up @@ -806,7 +806,6 @@ void EwaldDipole::slabcorr()

if (atom->torque) {
double ffact = qscale * (-4.0*MY_PI/volume);
double **mu = atom->mu;
double **torque = atom->torque;
for (int i = 0; i < nlocal; i++) {
torque[i][0] += ffact * dipole_all * mu[i][1];
Expand Down
4 changes: 2 additions & 2 deletions src/KSPACE/msm_cg.cpp
Expand Up @@ -166,7 +166,7 @@ void MSMCG::compute(int eflag, int vflag)
// forward communicate charge density values to fill ghost grid points
// compute direct sum interaction and then restrict to coarser grid

for (int n=0; n<=levels-2; n++) {
for (n=0; n<=levels-2; n++) {
if (!active_flag[n]) continue;
current_level = n;
gc[n]->forward_comm_kspace(this,1,sizeof(double),FORWARD_RHO,
Expand Down Expand Up @@ -209,7 +209,7 @@ void MSMCG::compute(int eflag, int vflag)
// prolongate energy/virial from coarser grid to finer grid
// reverse communicate from ghost grid points to get full sum

for (int n=levels-2; n>=0; n--) {
for (n=levels-2; n>=0; n--) {
if (!active_flag[n]) continue;
prolongation(n);

Expand Down
2 changes: 1 addition & 1 deletion src/KSPACE/pair_born_coul_msm.cpp
Expand Up @@ -195,7 +195,7 @@ void PairBornCoulMSM::compute(int eflag, int vflag)

if (force->kspace->scalar_pressure_flag && vflag) {
for (i = 0; i < 3; i++) virial[i] += force->pair->eng_coul/3.0;
for (int i = 0; i < nmax; i++) {
for (i = 0; i < nmax; i++) {
f[i][0] += ftmp[i][0];
f[i][1] += ftmp[i][1];
f[i][2] += ftmp[i][2];
Expand Down
2 changes: 1 addition & 1 deletion src/KSPACE/pair_buck_coul_msm.cpp
Expand Up @@ -191,7 +191,7 @@ void PairBuckCoulMSM::compute(int eflag, int vflag)

if (force->kspace->scalar_pressure_flag && vflag) {
for (i = 0; i < 3; i++) virial[i] += force->pair->eng_coul/3.0;
for (int i = 0; i < nmax; i++) {
for (i = 0; i < nmax; i++) {
f[i][0] += ftmp[i][0];
f[i][1] += ftmp[i][1];
f[i][2] += ftmp[i][2];
Expand Down
61 changes: 30 additions & 31 deletions src/KSPACE/pair_buck_long_coul_long.cpp
Expand Up @@ -506,40 +506,39 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)

if (order1 && (rsq < cut_coulsq)) { // coulombic
if (!ncoultablebits || rsq <= tabinnersq) { // series real space
double x = g_ewald*r;
double s = qri*q[j], t = 1.0/(1.0+EWALD_P*x);
double x1 = g_ewald*r;
double s = qri*q[j], t = 1.0/(1.0+EWALD_P*x1);
if (ni == 0) {
s *= g_ewald*exp(-x*x);
force_coul = (t *= ((((t*A5+A4)*t+A3)*t+A2)*t+A1)*s/x)+EWALD_F*s;
s *= g_ewald*exp(-x1*x1);
force_coul = (t *= ((((t*A5+A4)*t+A3)*t+A2)*t+A1)*s/x1)+EWALD_F*s;
if (eflag) ecoul = t;
}
else { // special case
double f = s*(1.0-special_coul[ni])/r;
s *= g_ewald*exp(-x*x);
force_coul = (t *= ((((t*A5+A4)*t+A3)*t+A2)*t+A1)*s/x)+EWALD_F*s-f;
if (eflag) ecoul = t-f;
} else { // special case
double fc = s*(1.0-special_coul[ni])/r;
s *= g_ewald*exp(-x1*x1);
force_coul = (t *= ((((t*A5+A4)*t+A3)*t+A2)*t+A1)*s/x1)+EWALD_F*s-fc;
if (eflag) ecoul = t-fc;
}
} // table real space
else {
union_int_float_t t;
t.f = rsq;
const int k = (t.i & ncoulmask) >> ncoulshiftbits;
double f = (rsq-rtable[k])*drtable[k], qiqj = qi*q[j];
double fc = (rsq-rtable[k])*drtable[k], qiqj = qi*q[j];
if (ni == 0) {
force_coul = qiqj*(ftable[k]+f*dftable[k]);
if (eflag) ecoul = qiqj*(etable[k]+f*detable[k]);
force_coul = qiqj*(ftable[k]+fc*dftable[k]);
if (eflag) ecoul = qiqj*(etable[k]+fc*detable[k]);
}
else { // special case
t.f = (1.0-special_coul[ni])*(ctable[k]+f*dctable[k]);
force_coul = qiqj*(ftable[k]+f*dftable[k]-t.f);
if (eflag) ecoul = qiqj*(etable[k]+f*detable[k]-t.f);
t.f = (1.0-special_coul[ni])*(ctable[k]+fc*dctable[k]);
force_coul = qiqj*(ftable[k]+fc*dftable[k]-t.f);
if (eflag) ecoul = qiqj*(etable[k]+fc*detable[k]-t.f);
}
}
} else force_coul = ecoul = 0.0;

if (rsq < cut_bucksqi[typej]) { // buckingham
double rn = r2inv*r2inv*r2inv,
expr = exp(-r*rhoinvi[typej]);
double rn = r2inv*r2inv*r2inv;
double expr = exp(-r*rhoinvi[typej]);
if (order6) { // long-range
if (!ndisptablebits || rsq <= tabinnerdispsq) {
double x2 = g2*rsq, a2 = 1.0/x2;
Expand All @@ -549,10 +548,10 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)
r*expr*buck1i[typej]-g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq;
if (eflag) evdwl = expr*buckai[typej]-g6*((a2+1.0)*a2+0.5)*x2;
} else { // special case
double f = special_lj[ni], t = rn*(1.0-f);
force_buck = f*r*expr*buck1i[typej]-
double fc = special_lj[ni], t = rn*(1.0-fc);
force_buck = fc*r*expr*buck1i[typej]-
g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*buck2i[typej];
if (eflag) evdwl = f*expr*buckai[typej] -
if (eflag) evdwl = fc*expr*buckai[typej] -
g6*((a2+1.0)*a2+0.5)*x2+t*buckci[typej];
}
} else { //table real space
Expand All @@ -564,9 +563,9 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)
force_buck = r*expr*buck1i[typej]-(fdisptable[disp_k]+f_disp*dfdisptable[disp_k])*buckci[typej];
if (eflag) evdwl = expr*buckai[typej]-(edisptable[disp_k]+f_disp*dedisptable[disp_k])*buckci[typej];
} else { //special case
double f = special_lj[ni], t = rn*(1.0-f);
force_buck = f*r*expr*buck1i[typej] -(fdisptable[disp_k]+f_disp*dfdisptable[disp_k])*buckci[typej] +t*buck2i[typej];
if (eflag) evdwl = f*expr*buckai[typej] -(edisptable[disp_k]+f_disp*dedisptable[disp_k])*buckci[typej]+t*buckci[typej];
double fc = special_lj[ni], t = rn*(1.0-fc);
force_buck = fc*r*expr*buck1i[typej] -(fdisptable[disp_k]+f_disp*dfdisptable[disp_k])*buckci[typej] +t*buck2i[typej];
if (eflag) evdwl = fc*expr*buckai[typej] -(edisptable[disp_k]+f_disp*dedisptable[disp_k])*buckci[typej]+t*buckci[typej];
}
}
} else { // cut
Expand All @@ -575,10 +574,10 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)
if (eflag) evdwl = expr*buckai[typej] -
rn*buckci[typej]-offseti[typej];
} else { // special case
double f = special_lj[ni];
force_buck = f*(r*expr*buck1i[typej]-rn*buck2i[typej]);
double fc = special_lj[ni];
force_buck = fc*(r*expr*buck1i[typej]-rn*buck2i[typej]);
if (eflag)
evdwl = f*(expr*buckai[typej]-rn*buckci[typej]-offseti[typej]);
evdwl = fc*(expr*buckai[typej]-rn*buckci[typej]-offseti[typej]);
}
}
}
Expand All @@ -587,10 +586,10 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)
fpair = (force_coul+force_buck)*r2inv;

if (newton_pair || j < nlocal) {
double *fj = f0+(j+(j<<1)), f;
fi[0] += f = d[0]*fpair; fj[0] -= f;
fi[1] += f = d[1]*fpair; fj[1] -= f;
fi[2] += f = d[2]*fpair; fj[2] -= f;
double *fj = f0+(j+(j<<1)), fp;
fi[0] += fp = d[0]*fpair; fj[0] -= fp;
fi[1] += fp = d[1]*fpair; fj[1] -= fp;
fi[2] += fp = d[2]*fpair; fj[2] -= fp;
}
else {
fi[0] += d[0]*fpair;
Expand Down