white space fix
This commit is contained in:
@ -38,8 +38,8 @@ Description
|
|||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
Style *dpd/coul/slater/long* computes a force field for dissipative particle dynamics
|
Style *dpd/coul/slater/long* computes a force field for dissipative particle dynamics
|
||||||
(DPD) following the exposition in :ref:`(Groot) <Groot1>` with the addition of
|
(DPD) following the exposition in :ref:`(Groot) <Groot1>` with the addition of
|
||||||
electrostatic interactions. The coulombic forces in mesoscopic models
|
electrostatic interactions. The coulombic forces in mesoscopic models
|
||||||
employ potentials without explicit excluded-volume interactions.
|
employ potentials without explicit excluded-volume interactions.
|
||||||
The goal is to prevent artificial ionic pair formation by including a charge
|
The goal is to prevent artificial ionic pair formation by including a charge
|
||||||
distribution in the Coulomb potential, following the formulation of
|
distribution in the Coulomb potential, following the formulation of
|
||||||
@ -58,8 +58,8 @@ of 4 terms
|
|||||||
F^E = & \frac{Cq_iq_j}{\epsilon r^2} \left( 1- exp\left( \frac{2r_{ij}}{\lambda} \right) \left( 1 + \frac{2r_{ij}}{\lambda} \left( 1 + \frac{r_{ij}}{\lambda} \right)\right) \right)
|
F^E = & \frac{Cq_iq_j}{\epsilon r^2} \left( 1- exp\left( \frac{2r_{ij}}{\lambda} \right) \left( 1 + \frac{2r_{ij}}{\lambda} \left( 1 + \frac{r_{ij}}{\lambda} \right)\right) \right)
|
||||||
|
|
||||||
where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative
|
where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative
|
||||||
force, :math:`F^R` is a random force, and :math:`F^E` is an electrostatic force.
|
force, :math:`F^R` is a random force, and :math:`F^E` is an electrostatic force.
|
||||||
:math:`\hat{r_{ij}}` is a unit vector in the direction
|
:math:`\hat{r_{ij}}` is a unit vector in the direction
|
||||||
:math:`r_i - r_j`, :math:`\vec{v}_{ij}` is
|
:math:`r_i - r_j`, :math:`\vec{v}_{ij}` is
|
||||||
the vector difference in velocities of the two atoms :math:`\vec{v}_i -
|
the vector difference in velocities of the two atoms :math:`\vec{v}_i -
|
||||||
\vec{v}_j`, :math:`\alpha` is a Gaussian random number with zero mean
|
\vec{v}_j`, :math:`\alpha` is a Gaussian random number with zero mean
|
||||||
@ -68,9 +68,9 @@ weighting factor that varies between 0 and 1. :math:`r_c` is the
|
|||||||
pairwise cutoff. :math:`\sigma` is set equal to :math:`\sqrt{2 k_B T
|
pairwise cutoff. :math:`\sigma` is set equal to :math:`\sqrt{2 k_B T
|
||||||
\gamma}`, where :math:`k_B` is the Boltzmann constant and *T* is the
|
\gamma}`, where :math:`k_B` is the Boltzmann constant and *T* is the
|
||||||
temperature parameter in the pair_style command.
|
temperature parameter in the pair_style command.
|
||||||
C is the same Coulomb conversion factor as in the pair_styles
|
C is the same Coulomb conversion factor as in the pair_styles
|
||||||
coul/cut and coul/long. In this way the Coulomb
|
coul/cut and coul/long. In this way the Coulomb
|
||||||
interaction between ions is corrected at small distances r, and
|
interaction between ions is corrected at small distances r, and
|
||||||
the long-range interactions are computed either by the Ewald or the PPPM technique.
|
the long-range interactions are computed either by the Ewald or the PPPM technique.
|
||||||
|
|
||||||
|
|
||||||
@ -174,4 +174,4 @@ is_charged = no
|
|||||||
|
|
||||||
.. _Melchor:
|
.. _Melchor:
|
||||||
|
|
||||||
**(Melchor)** Gonzalez-Melchor, Mayoral, Velazquez, and Alejandre, J Chem Phys, 125, 224107 (2006).
|
**(Melchor)** Gonzalez-Melchor, Mayoral, Velazquez, and Alejandre, J Chem Phys, 125, 224107 (2006).
|
||||||
|
|||||||
@ -46,7 +46,7 @@ template <class numtyp, class acctyp>
|
|||||||
int DPDChargedT::init(const int ntypes,
|
int DPDChargedT::init(const int ntypes,
|
||||||
double **host_cutsq, double **host_a0,
|
double **host_cutsq, double **host_a0,
|
||||||
double **host_gamma, double **host_sigma,
|
double **host_gamma, double **host_sigma,
|
||||||
double **host_cut_dpd, double **host_cut_dpdsq,
|
double **host_cut_dpd, double **host_cut_dpdsq,
|
||||||
double **host_cut_slatersq, double **host_scale,
|
double **host_cut_slatersq, double **host_scale,
|
||||||
double *host_special_lj,
|
double *host_special_lj,
|
||||||
const bool tstat_only,
|
const bool tstat_only,
|
||||||
@ -87,7 +87,7 @@ int DPDChargedT::init(const int ntypes,
|
|||||||
lj_types=max_shared_types;
|
lj_types=max_shared_types;
|
||||||
shared_types=true;
|
shared_types=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allocate a host write buffer for data initialization
|
// Allocate a host write buffer for data initialization
|
||||||
UCL_H_Vec<numtyp> host_write_coul(lj_types*lj_types*32,*(this->ucl_device),
|
UCL_H_Vec<numtyp> host_write_coul(lj_types*lj_types*32,*(this->ucl_device),
|
||||||
UCL_WRITE_ONLY);
|
UCL_WRITE_ONLY);
|
||||||
@ -114,7 +114,7 @@ int DPDChargedT::init(const int ntypes,
|
|||||||
host_sigma,host_cut_dpd);
|
host_sigma,host_cut_dpd);
|
||||||
|
|
||||||
cutsq.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
cutsq.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||||
this->atom->type_pack4(ntypes,lj_types,cutsq,host_write,host_cutsq,
|
this->atom->type_pack4(ntypes,lj_types,cutsq,host_write,host_cutsq,
|
||||||
host_cut_dpdsq, host_scale, host_cut_slatersq);
|
host_cut_dpdsq, host_scale, host_cut_slatersq);
|
||||||
|
|
||||||
double special_sqrt[4];
|
double special_sqrt[4];
|
||||||
|
|||||||
@ -60,7 +60,7 @@ class DPDCharged : public BaseDPD<numtyp, acctyp> {
|
|||||||
double **host_sigma, double **host_cut_dpd );
|
double **host_sigma, double **host_cut_dpd );
|
||||||
|
|
||||||
void get_extra_data(double *host_q);
|
void get_extra_data(double *host_q);
|
||||||
|
|
||||||
// --------------------------- TYPE DATA --------------------------
|
// --------------------------- TYPE DATA --------------------------
|
||||||
|
|
||||||
/// coeff.x = a0, coeff.y = gamma, coeff.z = sigma, coeff.w = cut_dpd
|
/// coeff.x = a0, coeff.y = gamma, coeff.z = sigma, coeff.w = cut_dpd
|
||||||
|
|||||||
@ -78,7 +78,7 @@ int dpd_charged_gpu_init(const int ntypes, double **host_cutsq, double **host_a0
|
|||||||
init_ok=DPDCMF.init(ntypes, host_cutsq, host_a0, host_gamma, host_sigma,
|
init_ok=DPDCMF.init(ntypes, host_cutsq, host_a0, host_gamma, host_sigma,
|
||||||
host_cut_dpd, host_cut_dpdsq, host_cut_slatersq,
|
host_cut_dpd, host_cut_dpdsq, host_cut_slatersq,
|
||||||
host_scale, special_lj, false, inum, nall, max_nbors,
|
host_scale, special_lj, false, inum, nall, max_nbors,
|
||||||
maxspecial, cell_size, gpu_split, screen,
|
maxspecial, cell_size, gpu_split, screen,
|
||||||
host_special_coul,qqrd2e, g_ewald, lamda);
|
host_special_coul,qqrd2e, g_ewald, lamda);
|
||||||
|
|
||||||
DPDCMF.device->serialize_init();
|
DPDCMF.device->serialize_init();
|
||||||
|
|||||||
@ -85,7 +85,7 @@ void PairDPDCharged::compute(int eflag, int vflag)
|
|||||||
double rsq,r,rinv,dot,wd,randnum,factor_dpd,factor_sqrt;
|
double rsq,r,rinv,dot,wd,randnum,factor_dpd,factor_sqrt;
|
||||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||||
double slater_term;
|
double slater_term;
|
||||||
|
|
||||||
evdwl = ecoul = 0.0;
|
evdwl = ecoul = 0.0;
|
||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ void PairDPDCharged::compute(int eflag, int vflag)
|
|||||||
delz = ztmp - x[j][2];
|
delz = ztmp - x[j][2];
|
||||||
rsq = delx*delx + dely*dely + delz*delz;
|
rsq = delx*delx + dely*dely + delz*delz;
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|
||||||
// forces if below maximum cutoff
|
// forces if below maximum cutoff
|
||||||
if (rsq < cutsq[itype][jtype]) {
|
if (rsq < cutsq[itype][jtype]) {
|
||||||
r = sqrt(rsq);
|
r = sqrt(rsq);
|
||||||
@ -169,7 +169,7 @@ void PairDPDCharged::compute(int eflag, int vflag)
|
|||||||
|
|
||||||
} else forcedpd = 0.0;
|
} else forcedpd = 0.0;
|
||||||
|
|
||||||
// apply Slater electrostatic force if distance below Slater cutoff
|
// apply Slater electrostatic force if distance below Slater cutoff
|
||||||
// and the two species are charged
|
// and the two species are charged
|
||||||
if (rsq < cut_slatersq[itype][jtype]){
|
if (rsq < cut_slatersq[itype][jtype]){
|
||||||
r2inv = 1.0/rsq;
|
r2inv = 1.0/rsq;
|
||||||
@ -182,14 +182,14 @@ void PairDPDCharged::compute(int eflag, int vflag)
|
|||||||
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2 - slater_term);
|
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2 - slater_term);
|
||||||
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor*(1-slater_term);
|
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor*(1-slater_term);
|
||||||
forcecoul *= r2inv;
|
forcecoul *= r2inv;
|
||||||
|
|
||||||
if (eflag) {
|
if (eflag) {
|
||||||
ecoul = prefactor*(erfc - (1 + r/lamda)*exp(-2*r/lamda));
|
ecoul = prefactor*(erfc - (1 + r/lamda)*exp(-2*r/lamda));
|
||||||
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor*(1.0-(1 + r/lamda)*exp(-2*r/lamda));
|
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor*(1.0-(1 + r/lamda)*exp(-2*r/lamda));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else forcecoul = 0.0;
|
} else forcecoul = 0.0;
|
||||||
|
|
||||||
fpair = forcedpd + forcecoul;
|
fpair = forcedpd + forcecoul;
|
||||||
|
|
||||||
f[i][0] += delx*fpair;
|
f[i][0] += delx*fpair;
|
||||||
@ -200,7 +200,7 @@ void PairDPDCharged::compute(int eflag, int vflag)
|
|||||||
f[j][1] -= dely*fpair;
|
f[j][1] -= dely*fpair;
|
||||||
f[j][2] -= delz*fpair;
|
f[j][2] -= delz*fpair;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (evflag) ev_tally(i,j,nlocal,newton_pair,
|
if (evflag) ev_tally(i,j,nlocal,newton_pair,
|
||||||
evdwl,ecoul,fpair,delx,dely,delz);
|
evdwl,ecoul,fpair,delx,dely,delz);
|
||||||
@ -326,7 +326,7 @@ void PairDPDCharged::init_style()
|
|||||||
error->all(FLERR,"Pair dpd requires ghost atoms store velocity");
|
error->all(FLERR,"Pair dpd requires ghost atoms store velocity");
|
||||||
if (!atom->q_flag)
|
if (!atom->q_flag)
|
||||||
error->all(FLERR,"Pair style coul/slater/long requires atom attribute q");
|
error->all(FLERR,"Pair style coul/slater/long requires atom attribute q");
|
||||||
|
|
||||||
// if newton off, forces between atoms ij will be double computed
|
// if newton off, forces between atoms ij will be double computed
|
||||||
// using different random numbers
|
// using different random numbers
|
||||||
|
|
||||||
@ -570,4 +570,4 @@ void *PairDPDCharged::extract(const char *str, int &dim)
|
|||||||
return (void *) scale;
|
return (void *) scale;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -323,7 +323,7 @@ void PairDPDChargedGPU::init_style()
|
|||||||
GPU_EXTRA::check_flag(success, error, world);
|
GPU_EXTRA::check_flag(success, error, world);
|
||||||
|
|
||||||
if (gpu_mode == GPU_FORCE) neighbor->add_request(this, NeighConst::REQ_FULL);
|
if (gpu_mode == GPU_FORCE) neighbor->add_request(this, NeighConst::REQ_FULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -353,7 +353,7 @@ void PairDPDChargedGPU::cpu_compute(int start, int inum, int eflag, int /* vflag
|
|||||||
double *q = atom->q;
|
double *q = atom->q;
|
||||||
double *special_coul = force->special_coul;
|
double *special_coul = force->special_coul;
|
||||||
double qqrd2e = force->qqrd2e;
|
double qqrd2e = force->qqrd2e;
|
||||||
|
|
||||||
evdwl = 0.0;
|
evdwl = 0.0;
|
||||||
ecoul = 0.0;
|
ecoul = 0.0;
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ void PairDPDChargedGPU::cpu_compute(int start, int inum, int eflag, int /* vflag
|
|||||||
|
|
||||||
} else forcedpd = 0.0;
|
} else forcedpd = 0.0;
|
||||||
|
|
||||||
// apply Slater electrostatic force if distance below Slater cutoff
|
// apply Slater electrostatic force if distance below Slater cutoff
|
||||||
// and the two species are charged
|
// and the two species are charged
|
||||||
if (rsq < cut_slatersq[itype][jtype]){
|
if (rsq < cut_slatersq[itype][jtype]){
|
||||||
r2inv = 1.0/rsq;
|
r2inv = 1.0/rsq;
|
||||||
|
|||||||
Reference in New Issue
Block a user