diff -Naur lammps-4Nov09/doc/pair_cmm.html lammps-5Nov09/doc/pair_cmm.html --- lammps-4Nov09/doc/pair_cmm.html 2008-02-18 10:18:52.000000000 -0700 +++ lammps-5Nov09/doc/pair_cmm.html 2009-11-02 13:59:05.000000000 -0700 @@ -53,7 +53,7 @@

as required for the CMM Coarse-grained MD parametrization discussed in -(Shinoda). Rc is the cutoff. +(Shinoda) and (DeVane). Rc is the cutoff.

Style cg/cmm/coul/cut adds a Coulombic pairwise interaction given by

@@ -167,4 +167,8 @@

(Shinoda) Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007).

+ + +

(DeVane) Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008). +

diff -Naur lammps-4Nov09/doc/pair_cmm.txt lammps-5Nov09/doc/pair_cmm.txt --- lammps-4Nov09/doc/pair_cmm.txt 2008-02-18 10:18:52.000000000 -0700 +++ lammps-5Nov09/doc/pair_cmm.txt 2009-11-02 13:59:05.000000000 -0700 @@ -47,7 +47,7 @@ :c,image(Eqs/pair_cmm.jpg) as required for the CMM Coarse-grained MD parametrization discussed in -"(Shinoda)"_#Shinoda. Rc is the cutoff. +"(Shinoda)"_#Shinoda and "(DeVane)"_#DeVane. Rc is the cutoff. Style {cg/cmm/coul/cut} adds a Coulombic pairwise interaction given by @@ -159,3 +159,7 @@ :link(Shinoda) [(Shinoda)] Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007). + +:link(DeVane) +[(DeVane)] Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008). + diff -Naur lammps-4Nov09/doc/reset_timestep.html lammps-5Nov09/doc/reset_timestep.html --- lammps-4Nov09/doc/reset_timestep.html 2009-08-27 12:51:09.000000000 -0600 +++ lammps-5Nov09/doc/reset_timestep.html 2009-11-02 13:59:05.000000000 -0700 @@ -59,7 +59,7 @@ several runs. If you change the timestep, you may change the target temperature.

-

Restting the timestep will clear the flags for computes +

Resetting the timestep will clear the flags for computes that may have calculated some quantity from a previous run. This means that quantity cannot be accessed by a variable in between runs until a new run is performed. See the variable diff -Naur lammps-4Nov09/doc/reset_timestep.txt lammps-5Nov09/doc/reset_timestep.txt --- lammps-4Nov09/doc/reset_timestep.txt 2009-08-27 12:51:09.000000000 -0600 +++ lammps-5Nov09/doc/reset_timestep.txt 2009-11-02 13:59:05.000000000 -0700 @@ -56,7 +56,7 @@ several runs. If you change the timestep, you may change the target temperature. -Restting the timestep will clear the flags for "computes"_compute.html +Resetting the timestep will clear the flags for "computes"_compute.html that may have calculated some quantity from a previous run. This means that quantity cannot be accessed by a variable in between runs until a new run is performed. See the "variable"_variable.html diff -Naur lammps-4Nov09/src/USER-CG-CMM/pair_cmm_common.cpp lammps-5Nov09/src/USER-CG-CMM/pair_cmm_common.cpp --- lammps-4Nov09/src/USER-CG-CMM/pair_cmm_common.cpp 2009-08-11 07:52:10.000000000 -0600 +++ lammps-5Nov09/src/USER-CG-CMM/pair_cmm_common.cpp 2009-11-02 13:59:26.000000000 -0700 @@ -41,8 +41,7 @@ * clean up common arrays * * ---------------------------------------------------------------------- */ -PairCMMCommon::~PairCMMCommon() -{ +PairCMMCommon::~PairCMMCommon() { if (allocated) { memory->destroy_2d_int_array(setflag); memory->destroy_2d_int_array(cg_type); @@ -447,16 +446,21 @@ const double ratio = sigma[itype][jtype]/sqrt(rsq); const double eps = epsilon[itype][jtype]; - lj_force = cgpref*eps * rsq * (cgpow1*pow(ratio,cgpow1) - - cgpow2*pow(ratio,cgpow2)); + lj_force = cgpref*eps * (cgpow1*pow(ratio,cgpow1) + - cgpow2*pow(ratio,cgpow2))/rsq; lj_erg = cgpref*eps * (pow(ratio,cgpow1) - pow(ratio,cgpow2)); } if (rsq < cut_coul[itype][jtype]) { if(coul_type == CG_COUL_LONG) { - error->all("single energy computation with coulomb not supported by CG potentials."); + error->all("single energy computation with long-range coulomb not supported by CG potentials."); } else if ((coul_type == CG_COUL_CUT) || (coul_type == CG_COUL_DEBYE)) { - error->all("single energy computation with coulomb not supported by CG potentials."); + const double r2inv = 1.0/rsq; + const double rinv = sqrt(r2inv); + const double qscreen=exp(-kappa*sqrt(rsq)); + coul_force = force->qqrd2e * atom->q[i]*atom->q[j]*rinv * qscreen * (kappa + rinv); + coul_erg = force->qqrd2e * atom->q[i]*atom->q[j]*rinv * qscreen; + // error->all("single energy computation with coulomb not supported by CG potentials."); } else if (coul_type == CG_COUL_NONE) { ; // do nothing } else { diff -Naur lammps-4Nov09/src/USER-CG-CMM/pair_cmm_common.h lammps-5Nov09/src/USER-CG-CMM/pair_cmm_common.h --- lammps-4Nov09/src/USER-CG-CMM/pair_cmm_common.h 2009-10-29 16:03:02.000000000 -0600 +++ lammps-5Nov09/src/USER-CG-CMM/pair_cmm_common.h 2009-11-02 13:59:26.000000000 -0700 @@ -10,7 +10,7 @@ /* ---------------------------------------------------------------------- Common functionality for the CMM coarse grained MD potentials. - Contributing author: Axel Kohlmeyer + Contributing author: Axel Kohlmeyer ------------------------------------------------------------------------- */ #ifndef PAIR_CMM_COMMON_H @@ -247,11 +247,11 @@ if ((COUL_TYPE == CG_COUL_CUT) || (COUL_TYPE == CG_COUL_DEBYE)) { if (rsq < cut_coulsq[itype][jtype]) { double r=sqrt(rsq); - double screen=exp(-kappa*r); + double qscreen=exp(-kappa*r); forcecoul = factor_coul * qqrd2e - * qtmp * q[j] * screen * (kappa + 1.0/r); + * qtmp * q[j] * qscreen * (kappa + 1.0/r); if (EFLAG) ecoul=factor_coul*qqrd2e - * qtmp*q[j] * screen / r; + * qtmp*q[j] * qscreen / r; } } @@ -644,11 +644,11 @@ if ((COUL_TYPE == CG_COUL_CUT) || (COUL_TYPE == CG_COUL_DEBYE)) { if (rsq < cut_coulsq[itype][jtype]) { double r=sqrt(rsq); - double screen=exp(-kappa*r); + double qscreen=exp(-kappa*r); forcecoul = factor_coul * qqrd2e - * qtmp * q[j] * screen * (kappa + 1.0/r); + * qtmp * q[j] * qscreen * (kappa + 1.0/r); if (EFLAG) ecoul=factor_coul*qqrd2e - * qtmp*q[j] * screen / r; + * qtmp*q[j] * qscreen / r; } } diff -Naur lammps-4Nov09/src/finish.cpp lammps-5Nov09/src/finish.cpp --- lammps-4Nov09/src/finish.cpp 2009-08-21 13:05:42.000000000 -0600 +++ lammps-5Nov09/src/finish.cpp 2009-11-02 13:59:26.000000000 -0700 @@ -82,7 +82,6 @@ // overall loop time // use actual natoms, in case atoms were lost - natoms; double rlocal = atom->nlocal; MPI_Allreduce(&rlocal,&natoms,1,MPI_DOUBLE,MPI_SUM,world); diff -Naur lammps-4Nov09/src/pair.cpp lammps-5Nov09/src/pair.cpp --- lammps-4Nov09/src/pair.cpp 2009-10-29 16:03:02.000000000 -0600 +++ lammps-5Nov09/src/pair.cpp 2009-11-02 13:59:26.000000000 -0700 @@ -390,6 +390,44 @@ } } +/* ---------------------------------------------------------------------- + tally eng_vdwl and virial into global and per-atom accumulators + can use this version with full neighbor lists +------------------------------------------------------------------------- */ + +void Pair::ev_tally_full(int i, double evdwl, double ecoul, double fpair, + double delx, double dely, double delz) +{ + + if (eflag_either) { + if (eflag_global) { + eng_vdwl += 0.5*evdwl; + eng_coul += 0.5*ecoul; + } + if (eflag_atom) eatom[i] += 0.5 * (evdwl + ecoul); + } + + if (vflag_either) { + if (vflag_global) { + virial[0] += 0.5*delx*delx*fpair; + virial[1] += 0.5*dely*dely*fpair; + virial[2] += 0.5*delz*delz*fpair; + virial[3] += 0.5*delx*dely*fpair; + virial[4] += 0.5*delx*delz*fpair; + virial[5] += 0.5*dely*delz*fpair; + } + } + + if (vflag_atom) { + vatom[i][0] += 0.5*delx*delx*fpair; + vatom[i][1] += 0.5*dely*dely*fpair; + vatom[i][2] += 0.5*delz*delz*fpair; + vatom[i][3] += 0.5*delx*dely*fpair; + vatom[i][4] += 0.5*delx*delz*fpair; + vatom[i][5] += 0.5*dely*delz*fpair; + } +} + /* ---------------------------------------------------------------------- tally eng_vdwl and virial into global and per-atom accumulators for virial, have delx,dely,delz and fx,fy,fz diff -Naur lammps-4Nov09/src/pair.h lammps-5Nov09/src/pair.h --- lammps-4Nov09/src/pair.h 2009-10-29 16:03:02.000000000 -0600 +++ lammps-5Nov09/src/pair.h 2009-11-02 13:59:26.000000000 -0700 @@ -121,6 +121,7 @@ void ev_setup(int, int); void ev_tally(int, int, int, int, double, double, double, double, double, double); + void ev_tally_full(int, double, double, double, double, double, double); void ev_tally_xyz(int, int, int, int, double, double, double, double, double, double, double, double); void ev_tally3(int, int, int, double, double,