From 9d654ca91cb2cdf17175cbeac03a90fa55facb2d Mon Sep 17 00:00:00 2001
From: "W. Michael Brown"
Date: Thu, 6 Jan 2011 18:02:09 -0500
Subject: [PATCH] Adding support for non-arithmetic mixing to charmm and
updating docs and restart2data
---
doc/pair_charmm.html | 35 ++++++++++++++++++++++--
doc/pair_charmm.txt | 33 ++++++++++++++++++++--
doc/pair_coeff.html | 4 +++
doc/pair_coeff.txt | 4 +++
doc/pair_lj.html | 16 -----------
doc/pair_lj.txt | 16 -----------
doc/pair_style.html | 4 +++
doc/pair_style.txt | 4 +++
lib/gpu/crml_gpu.cpp | 7 +++--
lib/gpu/crml_gpu_memory.cpp | 4 +--
lib/gpu/crml_gpu_memory.h | 2 +-
src/GPU/pair_lj_charmm_coul_long_gpu.cpp | 8 ++++--
tools/restart2data.cpp | 2 ++
13 files changed, 95 insertions(+), 44 deletions(-)
diff --git a/doc/pair_charmm.html b/doc/pair_charmm.html
index 3bee630f9b..6c4f6e4961 100644
--- a/doc/pair_charmm.html
+++ b/doc/pair_charmm.html
@@ -15,13 +15,15 @@
pair_style lj/charmm/coul/long command
+pair_style lj/charmm/coul/long/gpu command
+
pair_style lj/charmm/coul/long/opt command
Syntax:
pair_style style args
-- style = lj/charmm/coul/charmm or lj/charmm/coul/charmm/implicit or lj/charmm/coul/long or lj/charmm/coul/long/opt
+
- style = lj/charmm/coul/charmm or lj/charmm/coul/charmm/implicit or lj/charmm/coul/long or lj/charmm/coul/long/gpu or lj/charmm/coul/long/opt
- args = list of arguments for a particular style
lj/charmm/coul/charmm args = inner outer (inner2) (outer2)
@@ -34,6 +36,10 @@
inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args)
cutoff = global cutoff for Coulombic (optional, outer is Coulombic cutoff if only 2 args)
+ lj/charmm/coul/long/gpu args = inner outer (cutoff)
+ inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args)
+ cutoff = global cutoff for Coulombic (optional, outer is Coulombic cutoff if only 2 args)
+
Examples:
pair_style lj/charmm/coul/charmm 8.0 10.0
@@ -86,6 +92,9 @@ applied to the Coulombic term, as in the discussion for pair style
command, then the outer LJ cutoff is used as the single Coulombic
cutoff.
+Style lj/charmm/coul/long/gpu is a GPU-enabled version of style lj/charmm/coul/long.
+See more details below.
+
Style lj/charmm/coul/long/opt is an optimized version of style
lj/charmm/coul/long that should give identical answers. Depending
on system size and the processor you are running on, it may be 5-25%
@@ -115,6 +124,26 @@ the pair_style command.
+The lj/charmm/coul/long/gpu style is identical to the lj/charmm/coul/long
+style, except that each processor off-loads its pairwise calculations to
+a GPU chip. Depending on the hardware available on your system this can
+provide a significant speed-up. See the Running on
+GPUs section of the manual for more details
+about hardware and software requirements for using GPUs.
+
+More details about these settings and various possible hardware
+configuration are in this section of the
+manual.
+
+Additional requirements in your input script to run with style
+lj/charmm/coul/long/gpu are as follows:
+
+The newton pair setting must be off and
+fix gpu must be used. The fix controls the
+essential GPU selection and initialization steps.
+
+
+
Mixing, shift, table, tail correction, restart, rRESPA info:
For atom type pairs I,J and I != J, the epsilon, sigma, epsilon_14,
@@ -154,7 +183,9 @@ support the pair keyword of run_style respa. See the
The lj/charmm/coul/charmm and lj/charmm/coul/charmm/implicit
styles are part of the "molecule" package. The lj/charmm/coul/long
-style is part of the "kspace" package. The lj/charmm/coul/long/opt
+style is part of the "kspace" package. The lj/charmm/coul/long/gpu
+style is part of the "gpu" package and also requires the "kspace"
+package. The lj/charmm/coul/long/opt
style is part of the "opt" package and also requires the "kspace"
package. They are only enabled if LAMMPS was built with those
package(s) (molecule and kspace are by default). See the Making
diff --git a/doc/pair_charmm.txt b/doc/pair_charmm.txt
index 5acfab26fe..8d37c3c5cf 100644
--- a/doc/pair_charmm.txt
+++ b/doc/pair_charmm.txt
@@ -9,13 +9,14 @@
pair_style lj/charmm/coul/charmm command :h3
pair_style lj/charmm/coul/charmm/implicit command :h3
pair_style lj/charmm/coul/long command :h3
+pair_style lj/charmm/coul/long/gpu command :h3
pair_style lj/charmm/coul/long/opt command :h3
[Syntax:]
pair_style style args :pre
-style = {lj/charmm/coul/charmm} or {lj/charmm/coul/charmm/implicit} or {lj/charmm/coul/long} or {lj/charmm/coul/long/opt}
+style = {lj/charmm/coul/charmm} or {lj/charmm/coul/charmm/implicit} or {lj/charmm/coul/long} or {lj/charmm/coul/long/gpu} or {lj/charmm/coul/long/opt}
args = list of arguments for a particular style :ul
{lj/charmm/coul/charmm} args = inner outer (inner2) (outer2)
inner, outer = global switching cutoffs for Lennard Jones (and Coulombic if only 2 args)
@@ -26,6 +27,9 @@ args = list of arguments for a particular style :ul
{lj/charmm/coul/long} args = inner outer (cutoff)
inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args)
cutoff = global cutoff for Coulombic (optional, outer is Coulombic cutoff if only 2 args) :pre
+ {lj/charmm/coul/long/gpu} args = inner outer (cutoff)
+ inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args)
+ cutoff = global cutoff for Coulombic (optional, outer is Coulombic cutoff if only 2 args) :pre
[Examples:]
@@ -79,6 +83,9 @@ applied to the Coulombic term, as in the discussion for pair style
command, then the outer LJ cutoff is used as the single Coulombic
cutoff.
+Style {lj/charmm/coul/long/gpu} is a GPU-enabled version of style {lj/charmm/coul/long}.
+See more details below.
+
Style {lj/charmm/coul/long/opt} is an optimized version of style
{lj/charmm/coul/long} that should give identical answers. Depending
on system size and the processor you are running on, it may be 5-25%
@@ -108,6 +115,26 @@ the pair_style command.
:line
+The {lj/charmm/coul/long/gpu} style is identical to the {lj/charmm/coul/long}
+style, except that each processor off-loads its pairwise calculations to
+a GPU chip. Depending on the hardware available on your system this can
+provide a significant speed-up. See the "Running on
+GPUs"_Section_start.html#2_8 section of the manual for more details
+about hardware and software requirements for using GPUs.
+
+More details about these settings and various possible hardware
+configuration are in "this section"_Section_start.html#2_8 of the
+manual.
+
+Additional requirements in your input script to run with style
+{lj/charmm/coul/long/gpu} are as follows:
+
+The "newton pair"_newton.html setting must be {off} and
+"fix gpu"_fix_gpu.html must be used. The fix controls the
+essential GPU selection and initialization steps.
+
+:line
+
[Mixing, shift, table, tail correction, restart, rRESPA info]:
For atom type pairs I,J and I != J, the epsilon, sigma, epsilon_14,
@@ -147,7 +174,9 @@ support the {pair} keyword of run_style respa. See the
The {lj/charmm/coul/charmm} and {lj/charmm/coul/charmm/implicit}
styles are part of the "molecule" package. The {lj/charmm/coul/long}
-style is part of the "kspace" package. The {lj/charmm/coul/long/opt}
+style is part of the "kspace" package. The {lj/charmm/coul/long/gpu}
+style is part of the "gpu" package and also requires the "kspace"
+package. The {lj/charmm/coul/long/opt}
style is part of the "opt" package and also requires the "kspace"
package. They are only enabled if LAMMPS was built with those
package(s) (molecule and kspace are by default). See the "Making
diff --git a/doc/pair_coeff.html b/doc/pair_coeff.html
index 3f5accaabb..36f8c74033 100644
--- a/doc/pair_coeff.html
+++ b/doc/pair_coeff.html
@@ -119,6 +119,7 @@ the pair_style command, and coefficients specified by the associated
pair_style lj/charmm/coul/charmm - CHARMM potential with cutoff Coulomb
pair_style lj/charmm/coul/charmm/implicit - CHARMM for implicit solvent
pair_style lj/charmm/coul/long - CHARMM with long-range Coulomb
+pair_style lj/charmm/coul/long/gpu - GPU-enabled version of CHARMM with long-range Coulomb
pair_style lj/charmm/coul/long/opt - optimized version of CHARMM with long-range Coulomb
pair_style lj/class2 - COMPASS (class 2) force field with no Coulomb
pair_style lj/class2/coul/cut - COMPASS with cutoff Coulomb
@@ -127,14 +128,17 @@ the pair_style command, and coefficients specified by the associated
pair_style lj/cut/gpu - GPU-enabled version of cutoff LJ
pair_style lj/cut/opt - optimized version of cutoff LJ
pair_style lj/cut/coul/cut - LJ with cutoff Coulomb
+pair_style lj/cut/coul/cut/gpu - GPU-enabled version of LJ with cutoff Coulomb
pair_style lj/cut/coul/debye - LJ with Debye screening added to Coulomb
pair_style lj/cut/coul/long - LJ with long-range Coulomb
+pair_style lj/cut/coul/long/gpu - GPU-enabled version of LJ with long-range Coulomb
pair_style lj/cut/coul/long/tip4p - LJ with long-range Coulomb for TIP4P water
pair_style lj/expand - Lennard-Jones for variable size particles
pair_style lj/gromacs - GROMACS-style Lennard-Jones potential
pair_style lj/gromacs/coul/gromacs - GROMACS-style LJ and Coulombic potential
pair_style lj/smooth - smoothed Lennard-Jones potential
pair_style lj96/cut - Lennard-Jones 9/6 potential
+pair_style lj96/cut/gpu - GPU-enabled version of Lennard-Jones 9/6
pair_style lubricate - hydrodynamic lubrication forces
pair_style meam - modified embedded atom method (MEAM)
pair_style morse - Morse potential
diff --git a/doc/pair_coeff.txt b/doc/pair_coeff.txt
index 72e8c2356b..09c2dc401a 100644
--- a/doc/pair_coeff.txt
+++ b/doc/pair_coeff.txt
@@ -116,6 +116,7 @@ the pair_style command, and coefficients specified by the associated
"pair_style lj/charmm/coul/charmm"_pair_charmm.html - CHARMM potential with cutoff Coulomb
"pair_style lj/charmm/coul/charmm/implicit"_pair_charmm.html - CHARMM for implicit solvent
"pair_style lj/charmm/coul/long"_pair_charmm.html - CHARMM with long-range Coulomb
+"pair_style lj/charmm/coul/long/gpu"_pair_charmm.html - GPU-enabled version of CHARMM with long-range Coulomb
"pair_style lj/charmm/coul/long/opt"_pair_charmm.html - optimized version of CHARMM with long-range Coulomb
"pair_style lj/class2"_pair_class2.html - COMPASS (class 2) force field with no Coulomb
"pair_style lj/class2/coul/cut"_pair_class2.html - COMPASS with cutoff Coulomb
@@ -124,14 +125,17 @@ the pair_style command, and coefficients specified by the associated
"pair_style lj/cut/gpu"_pair_lj.html - GPU-enabled version of cutoff LJ
"pair_style lj/cut/opt"_pair_lj.html - optimized version of cutoff LJ
"pair_style lj/cut/coul/cut"_pair_lj.html - LJ with cutoff Coulomb
+"pair_style lj/cut/coul/cut/gpu"_pair_lj.html - GPU-enabled version of LJ with cutoff Coulomb
"pair_style lj/cut/coul/debye"_pair_lj.html - LJ with Debye screening added to Coulomb
"pair_style lj/cut/coul/long"_pair_lj.html - LJ with long-range Coulomb
+"pair_style lj/cut/coul/long/gpu"_pair_lj.html - GPU-enabled version of LJ with long-range Coulomb
"pair_style lj/cut/coul/long/tip4p"_pair_lj.html - LJ with long-range Coulomb for TIP4P water
"pair_style lj/expand"_pair_lj_expand.html - Lennard-Jones for variable size particles
"pair_style lj/gromacs"_pair_gromacs.html - GROMACS-style Lennard-Jones potential
"pair_style lj/gromacs/coul/gromacs"_pair_gromacs.html - GROMACS-style LJ and Coulombic potential
"pair_style lj/smooth"_pair_lj_smooth.html - smoothed Lennard-Jones potential
"pair_style lj96/cut"_pair_lj96_cut.html - Lennard-Jones 9/6 potential
+"pair_style lj96/cut/gpu"_pair_lj96_cut.html - GPU-enabled version of Lennard-Jones 9/6
"pair_style lubricate"_pair_lubricate.html - hydrodynamic lubrication forces
"pair_style meam"_pair_meam.html - modified embedded atom method (MEAM)
"pair_style morse"_pair_morse.html - Morse potential
diff --git a/doc/pair_lj.html b/doc/pair_lj.html
index 2c0887eb45..8a01c1c188 100644
--- a/doc/pair_lj.html
+++ b/doc/pair_lj.html
@@ -199,22 +199,6 @@ speed-up. See the Running on GPUs sectio
the manual for more details about hardware and software requirements
for using GPUs.
-The gpumode and gpuID settings in the pair_style command refer to
-how the GPUs on your system are configured.
-
-Set gpumode to one/node if you have a single compute "node" on
-your system, which may have multiple cores and/or GPUs. GpuID
-should be set to the ID of the (first) GPU you wish to use with LAMMPS
-(another GPU might be driving your display).
-
-Set gpumode to one/gpu if you have multiple compute "nodes" on
-your system, with one GPU per node. GpuID should be set to the ID
-of the GPU.
-
-Set gpumode to multi/gpu if you have multiple compute "nodes" on
-your system, each with multiple GPUs. GpuID should be set to the
-number of GPUs per node.
-
More details about these settings and various possible hardware
configuration are in this section of the
manual.
diff --git a/doc/pair_lj.txt b/doc/pair_lj.txt
index 239199f81b..bd69965df4 100644
--- a/doc/pair_lj.txt
+++ b/doc/pair_lj.txt
@@ -188,22 +188,6 @@ speed-up. See the "Running on GPUs"_Section_start.html#2_8 section of
the manual for more details about hardware and software requirements
for using GPUs.
-The {gpumode} and {gpuID} settings in the pair_style command refer to
-how the GPUs on your system are configured.
-
-Set {gpumode} to {one/node} if you have a single compute "node" on
-your system, which may have multiple cores and/or GPUs. {GpuID}
-should be set to the ID of the (first) GPU you wish to use with LAMMPS
-(another GPU might be driving your display).
-
-Set {gpumode} to {one/gpu} if you have multiple compute "nodes" on
-your system, with one GPU per node. {GpuID} should be set to the ID
-of the GPU.
-
-Set {gpumode} to {multi/gpu} if you have multiple compute "nodes" on
-your system, each with multiple GPUs. {GpuID} should be set to the
-number of GPUs per node.
-
More details about these settings and various possible hardware
configuration are in "this section"_Section_start.html#2_8 of the
manual.
diff --git a/doc/pair_style.html b/doc/pair_style.html
index 66b2bf8c9f..450428a7bc 100644
--- a/doc/pair_style.html
+++ b/doc/pair_style.html
@@ -121,6 +121,7 @@ the pair_style command, and coefficients specified by the associated
pair_style lj/charmm/coul/charmm - CHARMM potential with cutoff Coulomb
pair_style lj/charmm/coul/charmm/implicit - CHARMM for implicit solvent
pair_style lj/charmm/coul/long - CHARMM with long-range Coulomb
+pair_style lj/charmm/coul/long/gpu - GPU-enabled version of CHARMM with long-range Coulomb
pair_style lj/charmm/coul/long/opt - optimized version of CHARMM with long-range Coulomb
pair_style lj/class2 - COMPASS (class 2) force field with no Coulomb
pair_style lj/class2/coul/cut - COMPASS with cutoff Coulomb
@@ -129,14 +130,17 @@ the pair_style command, and coefficients specified by the associated
pair_style lj/cut/gpu - GPU-enabled version of cutoff LJ
pair_style lj/cut/opt - optimized version of cutoff LJ
pair_style lj/cut/coul/cut - LJ with cutoff Coulomb
+pair_style lj/cut/coul/cut/gpu - GPU-enabled version of LJ with cutoff Coulomb
pair_style lj/cut/coul/debye - LJ with Debye screening added to Coulomb
pair_style lj/cut/coul/long - LJ with long-range Coulomb
+pair_style lj/cut/coul/long/gpu - GPU-enabled version of LJ with long-range Coulomb
pair_style lj/cut/coul/long/tip4p - LJ with long-range Coulomb for TIP4P water
pair_style lj/expand - Lennard-Jones for variable size particles
pair_style lj/gromacs - GROMACS-style Lennard-Jones potential
pair_style lj/gromacs/coul/gromacs - GROMACS-style LJ and Coulombic potential
pair_style lj/smooth - smoothed Lennard-Jones potential
pair_style lj96/cut - Lennard-Jones 9/6 potential
+pair_style lj96/cut/gpu - GPU-enabled version of Lennard-Jones 9/6
pair_style lubricate - hydrodynamic lubrication forces
pair_style meam - modified embedded atom method (MEAM)
pair_style morse - Morse potential
diff --git a/doc/pair_style.txt b/doc/pair_style.txt
index 145fba932d..0db8457ea5 100644
--- a/doc/pair_style.txt
+++ b/doc/pair_style.txt
@@ -118,6 +118,7 @@ the pair_style command, and coefficients specified by the associated
"pair_style lj/charmm/coul/charmm"_pair_charmm.html - CHARMM potential with cutoff Coulomb
"pair_style lj/charmm/coul/charmm/implicit"_pair_charmm.html - CHARMM for implicit solvent
"pair_style lj/charmm/coul/long"_pair_charmm.html - CHARMM with long-range Coulomb
+"pair_style lj/charmm/coul/long/gpu"_pair_charmm.html - GPU-enabled version of CHARMM with long-range Coulomb
"pair_style lj/charmm/coul/long/opt"_pair_charmm.html - optimized version of CHARMM with long-range Coulomb
"pair_style lj/class2"_pair_class2.html - COMPASS (class 2) force field with no Coulomb
"pair_style lj/class2/coul/cut"_pair_class2.html - COMPASS with cutoff Coulomb
@@ -126,14 +127,17 @@ the pair_style command, and coefficients specified by the associated
"pair_style lj/cut/gpu"_pair_lj.html - GPU-enabled version of cutoff LJ
"pair_style lj/cut/opt"_pair_lj.html - optimized version of cutoff LJ
"pair_style lj/cut/coul/cut"_pair_lj.html - LJ with cutoff Coulomb
+"pair_style lj/cut/coul/cut/gpu"_pair_lj.html - GPU-enabled version of LJ with cutoff Coulomb
"pair_style lj/cut/coul/debye"_pair_lj.html - LJ with Debye screening added to Coulomb
"pair_style lj/cut/coul/long"_pair_lj.html - LJ with long-range Coulomb
+"pair_style lj/cut/coul/long/gpu"_pair_lj.html - GPU-enabled version of LJ with long-range Coulomb
"pair_style lj/cut/coul/long/tip4p"_pair_lj.html - LJ with long-range Coulomb for TIP4P water
"pair_style lj/expand"_pair_lj_expand.html - Lennard-Jones for variable size particles
"pair_style lj/gromacs"_pair_gromacs.html - GROMACS-style Lennard-Jones potential
"pair_style lj/gromacs/coul/gromacs"_pair_gromacs.html - GROMACS-style LJ and Coulombic potential
"pair_style lj/smooth"_pair_lj_smooth.html - smoothed Lennard-Jones potential
"pair_style lj96/cut"_pair_lj96_cut.html - Lennard-Jones 9/6 potential
+"pair_style lj96/cut/gpu"_pair_lj96_cut.html - GPU-enabled version of Lennard-Jones 9/6
"pair_style lubricate"_pair_lubricate.html - hydrodynamic lubrication forces
"pair_style meam"_pair_meam.html - modified embedded atom method (MEAM)
"pair_style morse"_pair_morse.html - Morse potential
diff --git a/lib/gpu/crml_gpu.cpp b/lib/gpu/crml_gpu.cpp
index 091b8e435f..7458300907 100644
--- a/lib/gpu/crml_gpu.cpp
+++ b/lib/gpu/crml_gpu.cpp
@@ -37,7 +37,7 @@ bool crml_gpu_init(const int ntypes, double cut_bothsq, double **host_lj1,
double *host_special_coul, const double qqrd2e,
const double g_ewald, const double cut_lj_innersq,
const double denom_lj, double **epsilon,
- double **sigma) {
+ double **sigma, const bool mix_arithmetic) {
CRMLMF.clear();
gpu_mode=CRMLMF.device->gpu_mode();
double gpu_split=CRMLMF.device->particle_split();
@@ -64,7 +64,7 @@ bool crml_gpu_init(const int ntypes, double cut_bothsq, double **host_lj1,
maxspecial, cell_size, gpu_split, screen,
host_cut_ljsq, host_cut_coulsq, host_special_coul,
qqrd2e, g_ewald, cut_lj_innersq, denom_lj,
- epsilon,sigma);
+ epsilon,sigma,mix_arithmetic);
if (!init_ok)
return false;
}
@@ -88,7 +88,8 @@ bool crml_gpu_init(const int ntypes, double cut_bothsq, double **host_lj1,
maxspecial, cell_size, gpu_split,
screen, host_cut_ljsq, host_cut_coulsq,
host_special_coul, qqrd2e, g_ewald,
- cut_lj_innersq, denom_lj, epsilon, sigma);
+ cut_lj_innersq, denom_lj, epsilon, sigma,
+ mix_arithmetic);
if (!init_ok)
return false;
}
diff --git a/lib/gpu/crml_gpu_memory.cpp b/lib/gpu/crml_gpu_memory.cpp
index 7ec894a345..e877503e87 100644
--- a/lib/gpu/crml_gpu_memory.cpp
+++ b/lib/gpu/crml_gpu_memory.cpp
@@ -55,14 +55,14 @@ bool CRML_GPU_MemoryT::init(const int ntypes,
double *host_special_coul, const double qqrd2e,
const double g_ewald, const double cut_lj_innersq,
const double denom_lj, double **epsilon,
- double **sigma) {
+ double **sigma, const bool mix_arithmetic) {
this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
_screen,crml_gpu_kernel);
// If atom type constants fit in shared memory use fast kernel
int lj_types=ntypes;
shared_types=false;
- if (this->_block_size>=64)
+ if (this->_block_size>=64 && mix_arithmetic)
shared_types=true;
_lj_types=lj_types;
diff --git a/lib/gpu/crml_gpu_memory.h b/lib/gpu/crml_gpu_memory.h
index 34d8c2c6f7..5520cd3a17 100644
--- a/lib/gpu/crml_gpu_memory.h
+++ b/lib/gpu/crml_gpu_memory.h
@@ -39,7 +39,7 @@ class CRML_GPU_Memory : public ChargeGPUMemory {
const double host_cut_coulsq, double *host_special_coul,
const double qqrd2e, const double g_ewald,
const double cut_lj_innersq, const double denom_lj,
- double **epsilon, double **sigma);
+ double **epsilon, double **sigma, const bool mix_arithmetic);
/// Clear all host and device data
/** \note This is called at the beginning of the init() routine **/
diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp
index f0f31ae9ed..443ed2789e 100644
--- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp
+++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp
@@ -56,7 +56,8 @@ bool crml_gpu_init(const int ntypes, double cut_bothsq, double **host_lj1,
double host_cut_ljsq, double host_cut_coulsq,
double *host_special_coul, const double qqrd2e,
const double g_ewald, const double cut_lj_innersq,
- const double denom_lj, double **epsilon, double **sigma);
+ const double denom_lj, double **epsilon, double **sigma,
+ const bool mix_arithmetic);
void crml_gpu_clear();
int * crml_gpu_compute_n(const int timestep, const int ago, const int inum,
const int nall, double **host_x, int *host_type,
@@ -74,6 +75,8 @@ double crml_gpu_bytes();
using namespace LAMMPS_NS;
+enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER};
+
/* ---------------------------------------------------------------------- */
PairLJCharmmCoulLongGPU::PairLJCharmmCoulLongGPU(LAMMPS *lmp) : PairLJCharmmCoulLong(lmp), gpu_mode(GPU_PAIR)
@@ -181,7 +184,8 @@ void PairLJCharmmCoulLongGPU::init_style()
atom->nlocal+atom->nghost, 300, maxspecial,
cell_size, gpu_mode, screen, cut_ljsq,
cut_coulsq, force->special_coul, force->qqrd2e,
- g_ewald, cut_lj_innersq,denom_lj,epsilon,sigma);
+ g_ewald, cut_lj_innersq,denom_lj,epsilon,sigma,
+ mix_flag == ARITHMETIC);
if (!init_ok)
error->one("Insufficient memory on accelerator (or no fix gpu).\n");
diff --git a/tools/restart2data.cpp b/tools/restart2data.cpp
index 7500093493..594e4b62e7 100644
--- a/tools/restart2data.cpp
+++ b/tools/restart2data.cpp
@@ -1627,6 +1627,7 @@ void pair(FILE *fp, Data &data, char *style, int flag)
} else if ((strcmp(style,"lj/charmm/coul/charmm") == 0) ||
(strcmp(style,"lj/charmm/coul/charmm/implicit") == 0) ||
(strcmp(style,"lj/charmm/coul/long") == 0) ||
+ (strcmp(style,"lj/charmm/coul/long/gpu") == 0) ||
(strcmp(style,"lj/charmm/coul/long/opt") == 0)) {
if (strcmp(style,"lj/charmm/coul/charmm") == 0) {
@@ -1644,6 +1645,7 @@ void pair(FILE *fp, Data &data, char *style, int flag)
int offset_flag = read_int(fp);
int mix_flag = read_int(fp);
} else if ((strcmp(style,"lj/charmm/coul/long") == 0) ||
+ (strcmp(style,"lj/charmm/coul/long/gpu") == 0) ||
(strcmp(style,"lj/charmm/coul/long/opt") == 0)) {
double cut_lj_inner = read_double(fp);
double cut_lj = read_double(fp);