diff --git a/doc/src/compute_modify.txt b/doc/src/compute_modify.txt index 14c7cb33be..d9a2a09bcb 100644 --- a/doc/src/compute_modify.txt +++ b/doc/src/compute_modify.txt @@ -18,9 +18,7 @@ keyword = {extra} or {dynamic} :l {extra} value = N N = # of extra degrees of freedom to subtract {dynamic} value = {yes} or {no} - yes/no = do or do not recompute the number of atoms contributing to the temperature - {thermo} value = {yes} or {no} - yes/no = do or do not add contributions from fixes to the potential energy :pre + yes/no = do or do not recompute the number of atoms contributing to the temperature :pre :ule [Examples:] @@ -47,19 +45,13 @@ for an example. The {dynamic} keyword determines whether the number of atoms N in the compute group is re-computed each time a temperature is computed. -Only compute styles that compute a temperature use this option. By +Only compute styles that calculate a temperature use this option. By default, N is assumed to be constant. If you are adding atoms to the system (see the "fix pour"_fix_pour.html or "fix deposit"_fix_deposit.html commands) or expect atoms to be lost (e.g. due to evaporation), then this option should be used to insure the temperature is correctly normalized. -The {thermo} keyword determines whether the potential energy -contribution calculated by some "fixes"_fix.html is added to the -potential energy calculated by the compute. Currently, only the -compute of style {pe} uses this option. See the doc pages for -"individual fixes"_fix.html for details. - [Restrictions:] none [Related commands:] @@ -69,5 +61,4 @@ compute of style {pe} uses this option. See the doc pages for [Default:] The option defaults are extra = 2 or 3 for 2d or 3d systems and -dynamic = no. Thermo is {yes} if the compute of style {pe} was -defined with no extra keywords; otherwise it is {no}. +dynamic = no. diff --git a/doc/src/compute_pe.txt b/doc/src/compute_pe.txt index 9623950211..2e3f5d8beb 100644 --- a/doc/src/compute_pe.txt +++ b/doc/src/compute_pe.txt @@ -15,7 +15,7 @@ compute ID group-ID pe keyword ... :pre ID, group-ID are documented in "compute"_compute.html command pe = style name of this compute command zero or more keywords may be appended -keyword = {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} :ul +keyword = {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} :ul [Examples:] @@ -33,8 +33,9 @@ via the "compute reduce"_compute_reduce.html command. The energy is calculated by the various pair, bond, etc potentials defined for the simulation. If no extra keywords are listed, then the potential energy is the sum of pair, bond, angle, dihedral, improper, -and kspace (long-range) energy. If any extra keywords are listed, -then only those components are summed to compute the potential energy. +kspace (long-range), and fix energy. I.e. it is as if all the +keywords were listed. If any extra keywords are listed, then only +those components are summed to compute the potential energy. The Kspace contribution requires 1 extra FFT each timestep the energy is calculated, if using the PPPM solver via the "kspace_style @@ -43,12 +44,12 @@ PPPM calculation if it is needed on a large fraction of the simulation timesteps. Various fixes can contribute to the total potential energy of the -system. See the doc pages for "individual fixes"_fix.html for -details. The {thermo} option of the -"compute_modify"_compute_modify.html command determines whether these -contributions are added into the computed potential energy. If no -keywords are specified the default is {yes}. If any keywords are -specified, the default is {no}. +system if the {fix} contribution is included. See the doc pages for +"individual fixes"_fix.html for details of which ones compute a +potential energy. + +NOTE: The "fix_modify energy yes"_fix_modify.html command must also be +specified if a fix is to contribute potential energy to this command. A compute of this style with the ID of "thermo_pe" is created when LAMMPS starts up, as if this command were in the input script: diff --git a/doc/src/compute_pe_atom.txt b/doc/src/compute_pe_atom.txt index cb926c82ff..937e680926 100644 --- a/doc/src/compute_pe_atom.txt +++ b/doc/src/compute_pe_atom.txt @@ -15,7 +15,7 @@ compute ID group-ID pe/atom keyword ... :pre ID, group-ID are documented in "compute"_compute.html command pe/atom = style name of this compute command zero or more keywords may be appended -keyword = {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} :ul +keyword = {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} :ul [Examples:] @@ -32,9 +32,9 @@ you want the potential energy of the entire system. The per-atom energy is calculated by the various pair, bond, etc potentials defined for the simulation. If no extra keywords are listed, then the potential energy is the sum of pair, bond, angle, -dihedral,improper, and kspace energy. If any extra keywords are -listed, then only those components are summed to compute the potential -energy. +dihedral,improper, kspace (long-range), and fix energy. I.e. it is as +if all the keywords were listed. If any extra keywords are listed, +then only those components are summed to compute the potential energy. Note that the energy of each atom is due to its interaction with all other atoms in the simulation, not just with other atoms in the group. @@ -55,6 +55,15 @@ For PPPM, the calcluation requires 1 extra FFT each timestep that per-atom energy is calculated. Thie "document"_PDF/kspace.pdf describes how the long-range per-atom energy calculation is performed. +Various fixes can contribute to the per-atom potential energy of the +system if the {fix} contribution is included. See the doc pages for +"individual fixes"_fix.html for details of which ones compute a +per-atom potential energy. + +NOTE: The "fix_modify energy yes"_fix_modify.html command must also be +specified if a fix is to contribute per-atom potential energy to this +command. + As an example of per-atom potential energy compared to total potential energy, these lines in an input script should yield the same result in the last 2 columns of thermo output: diff --git a/doc/src/fix_modify.txt b/doc/src/fix_modify.txt index 1b400a7260..afdfa9e892 100644 --- a/doc/src/fix_modify.txt +++ b/doc/src/fix_modify.txt @@ -52,14 +52,20 @@ default method for computing P. For fixes that calculate a contribution to the potential energy of the system, the {energy} keyword will include that contribution in -thermodynamic output of potential energy. See the -"thermo_style"_thermo_style.html command for info on how potential -energy is output. The contribution by itself can be printed by using -the keyword f_ID in the thermo_style custom command, where ID is the -fix-ID of the appropriate fix. Note that you must use this setting -for a fix if you are using it when performing an "energy -minimization"_minimize.html and if you want the energy and forces it -produces to be part of the optimization criteria. +thermodynamic output of potential energy. This is because the {energy +yes} setting must be specfied to include the fix's global or per-atom +energy in the calculation performed by the "compute +pe"_compute_pe.html or "compute pe/atom"_compute_pe_atom.html +commands. See the "thermo_style"_thermo_style.html command for info +on how potential energy is output. For fixes that tally a global +energy, it can be printed by using the keyword f_ID in the +thermo_style custom command, where ID is the fix-ID of the appropriate +fix. + +NOTE: You must also specify the {energy yes} setting for a fix if you +are using it when performing an "energy minimization"_minimize.html +and if you want the energy and forces it produces to be part of the +optimization criteria. For fixes that set or modify forces, it may be possible to select at which "r-RESPA"_run_style.html level the fix operates via the {respa}