Unverified Commit 7fed6c7e authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #634 from craabreu/master

Computation of forces/torques on rigid bodies moved to post_force
parents 74fbb84b d2031182
Loading
Loading
Loading
Loading
+30 −6
Original line number Diff line number Diff line
@@ -14,14 +14,16 @@ fix_modify fix-ID keyword value ... :pre

fix-ID = ID of the fix to modify :ulb,l
one or more keyword/value pairs may be appended :l
keyword = {temp} or {press} or {energy} or {virial} or {respa} or {dynamic/dof} :l
keyword = {temp} or {press} or {energy} or {virial} or {respa} or {dynamic/dof} or {bodyforces} :l
  {temp} value = compute ID that calculates a temperature
  {press} value = compute ID that calculates a pressure
  {energy} value = {yes} or {no}
  {virial} value = {yes} or {no}
  {respa} value = {1} to {max respa level} or {0} (for outermost level)
  {dynamic/dof} value = {yes} or {no}
    yes/no = do or do not recompute the number of degrees of freedom (DOF) contributing to the temperature :pre
    yes/no = do or do not recompute the number of degrees of freedom (DOF) contributing to the temperature
  {bodyforces} value = {early} or {late}
    early/late = compute rigid-body forces/torques early or late in the timestep :pre
:ule

[Examples:]
@@ -84,9 +86,8 @@ if you want virial contribution of the fix to be part of the
relaxation criteria, although this seems unlikely.

NOTE: This option is only supported by fixes that explicitly say
so. For some of these (e.g. the
"fix shake"_fix_shake.html command) the default setting is
{virial yes}, for others it is {virial no}.
so. For some of these (e.g. the "fix shake"_fix_shake.html command)
the default setting is {virial yes}, for others it is {virial no}.

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}
@@ -120,6 +121,28 @@ compute to calculate temperature. See the "compute_modify
dynamic/dof"_compute_modify.html command for a similar way to insure
correct temperature normalization for those thermostats.

The {bodyforces} keyword determines whether the forces and torques
acting on rigid bodies are computed {early} at the post-force stage of
each timestep (right after per-atom forces have been computed and
communicated among processors), or {late} at the final-integrate stage
of each timestep (after any other fixes have finished their post-force
tasks).  Only the rigid-body integration fixes use this option, which
includes "fix rigid"_fix_rigid.html and "fix
rigid/small"_fix_rigid.html, and their variants, and also "fix
poems"_fix_poems.html.

The default is {late}.  If there are other fixes that add forces to
individual atoms, then the rigid-body constraints will include these
forces when time-integrating the rigid bodies.  If {early} is
specified, then new fixes can be written that use or modify the
per-body force and torque, before time-integration of the rigid bodies
occurs.  Note however this has the side effect, that fixes such as
"fix addforce"_fix_addforce.html, "fix setforce"_fix_setforce.html,
"fix spring"_fix_spring.html, which add forces to individual atoms
will have no effect on the motion of the rigid bodies if they are
specified in the input script after the fix rigid command.  LAMMPS
will give a warning if that is the case.

[Restrictions:] none

[Related commands:]
@@ -130,4 +153,5 @@ pressure"_compute_pressure.html, "thermo_style"_thermo_style.html
[Default:]

The option defaults are temp = ID defined by fix, press = ID defined
by fix, energy = no, virial = different for each fix style, respa = 0.
by fix, energy = no, virial = different for each fix style, respa = 0,
bodyforce = late.
+12 −6
Original line number Diff line number Diff line
@@ -106,12 +106,18 @@ off, and there is only a single fix poems defined.
[Restart, fix_modify, output, run start/stop, minimize info:]

No information about this fix is written to "binary restart
files"_restart.html.  None of the "fix_modify"_fix_modify.html options
are relevant to this fix.  No global or per-atom quantities are stored
by this fix for access by various "output
commands"_Section_howto.html#howto_15.  No parameter of this fix can
be used with the {start/stop} keywords of the "run"_run.html command.
This fix is not invoked during "energy minimization"_minimize.html.
files"_restart.html.  

The "fix_modify"_fix_modify.html {bodyforces} option is supported by
this fix style to set whether per-body forces and torques are computed
early or late in a timestep, i.e. at the post-force stage or at the
final-integrate stage, respectively.

No global or per-atom quantities are stored by this fix for access by
various "output commands"_Section_howto.html#howto_15.  No parameter
of this fix can be used with the {start/stop} keywords of the
"run"_run.html command.  This fix is not invoked during "energy
minimization"_minimize.html.

[Restrictions:]

+9 −4
Original line number Diff line number Diff line
@@ -223,10 +223,10 @@ via several options.

NOTE: With the {rigid/small} styles, which require that {bodystyle} be
specified as {molecule} or {custom}, you can define a system that has
no rigid bodies initially.  This is useful when you are using the {mol}
keyword in conjunction with another fix that is adding rigid bodies
on-the-fly as molecules, such as "fix deposit"_fix_deposit.html or
"fix pour"_fix_pour.html.
no rigid bodies initially.  This is useful when you are using the
{mol} keyword in conjunction with another fix that is adding rigid
bodies on-the-fly as molecules, such as "fix deposit"_fix_deposit.html
or "fix pour"_fix_pour.html.

For bodystyle {single} the entire fix group of atoms is treated as one
rigid body.  This option is only allowed for the {rigid} styles.
@@ -742,6 +742,11 @@ used to calculate the instantaneous pressure tensor. Note that the 2
NVT rigid fixes do not use any external compute to compute
instantaneous temperature.

The "fix_modify"_fix_modify.html {bodyforces} option is supported by
all rigid styles to set whether per-body forces and torques are
computed early or late in a timestep, i.e. at the post-force stage or
at the final-integrate stage or the timestep, respectively.

The 2 NVE rigid fixes compute a global scalar which can be accessed by
various "output commands"_Section_howto.html#howto_15.  The scalar
value calculated by these fixes is "intensive".  The scalar is the
Loading