69
69
if(! allocated) PairLJCharmmCoulCharmm::allocate();
72
cuda->accelerator(0,NULL);
74
73
cuda->shared_data.pair.coeff1 = lj1;
75
74
cuda->shared_data.pair.coeff2 = lj2;
77
76
cuda->shared_data.pair.coeff4 = lj4;
78
77
cuda->shared_data.pair.special_lj = force->special_lj;
79
78
cuda->shared_data.pair.special_coul = force->special_coul;
80
cu_lj1_gm = new cCudaData<double, F_FLOAT, x> ((double*)lj1, &cuda->shared_data.pair.coeff1_gm, (atom->ntypes+1)*(atom->ntypes+1));
81
cu_lj2_gm = new cCudaData<double, F_FLOAT, x> ((double*)lj2, &cuda->shared_data.pair.coeff2_gm, (atom->ntypes+1)*(atom->ntypes+1));
82
cu_lj3_gm = new cCudaData<double, F_FLOAT, x> ((double*)lj3, &cuda->shared_data.pair.coeff3_gm, (atom->ntypes+1)*(atom->ntypes+1));
83
cu_lj4_gm = new cCudaData<double, F_FLOAT, x> ((double*)lj4, &cuda->shared_data.pair.coeff4_gm, (atom->ntypes+1)*(atom->ntypes+1));
79
cu_lj1_gm = new cCudaData<double, F_CFLOAT, x> ((double*)lj1, &cuda->shared_data.pair.coeff1_gm, (atom->ntypes+1)*(atom->ntypes+1));
80
cu_lj2_gm = new cCudaData<double, F_CFLOAT, x> ((double*)lj2, &cuda->shared_data.pair.coeff2_gm, (atom->ntypes+1)*(atom->ntypes+1));
81
cu_lj3_gm = new cCudaData<double, F_CFLOAT, x> ((double*)lj3, &cuda->shared_data.pair.coeff3_gm, (atom->ntypes+1)*(atom->ntypes+1));
82
cu_lj4_gm = new cCudaData<double, F_CFLOAT, x> ((double*)lj4, &cuda->shared_data.pair.coeff4_gm, (atom->ntypes+1)*(atom->ntypes+1));
111
110
void PairLJCharmmCoulCharmmCuda::settings(int narg, char **arg)
113
112
PairLJCharmmCoulCharmm::settings(narg, arg);
114
cuda->shared_data.pair.cut_global = (X_FLOAT) cut_lj;
115
cuda->shared_data.pair.cut_coulsq_global = (X_FLOAT) cut_coulsq;
116
cuda->shared_data.pair.cut_inner_global = (F_FLOAT) cut_lj_inner;
113
cuda->shared_data.pair.cut_global = (X_CFLOAT) cut_lj;
114
cuda->shared_data.pair.cut_coulsq_global = (X_CFLOAT) cut_coulsq;
115
cuda->shared_data.pair.cut_inner_global = (F_CFLOAT) cut_lj_inner;
119
118
/* ---------------------------------------------------------------------- */
140
irequest = neighbor->request(this);
139
irequest = neighbor->request(this,instance_me);
141
140
neighbor->requests[irequest]->full = 1;
142
141
neighbor->requests[irequest]->half = 0;
143
142
neighbor->requests[irequest]->cudable = 1;
181
180
PairLJCharmmCoulCharmm::ev_setup(eflag,vflag);
183
182
if (eflag_atom && atom->nmax > maxeatomold)
184
{delete cuda->cu_eatom; cuda->cu_eatom = new cCudaData<double, ENERGY_FLOAT, x > ((double*)eatom, & cuda->shared_data.atom.eatom , atom->nmax );}
183
{delete cuda->cu_eatom; cuda->cu_eatom = new cCudaData<double, ENERGY_CFLOAT, x > ((double*)eatom, & cuda->shared_data.atom.eatom , atom->nmax );}
186
185
if (vflag_atom && atom->nmax > maxeatomold)
187
{delete cuda->cu_vatom; cuda->cu_vatom = new cCudaData<double, ENERGY_FLOAT, yx > ((double*)vatom, & cuda->shared_data.atom.vatom , atom->nmax, 6 );}
186
{delete cuda->cu_vatom; cuda->cu_vatom = new cCudaData<double, ENERGY_CFLOAT, yx > ((double*)vatom, & cuda->shared_data.atom.vatom , atom->nmax, 6 );}