diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index e6d44733e2544534b9f29a6cdfc9b61500687ccb..444e901a4035140f9c984f017644d8d89f9c34c1 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ <!-- HTML_ONLY --> <HEAD> <TITLE>LAMMPS Users Manual</TITLE> -<META NAME="docnumber" CONTENT="20 Jun 2017 version"> +<META NAME="docnumber" CONTENT="23 Jun 2017 version"> <META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories"> <META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License."> </HEAD> @@ -21,7 +21,7 @@ <H1></H1> LAMMPS Documentation :c,h3 -20 Jun 2017 version :c,h4 +23 Jun 2017 version :c,h4 Version info: :h4 diff --git a/doc/src/kspace_modify.txt b/doc/src/kspace_modify.txt index 66091f4973fa23eec67605fd2e61055e03a05971..6d27bb7076344adfd81ba2a0b7242c985a3eff02 100644 --- a/doc/src/kspace_modify.txt +++ b/doc/src/kspace_modify.txt @@ -219,10 +219,10 @@ instead of using the virial equation. This option cannot be used to access individual components of the pressure tensor, to compute per-atom virial, or with suffix kspace/pair styles of MSM, like OMP or GPU. -The {fftbench} keyword applies only to PPPM. It is on by default. If -this option is turned off, LAMMPS will not take the time at the end -of a run to give FFT benchmark timings, and will finish a few seconds -faster than it would if this option were on. +The {fftbench} keyword applies only to PPPM. It is off by default. If +this option is turned on, LAMMPS will perform a short FFT benchmark +computation and report its timings, and will thus finish a some seconds +later than it would if this option were off. The {collective} keyword applies only to PPPM. It is set to {no} by default, except on IBM BlueGene machines. If this option is set to @@ -306,7 +306,7 @@ parameters, see the "How-To"_Section_howto.html#howto_24 discussion. The option defaults are mesh = mesh/disp = 0 0 0, order = order/disp = 5 (PPPM), order = 10 (MSM), minorder = 2, overlap = yes, force = -1.0, gewald = gewald/disp = 0.0, slab = 1.0, compute = yes, cutoff/adjust = -yes (MSM), pressure/scalar = yes (MSM), fftbench = yes (PPPM), diff = ik +yes (MSM), pressure/scalar = yes (MSM), fftbench = no (PPPM), diff = ik (PPPM), mix/disp = pair, force/disp/real = -1.0, force/disp/kspace = -1.0, split = 0, tol = 1.0e-6, and disp/auto = no. For pppm/intel, order = order/disp = 7. diff --git a/doc/src/pair_charmm.txt b/doc/src/pair_charmm.txt index 9c5973c7255e240b5da207e9458c770198cfed43..1e78607c084e6b4ac07bca1cc8ec39a5a6585d80 100644 --- a/doc/src/pair_charmm.txt +++ b/doc/src/pair_charmm.txt @@ -104,7 +104,15 @@ charmmfsw"_dihedral_charmm.html command. Eventually code from the new styles will propagate into the related pair styles (e.g. implicit, accelerator, free energy variants). -The general CHARMM formulas are as follows +NOTE: The newest CHARMM pair styles reset the Coulombic energy +conversion factor used internally in the code, from the LAMMPS value +to the CHARMM value, as if it were effectively a parameter of the +force field. This is because the CHARMM code uses a slightly +different value for the this conversion factor in "real +units"_units.html (Kcal/mole), namely CHARMM = 332.0716, LAMMPS = +332.06371. This is to enable more precise agreement by LAMMPS with +the CHARMM force field energies and forces, when using one of these +two CHARMM pair styles. :c,image(Eqs/pair_charmm.jpg) diff --git a/doc/src/pair_dipole.txt b/doc/src/pair_dipole.txt index a9622b32fd877ab79c5d51b02d0ab46133c5bee3..985581cac8b227ad8ee3a75ec187ef13c985068b 100644 --- a/doc/src/pair_dipole.txt +++ b/doc/src/pair_dipole.txt @@ -71,6 +71,14 @@ and force, Fij = -Fji as symmetric forces, and Tij != -Tji since the torques do not act symmetrically. These formulas are discussed in "(Allen)"_#Allen2 and in "(Toukmaji)"_#Toukmaji2. +Also note, that in the code, all of these terms (except Elj) have a +C/epsilon prefactor, the same as the Coulombic term in the LJ + +Coulombic pair styles discussed "here"_pair_lj.html. C is an +energy-conversion constant and epsilon is the dielectric constant +which can be set by the "dielectric"_dielectric.html command. The +same is true of the equations that follow for other dipole pair +styles. + Style {lj/sf/dipole/sf} computes "shifted-force" interactions between pairs of particles that each have a charge and/or a point dipole moment. In general, a shifted-force potential is a (sligthly) modified diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 6e17a9bbd7b0cc7fde788379910fea98979d7fa0..30d8ab64b60f086c89d328402aa0b2ba8c45c282 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -25,6 +25,7 @@ #include <string.h> #include "pair_lj_charmmfsw_coul_long.h" #include "atom.h" +#include "update.h" #include "comm.h" #include "force.h" #include "kspace.h" @@ -61,6 +62,15 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp) // short-range/long-range flag accessed by DihedralCharmmfsw dihedflag = 1; + + // switch qqr2e from LAMMPS value to CHARMM value + + if (strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e != force->qqr2e_charmm_real)) + error->message(FLERR,"Switching to CHARMM coulomb energy" + " conversion constant"); + force->qqr2e = force->qqr2e_charmm_real; + } } /* ---------------------------------------------------------------------- */ @@ -87,6 +97,15 @@ PairLJCharmmfswCoulLong::~PairLJCharmmfswCoulLong() } if (ftable) free_tables(); } + + // switch qqr2e back from CHARMM value to LAMMPS value + + if (update && strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e == force->qqr2e_charmm_real)) + error->message(FLERR,"Restoring original LAMMPS coulomb energy" + " conversion constant"); + force->qqr2e = force->qqr2e_lammps_real; + } } /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index 1e34b06478440568a078bd2f655fe55d10dc1347..0d2159b671ddf84969954c78b809ebef065ea560 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -25,6 +25,7 @@ #include <string.h> #include "pair_lj_charmmfsw_coul_charmmfsh.h" #include "atom.h" +#include "update.h" #include "comm.h" #include "force.h" #include "neighbor.h" @@ -46,6 +47,15 @@ PairLJCharmmfswCoulCharmmfsh::PairLJCharmmfswCoulCharmmfsh(LAMMPS *lmp) : // short-range/long-range flag accessed by DihedralCharmmfsw dihedflag = 0; + + // switch qqr2e from LAMMPS value to CHARMM value + + if (strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e != force->qqr2e_charmm_real)) + error->message(FLERR,"Switching to CHARMM coulomb energy" + " conversion constant"); + force->qqr2e = force->qqr2e_charmm_real; + } } /* ---------------------------------------------------------------------- */ @@ -71,6 +81,15 @@ PairLJCharmmfswCoulCharmmfsh::~PairLJCharmmfswCoulCharmmfsh() memory->destroy(lj14_4); } } + + // switch qqr2e back from CHARMM value to LAMMPS value + + if (update && strcmp(update->unit_style,"real") == 0) { + if ((comm->me == 0) && (force->qqr2e == force->qqr2e_charmm_real)) + error->message(FLERR,"Restoring original LAMMPS coulomb energy" + " conversion constant"); + force->qqr2e = force->qqr2e_lammps_real; + } } /* ---------------------------------------------------------------------- */ diff --git a/src/force.cpp b/src/force.cpp index 3dd28cc7105ba2b09694ae23aa11ab339c115ad5..33e66304067d8c1257d486ed4df44bdf8c80b445 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -53,6 +53,8 @@ Force::Force(LAMMPS *lmp) : Pointers(lmp) special_extra = 0; dielectric = 1.0; + qqr2e_lammps_real = 332.06371; // these constants are toggled + qqr2e_charmm_real = 332.0716; // by new CHARMM pair styles pair = NULL; bond = NULL; diff --git a/src/force.h b/src/force.h index f2d9abc7dd235db067bab708669e0ae5cd633f08..edaac1b5277196b8b9ff81536d6c354b58c81ab4 100644 --- a/src/force.h +++ b/src/force.h @@ -43,6 +43,9 @@ class Force : protected Pointers { double femtosecond; // 1 femtosecond in native units double qelectron; // 1 electron charge abs() in native units + double qqr2e_lammps_real; // different versions of this constant + double qqr2e_charmm_real; // used by new CHARMM pair styles + int newton,newton_pair,newton_bond; // Newton's 3rd law settings class Pair *pair; diff --git a/src/min.cpp b/src/min.cpp index d308efb8486e0ecdbd5280e2bd476c1f21726844..af23629cad8eafefcaab22f5752ee8d87ea9014a 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -165,8 +165,8 @@ void Min::init() if (neigh_every != 1 || neigh_delay != 0 || neigh_dist_check != 1) { if (comm->me == 0) - error->warning(FLERR, - "Resetting reneighboring criteria during minimization"); + error->warning(FLERR, "Using 'neigh_modify every 1 delay 0 check" + " yes' setting during minimization"); } neighbor->every = 1; diff --git a/src/update.cpp b/src/update.cpp index 5599dc6c88492ea2fcfdf8f61b44f71a8d11108f..e4c85dde73ee497a708c0af4003713364d90e85d 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -154,7 +154,7 @@ void Update::set_units(const char *style) force->ftm2v = 1.0 / 48.88821291 / 48.88821291; force->mv2d = 1.0 / 0.602214129; force->nktv2p = 68568.415; - force->qqr2e = 332.06371; + force->qqr2e = 332.06371; // see also force->qqr2d_lammps_real force->qe2f = 23.060549; force->vxmu2f = 1.4393264316e4; force->xxt2kmu = 0.1; diff --git a/src/version.h b/src/version.h index c2cdc6afd6627eee4ef7f4f0cb36082f942d6c7e..07bfcc388580507cb8296e16ae189db8082871ea 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "20 Jun 2017" +#define LAMMPS_VERSION "23 Jun 2017"