"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)

:line

newton command :h3

[Syntax:]

newton flag
newton flag1 flag2 :pre

flag = {on} or {off} for both pairwise and bonded interactions
flag1 = {on} or {off} for pairwise interactions
flag2 = {on} or {off} for bonded interactions :ul

[Examples:]

newton off
newton on off :pre

[Description:]

This command turns Newton's 3rd law {on} or {off} for pairwise and
bonded interactions.  For most problems, setting Newton's 3rd law to
{on} means a modest savings in computation at the cost of two times
more communication.  Whether this is faster depends on problem size,
force cutoff lengths, a machine's compute/communication ratio, and how
many processors are being used.

Setting the pairwise newton flag to {off} means that if two
interacting atoms are on different processors, both processors compute
their interaction and the resulting force information is not
communicated.  Similarly, for bonded interactions, newton {off} means
that if a bond, angle, dihedral, or improper interaction contains
atoms on 2 or more processors, the interaction is computed by each
processor.

LAMMPS should produce the same answers for any newton flag settings,
except for round-off issues.

With "run_style"_run_style.html {respa} and only bonded interactions
(bond, angle, etc) computed in the innermost timestep, it may be
faster to turn newton {off} for bonded interactions, to avoid extra
communication in the innermost loop.

[Restrictions:]

The newton bond setting cannot be changed after the simulation box is
defined by a "read_data"_read_data.html or
"create_box"_create_box.html command.

[Related commands:]

"run_style"_run_style.html respa

[Default:]

newton on :pre
