diff --git a/doc/src/pair_modify.txt b/doc/src/pair_modify.txt index 4824a3d83e..c446aa29d0 100644 --- a/doc/src/pair_modify.txt +++ b/doc/src/pair_modify.txt @@ -13,7 +13,8 @@ pair_modify command :h3 pair_modify keyword values ... :pre one or more keyword/value pairs may be listed :ulb,l -keyword = {pair} or {shift} or {mix} or {table} or {table/disp} or {tabinner} or {tabinner/disp} or {tail} or {compute} :l +keyword = {pair} or {shift} or {mix} or {table} or {table/disp} or {tabinner} +or {tabinner/disp} or {tail} or {compute} or {nofdotr} :l {pair} values = sub-style N {special} which wt1 wt2 wt3 or sub-style N {compute/tally} flag sub-style = sub-style of "pair hybrid"_pair_hybrid.html @@ -33,7 +34,8 @@ keyword = {pair} or {shift} or {mix} or {table} or {table/disp} or {tabinner} or {tabinner/disp} value = cutoff cutoff = inner cutoff at which to begin table (distance units) {tail} value = {yes} or {no} - {compute} value = {yes} or {no} :pre + {compute} value = {yes} or {no} + {nofdotr} :pre :ule [Examples:] @@ -212,6 +214,10 @@ a pair style will not work, because the "kspace_style"_kspace_style.html command requires a Kspace-compatible pair style be defined. +The {nofdotr} keyword allows to disable an optimization that computes +the global stress tensor from the total forces and atom positions rather +than from summing forces between individual pairs of atoms. + :line The {special} keyword allows to override the 1-2, 1-3, and 1-4 diff --git a/src/pair.cpp b/src/pair.cpp index 92b5d003a8..2b4863a54c 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -186,6 +186,10 @@ void Pair::modify_params(int narg, char **arg) else if (strcmp(arg[iarg+1],"no") == 0) compute_flag = 0; else error->all(FLERR,"Illegal pair_modify command"); iarg += 2; + } else if (strcmp(arg[iarg],"nofdotr") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command"); + no_virial_fdotr_compute = 1; + ++iarg; } else error->all(FLERR,"Illegal pair_modify command"); } }