Enabled newton pair on for gpu pair styles
This commit is contained in:
@ -21,7 +21,7 @@ LMP_INC = -DLAMMPS_SMALLBIG
|
||||
# -D_DOUBLE_DOUBLE # Double precision for all calculations
|
||||
# -D_SINGLE_DOUBLE # Accumulation of forces, etc. in double
|
||||
|
||||
CUDA_PRECISION = -D_SINGLE_DOUBLE
|
||||
CUDA_PRECISION = -D_DOUBLE_DOUBLE
|
||||
|
||||
BIN_DIR = ./
|
||||
OBJ_DIR = ./
|
||||
|
||||
@ -113,8 +113,8 @@ action pair_lj_cut_coul_msm_gpu.cpp pair_lj_cut_coul_msm.cpp
|
||||
action pair_lj_cut_coul_msm_gpu.h pair_lj_cut_coul_msm.h
|
||||
action pair_lj_cut_gpu.cpp
|
||||
action pair_lj_cut_gpu.h
|
||||
action pair_lj_smooth_gpu.cpp
|
||||
action pair_lj_smooth_gpu.h
|
||||
action pair_lj_smooth_gpu.cpp pair_lj_smooth.cpp
|
||||
action pair_lj_smooth_gpu.h pair_lj_smooth.cpp
|
||||
action pair_lj_expand_gpu.cpp
|
||||
action pair_lj_expand_gpu.h
|
||||
action pair_lj_expand_coul_long_gpu.cpp pair_lj_expand_coul_long.cpp
|
||||
|
||||
@ -127,7 +127,7 @@ FixGPU::FixGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||
_gpu_mode = GPU_NEIGH;
|
||||
_particle_split = 1.0;
|
||||
int nthreads = 0;
|
||||
int newtonflag = 0;
|
||||
int newtonflag = force->newton_pair;
|
||||
int threads_per_atom = -1;
|
||||
double binsize = 0.0;
|
||||
char *opencl_args = nullptr;
|
||||
@ -211,14 +211,16 @@ FixGPU::FixGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||
#endif
|
||||
|
||||
// set newton pair flag
|
||||
// require newtonflag = 0 since currently required by all GPU pair styles
|
||||
|
||||
if (newtonflag == 1) error->all(FLERR,"Illegal package gpu command");
|
||||
|
||||
force->newton_pair = newtonflag;
|
||||
if (force->newton_pair || force->newton_bond) force->newton = 1;
|
||||
else force->newton = 0;
|
||||
|
||||
// require newton pair off if _particle_split < 1
|
||||
|
||||
if (force->newton_pair == 1 && _particle_split < 1)
|
||||
error->all(FLERR,"Cannot use newton pair on for split less than 1");
|
||||
|
||||
if (pair_only_flag) {
|
||||
lmp->suffixp = lmp->suffix;
|
||||
lmp->suffix = nullptr;
|
||||
@ -341,7 +343,23 @@ void FixGPU::post_force(int /* vflag */)
|
||||
force->pair->virial[4] += lvirial[4];
|
||||
force->pair->virial[5] += lvirial[5];
|
||||
|
||||
if (force->pair->vflag_fdotr) force->pair->virial_fdotr_compute();
|
||||
// for newton pair off: force->pair->vflag_fdotr = 0
|
||||
// which has been the case so far, virial_fdotr_compute() is never called
|
||||
// for newton pair on: force->pair->vflag_fdotr = 1
|
||||
// for neigh yes: full neighbor lists are built on the device
|
||||
// for neigh no: full neighbor lists are built on the host
|
||||
// either way the virial is tallied to force->pair->virial as above
|
||||
// so as long as _particle_split == 1
|
||||
// no need to call force->pair->virial_fdotr_compute();
|
||||
// If _particle_split < 1, the local atom forces computed by
|
||||
// the gpu pair styles on the host (cpu_compute()) got tallied
|
||||
// by comm->reverse_comm() (which is done before this post_force() function).
|
||||
// A call to force->pair->virial_fdotr_compute() would double count
|
||||
// the virial from the local atoms on the host.
|
||||
// Here a possible workaround is to comment out the below command
|
||||
// while enforcing newton pair off for _particle_split < 1.
|
||||
|
||||
//if (force->pair->vflag_fdotr) force->pair->virial_fdotr_compute();
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
|
||||
@ -138,8 +138,10 @@ void PairBeckGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairBeckGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style beck/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -157,8 +157,10 @@ void PairBornCoulLongCSGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style born/coul/long/cs/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR, "Pair style born/coul/long/cs/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -152,8 +152,10 @@ void PairBornCoulLongGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style born/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR, "Pair style born/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -147,8 +147,10 @@ void PairBornCoulWolfCSGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style born/coul/wolf/cs/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR, "Pair style born/coul/wolf/cs/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -145,8 +145,10 @@ void PairBornCoulWolfGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style born/coul/wolf/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR, "Pair style born/coul/wolf/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -134,8 +134,10 @@ void PairBornGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairBornGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style born/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -139,8 +139,10 @@ void PairBuckCoulCutGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style buck/coul/cut/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR, "Pair style buck/coul/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -148,8 +148,10 @@ void PairBuckCoulLongGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style buck/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR, "Pair style buck/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -132,8 +132,10 @@ void PairBuckGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairBuckGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style buck/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -133,8 +133,10 @@ void PairColloidGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairColloidGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style colloid/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -137,8 +137,10 @@ void PairCoulCutGPU::init_style()
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style coul/cut/gpu requires atom attribute q");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style coul/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -138,8 +138,10 @@ void PairCoulDebyeGPU::init_style()
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style coul/debye/gpu requires atom attribute q");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style coul/debye/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -149,8 +149,10 @@ void PairCoulDSFGPU::init_style()
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style coul/dsf/gpu requires atom attribute q");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style coul/dsf/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -152,8 +152,10 @@ void PairCoulLongCSGPU::init_style()
|
||||
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style coul/long/cs/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style coul/long/cs/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Call init_one calculation make sure scale is correct
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
|
||||
@ -147,8 +147,10 @@ void PairCoulLongGPU::init_style()
|
||||
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Call init_one calculation make sure scale is correct
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
|
||||
@ -279,8 +279,10 @@ void PairDPDGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairDPDGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style dpd/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -298,8 +298,10 @@ void PairDPDTstatGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairDPDTstatGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style dpd/tstat/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -156,8 +156,10 @@ void PairEAMAlloyGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairEAMAlloyGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style eam/alloy/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// convert read-in file(s) to arrays and spline them
|
||||
|
||||
|
||||
@ -155,8 +155,10 @@ void PairEAMFSGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairEAMFSGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style eam/fs/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// convert read-in file(s) to arrays and spline them
|
||||
|
||||
|
||||
@ -155,8 +155,10 @@ void PairEAMGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairEAMGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style eam/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// convert read-in file(s) to arrays and spline them
|
||||
|
||||
|
||||
@ -130,8 +130,10 @@ void PairGaussGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairGaussGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style gauss/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -160,8 +160,10 @@ void PairGayBerneGPU::init_style()
|
||||
avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
if (!avec)
|
||||
error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style gayberne/gpu requires newton pair off");
|
||||
*/
|
||||
if (!atom->ellipsoid_flag)
|
||||
error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid");
|
||||
|
||||
|
||||
@ -131,8 +131,10 @@ void PairLJ96CutGPU::init_style()
|
||||
{
|
||||
cut_respa = nullptr;
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj96/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -129,8 +129,10 @@ void PairLJCharmmCoulCharmmGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style lj/charmm/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR, "Pair style lj/charmm/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeated cutsq calculation in init_one() is required for GPU package
|
||||
|
||||
|
||||
@ -152,8 +152,10 @@ void PairLJCharmmCoulLongGPU::init_style()
|
||||
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/charmm/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/charmm/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
|
||||
|
||||
@ -147,8 +147,10 @@ void PairLJClass2CoulLongGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/class2/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/class2/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -129,8 +129,10 @@ void PairLJClass2GPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairLJClass2GPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/class2/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -135,8 +135,10 @@ void PairLJCubicGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairLJCubicGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cubic/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -139,8 +139,10 @@ void PairLJCutCoulCutGPU::init_style()
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires atom attribute q");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -141,8 +141,10 @@ void PairLJCutCoulDebyeGPU::init_style()
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/debye/gpu requires atom attribute q");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/debye/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -151,8 +151,10 @@ void PairLJCutCoulDSFGPU::init_style()
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/dsf/gpu requires atom attribute q");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/dsf/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -152,8 +152,10 @@ void PairLJCutCoulLongGPU::init_style()
|
||||
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -144,8 +144,10 @@ void PairLJCutCoulMSMGPU::init_style()
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires atom attribute q");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/msm/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
if (force->kspace->scalar_pressure_flag)
|
||||
error->all(FLERR,"Must use 'kspace_modify pressure/scalar no' with GPU MSM Pair styles");
|
||||
|
||||
@ -143,8 +143,10 @@ void PairLJCutDipoleCutGPU::init_style()
|
||||
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
|
||||
error->all(FLERR,"Pair dipole/cut/gpu requires atom attributes q, mu, torque");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style dipole/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
if (strcmp(update->unit_style,"electron") == 0)
|
||||
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");
|
||||
|
||||
@ -155,8 +155,10 @@ void PairLJCutDipoleLongGPU::init_style()
|
||||
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
|
||||
error->all(FLERR,"Pair dipole/cut/gpu requires atom attributes q, mu, torque");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style dipole/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
if (strcmp(update->unit_style,"electron") == 0)
|
||||
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");
|
||||
|
||||
@ -135,8 +135,10 @@ void PairLJCutGPU::init_style()
|
||||
{
|
||||
cut_respa = nullptr;
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -168,8 +168,10 @@ void PairLJCutTIP4PLongGPU::init_style()
|
||||
error->all(FLERR,"Pair style lj/cut/tip4p/long/gpu requires atom IDs");
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR, "Pair style lj/cut/tip4p/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/tip4p/long/gpu requires newton pair off");
|
||||
*/
|
||||
if (force->bond == nullptr)
|
||||
error->all(FLERR,"Must use a bond style with TIP4P potential");
|
||||
if (force->angle == nullptr)
|
||||
|
||||
@ -152,8 +152,10 @@ void PairLJExpandCoulLongGPU::init_style()
|
||||
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -132,8 +132,10 @@ void PairLJExpandGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairLJExpandGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/expand/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -134,8 +134,10 @@ void PairLJGromacsGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairLJGromacsGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/gromacs/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -156,8 +156,10 @@ void PairLJSDKCoulLongGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style lj/sdk/coul/long/gpu requires atom attribute q");
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/sdk/coul/long/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -137,8 +137,10 @@ void PairLJSDKGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairLJSDKGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style lj/sdk/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -142,8 +142,10 @@ void PairLJSFDipoleSFGPU::init_style()
|
||||
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
|
||||
error->all(FLERR,"Pair dipole/sf/gpu requires atom attributes q, mu, torque");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style dipole/sf/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
if (strcmp(update->unit_style,"electron") == 0)
|
||||
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");
|
||||
|
||||
@ -136,8 +136,10 @@ void PairLJSmoothGPU::compute(int eflag, int vflag)
|
||||
void PairLJSmoothGPU::init_style()
|
||||
{
|
||||
//cut_respa = nullptr;
|
||||
/*
|
||||
|
||||
if (force->newton_pair) error->all(FLERR, "Pair style lj/smooth/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -132,8 +132,10 @@ void PairMIECutGPU::init_style()
|
||||
{
|
||||
cut_respa = nullptr;
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style mie/cut/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -128,8 +128,10 @@ void PairMorseGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairMorseGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style morse/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -159,8 +159,10 @@ void PairRESquaredGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairRESquaredGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style resquared/gpu requires newton pair off");
|
||||
*/
|
||||
if (!atom->ellipsoid_flag)
|
||||
error->all(FLERR,"Pair resquared/gpu requires atom style ellipsoid");
|
||||
|
||||
|
||||
@ -133,8 +133,10 @@ void PairSoftGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairSoftGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style soft/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -148,8 +148,10 @@ void PairSWGPU::init_style()
|
||||
|
||||
if (atom->tag_enable == 0)
|
||||
error->all(FLERR,"Pair style sw/gpu requires atom IDs");
|
||||
/*
|
||||
if (force->newton_pair != 0)
|
||||
error->all(FLERR,"Pair style sw/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
double **c1, **c2, **c3, **c4, **c5, **c6;
|
||||
double **ncutsq, **ncut, **sigma, **powerp, **powerq, **sigma_gamma;
|
||||
|
||||
@ -132,8 +132,10 @@ void PairTableGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairTableGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style table/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
int ntypes = atom->ntypes;
|
||||
|
||||
|
||||
@ -154,8 +154,10 @@ void PairTersoffGPU::init_style()
|
||||
|
||||
if (atom->tag_enable == 0)
|
||||
error->all(FLERR,"Pair style tersoff/gpu requires atom IDs");
|
||||
/*
|
||||
if (force->newton_pair != 0)
|
||||
error->all(FLERR,"Pair style tersoff/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
double *lam1, *lam2, *lam3, *powermint;
|
||||
double *biga, *bigb, *bigr, *bigd;
|
||||
|
||||
@ -148,8 +148,10 @@ void PairTersoffMODGPU::init_style()
|
||||
|
||||
if (atom->tag_enable == 0)
|
||||
error->all(FLERR,"Pair style tersoff/mod/gpu requires atom IDs");
|
||||
/*
|
||||
if (force->newton_pair != 0)
|
||||
error->all(FLERR,"Pair style tersoff/mod/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
double *lam1, *lam2, *lam3, *powermint;
|
||||
double *biga, *bigb, *bigr, *bigd;
|
||||
|
||||
@ -155,8 +155,10 @@ void PairTersoffZBLGPU::init_style()
|
||||
|
||||
if (atom->tag_enable == 0)
|
||||
error->all(FLERR,"Pair style tersoff/zbl/gpu requires atom IDs");
|
||||
/*
|
||||
if (force->newton_pair != 0)
|
||||
error->all(FLERR,"Pair style tersoff/zbl/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
double *lam1, *lam2, *lam3, *powermint;
|
||||
double *biga, *bigb, *bigr, *bigd;
|
||||
|
||||
@ -136,8 +136,10 @@ void PairUFMGPU::init_style()
|
||||
{
|
||||
// cut_respa = nullptr;
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style ufm/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -156,8 +156,10 @@ void PairVashishtaGPU::init_style()
|
||||
|
||||
if (atom->tag_enable == 0)
|
||||
error->all(FLERR,"Pair style vashishta/gpu requires atom IDs");
|
||||
/*
|
||||
if (force->newton_pair != 0)
|
||||
error->all(FLERR,"Pair style vashishta/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
double *cutsq, *r0, *gamma, *eta;
|
||||
double *lam1inv, *lam4inv, *zizj, *mbigd;
|
||||
|
||||
@ -141,8 +141,10 @@ void PairYukawaColloidGPU::init_style()
|
||||
if (!atom->sphere_flag)
|
||||
error->all(FLERR,"Pair yukawa/colloid/gpu requires atom style sphere");
|
||||
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style yukawa/colloid/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -130,8 +130,10 @@ void PairYukawaGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairYukawaGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style yukawa/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
@ -132,8 +132,10 @@ void PairZBLGPU::compute(int eflag, int vflag)
|
||||
|
||||
void PairZBLGPU::init_style()
|
||||
{
|
||||
/*
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Pair style zbl/gpu requires newton pair off");
|
||||
*/
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
|
||||
Reference in New Issue
Block a user