From 1b040d71085d6cf8329eb3a16e3293c57e4523e3 Mon Sep 17 00:00:00 2001 From: Eddy BARRAUD Date: Thu, 13 Jun 2024 13:49:18 +0200 Subject: [PATCH] white space fix --- doc/src/pair_dpd_coul_slater_long.rst | 14 +++++++------- lib/gpu/lal_dpd_coul_slater_long.cpp | 6 +++--- lib/gpu/lal_dpd_coul_slater_long.h | 2 +- lib/gpu/lal_dpd_coul_slater_long_ext.cpp | 2 +- src/DPD-BASIC/pair_dpd_coul_slater_long.cpp | 16 ++++++++-------- src/GPU/pair_dpd_coul_slater_long_gpu.cpp | 6 +++--- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/src/pair_dpd_coul_slater_long.rst b/doc/src/pair_dpd_coul_slater_long.rst index d41ac79b3d..ecdade7084 100644 --- a/doc/src/pair_dpd_coul_slater_long.rst +++ b/doc/src/pair_dpd_coul_slater_long.rst @@ -38,8 +38,8 @@ Description """"""""""" Style *dpd/coul/slater/long* computes a force field for dissipative particle dynamics -(DPD) following the exposition in :ref:`(Groot) ` with the addition of -electrostatic interactions. The coulombic forces in mesoscopic models +(DPD) following the exposition in :ref:`(Groot) ` with the addition of +electrostatic interactions. The coulombic forces in mesoscopic models employ potentials without explicit excluded-volume interactions. The goal is to prevent artificial ionic pair formation by including a charge 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) 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. -:math:`\hat{r_{ij}}` is a unit vector in the direction +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:`r_i - r_j`, :math:`\vec{v}_{ij}` is 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 @@ -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 \gamma}`, where :math:`k_B` is the Boltzmann constant and *T* is the 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 -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. @@ -174,4 +174,4 @@ is_charged = no .. _Melchor: -**(Melchor)** Gonzalez-Melchor, Mayoral, Velazquez, and Alejandre, J Chem Phys, 125, 224107 (2006). \ No newline at end of file +**(Melchor)** Gonzalez-Melchor, Mayoral, Velazquez, and Alejandre, J Chem Phys, 125, 224107 (2006). diff --git a/lib/gpu/lal_dpd_coul_slater_long.cpp b/lib/gpu/lal_dpd_coul_slater_long.cpp index 8872e459e6..a6ecf02320 100644 --- a/lib/gpu/lal_dpd_coul_slater_long.cpp +++ b/lib/gpu/lal_dpd_coul_slater_long.cpp @@ -46,7 +46,7 @@ template int DPDChargedT::init(const int ntypes, double **host_cutsq, double **host_a0, 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_special_lj, const bool tstat_only, @@ -87,7 +87,7 @@ int DPDChargedT::init(const int ntypes, lj_types=max_shared_types; shared_types=true; } - + // Allocate a host write buffer for data initialization UCL_H_Vec host_write_coul(lj_types*lj_types*32,*(this->ucl_device), UCL_WRITE_ONLY); @@ -114,7 +114,7 @@ int DPDChargedT::init(const int ntypes, host_sigma,host_cut_dpd); 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); double special_sqrt[4]; diff --git a/lib/gpu/lal_dpd_coul_slater_long.h b/lib/gpu/lal_dpd_coul_slater_long.h index 60d041f5aa..1571ccc570 100644 --- a/lib/gpu/lal_dpd_coul_slater_long.h +++ b/lib/gpu/lal_dpd_coul_slater_long.h @@ -60,7 +60,7 @@ class DPDCharged : public BaseDPD { double **host_sigma, double **host_cut_dpd ); void get_extra_data(double *host_q); - + // --------------------------- TYPE DATA -------------------------- /// coeff.x = a0, coeff.y = gamma, coeff.z = sigma, coeff.w = cut_dpd diff --git a/lib/gpu/lal_dpd_coul_slater_long_ext.cpp b/lib/gpu/lal_dpd_coul_slater_long_ext.cpp index c39bbcdf88..618a3c2cde 100644 --- a/lib/gpu/lal_dpd_coul_slater_long_ext.cpp +++ b/lib/gpu/lal_dpd_coul_slater_long_ext.cpp @@ -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, host_cut_dpd, host_cut_dpdsq, host_cut_slatersq, 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); DPDCMF.device->serialize_init(); diff --git a/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp b/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp index e34931fbb6..2a9f12ad07 100644 --- a/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp +++ b/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp @@ -85,7 +85,7 @@ void PairDPDCharged::compute(int eflag, int vflag) double rsq,r,rinv,dot,wd,randnum,factor_dpd,factor_sqrt; int *ilist,*jlist,*numneigh,**firstneigh; double slater_term; - + evdwl = ecoul = 0.0; ev_init(eflag,vflag); @@ -134,7 +134,7 @@ void PairDPDCharged::compute(int eflag, int vflag) delz = ztmp - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; jtype = type[j]; - + // forces if below maximum cutoff if (rsq < cutsq[itype][jtype]) { r = sqrt(rsq); @@ -169,7 +169,7 @@ void PairDPDCharged::compute(int eflag, int vflag) } 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 if (rsq < cut_slatersq[itype][jtype]){ r2inv = 1.0/rsq; @@ -182,14 +182,14 @@ void PairDPDCharged::compute(int eflag, int vflag) forcecoul = prefactor * (erfc + EWALD_F*grij*expm2 - slater_term); if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor*(1-slater_term); forcecoul *= r2inv; - + if (eflag) { 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)); } } else forcecoul = 0.0; - + fpair = forcedpd + forcecoul; f[i][0] += delx*fpair; @@ -200,7 +200,7 @@ void PairDPDCharged::compute(int eflag, int vflag) f[j][1] -= dely*fpair; f[j][2] -= delz*fpair; } - + if (evflag) ev_tally(i,j,nlocal,newton_pair, evdwl,ecoul,fpair,delx,dely,delz); @@ -326,7 +326,7 @@ void PairDPDCharged::init_style() error->all(FLERR,"Pair dpd requires ghost atoms store velocity"); if (!atom->q_flag) error->all(FLERR,"Pair style coul/slater/long requires atom attribute q"); - + // if newton off, forces between atoms ij will be double computed // using different random numbers @@ -570,4 +570,4 @@ void *PairDPDCharged::extract(const char *str, int &dim) return (void *) scale; } return nullptr; -} \ No newline at end of file +} diff --git a/src/GPU/pair_dpd_coul_slater_long_gpu.cpp b/src/GPU/pair_dpd_coul_slater_long_gpu.cpp index 0a104c6107..459f86b0bc 100644 --- a/src/GPU/pair_dpd_coul_slater_long_gpu.cpp +++ b/src/GPU/pair_dpd_coul_slater_long_gpu.cpp @@ -323,7 +323,7 @@ void PairDPDChargedGPU::init_style() GPU_EXTRA::check_flag(success, error, world); 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 *special_coul = force->special_coul; double qqrd2e = force->qqrd2e; - + evdwl = 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; - // apply Slater electrostatic force if distance below Slater cutoff + // apply Slater electrostatic force if distance below Slater cutoff // and the two species are charged if (rsq < cut_slatersq[itype][jtype]){ r2inv = 1.0/rsq;