Unverified Commit 795a872b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1847 from pdebuyl/fix-active

Add fix propel/self
parents f03cfba0 7766b29c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@ OPT.
   * :doc:`precession/spin <fix_precession_spin>`
   * :doc:`press/berendsen <fix_press_berendsen>`
   * :doc:`print <fix_print>`
   * :doc:`propel/self <fix_propel_self>`
   * :doc:`property/atom (k) <fix_property_atom>`
   * :doc:`python/invoke <fix_python_invoke>`
   * :doc:`python/move <fix_python_move>`
@@ -243,4 +244,3 @@ OPT.
   *
   *
   *
   *
+1 −0
Original line number Diff line number Diff line
@@ -308,6 +308,7 @@ accelerated styles exist.
* :doc:`precession/spin <fix_precession_spin>` -
* :doc:`press/berendsen <fix_press_berendsen>` - pressure control by Berendsen barostat
* :doc:`print <fix_print>` - print text and variables during a simulation
* :doc:`propel/self <fix_propel_self>` - model self-propelled particles
* :doc:`property/atom <fix_property_atom>` - add customized per-atom values
* :doc:`python/invoke <fix_python_invoke>` - call a Python function during a simulation
* :doc:`python/move <fix_python_move>` -  call a Python function during a simulation run
+113 −0
Original line number Diff line number Diff line
.. index:: fix propel/self

fix propel/self command
=======================

Syntax
""""""

fix ID group-ID propel/self mode magnitude keyword values ...

* ID, group-ID are documented in :doc:`fix <fix>` command
* propel/self = style name of this fix command
* mode = velocity or quat
* magnitude = magnitude of the active force
* one or more keyword/value pairs may be appended to args
* keyword = *types*

  *types* values = one or more atom types



Examples
""""""""


.. parsed-literal::

   fix active_group all propel/self velocity 1.0
   fix constant_velocity all viscous 1.0

   fix active_group all propel/self quat 1.0

   fix active all propel/self quat 1.0 types 1 2 4

Description
"""""""""""

Adds a force of a constant magnitude to each atom in the group. The nature in
which the force is added depends on the mode.

For *mode* = *velocity*, the active force acts along the velocity vector of
each atom. This can be interpreted as a velocity-dependent friction,
such as proposed by :ref:`(Erdmann) <Erdmann>`.

For *mode* = *quat* the force is applied along the axis obtained
by rotating the x-axis along the atom's quaternion. In other words, the
force is along the x-axis in the atom's body frame. This mode requires
all atoms in the group to have a quaternion, so atom\_style should
either be ellipsoid or body.  In combination with Langevin thermostat
for translation and rotation in the overdamped regime, the quaternion
mode corresponds to the active Brownian particle model introduced by
:ref:`(Henkes) <Henkes>`, :ref:`(Bialke) <Bialke>` and :ref:`(Fily)
<Fily>`.

By default, this fix is applied to all atoms in the group. You can
override this behavior by specifying the atom types the fix should work
on through the *types* keyword.


----------


**Restart, fix\_modify, output, run start/stop, minimize info:**

No information about this fix is written to :doc:`binary restart files <restart>`.

This fix is not imposed  during minimization.

Restrictions
""""""""""""


In quat mode, this fix makes use of per-atom quaternions to take
into account the fact that the orientation can rotate and hence the
direction of the active force can change. The quat mode
of this fix only works with atom\_style ellipsoid.

Related commands
""""""""""""""""

:doc:`fix setforce <fix_setforce>`, :doc:`fix addforce <fix_addforce>`

.. _Erdmann:



**(Erdmann)** U. Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer,
Eur. Phys. J. B 15, 105-113, 2000.

.. _Henkes:



**(Henkes)** Henkes, S, Fily, Y., and Marchetti, M. C. Phys. Rev. E, 84, 040301(R), 2011.

.. _Bialke:



**(Bialke)** J. Bialke, T. Speck, and H Loewen, Phys. Rev. Lett. 108, 168301, 2012.

.. _Fily:



**(Fily)** Y. Fily and M.C. Marchetti, Phys. Rev. Lett. 108, 235702, 2012.

**Default:** types


.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html
+11 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ Bext
Bfrac
bgq
Bh
Bialke
Biersack
bigbig
bigint
@@ -691,6 +692,7 @@ eangle
eatom
Eb
Eba
Ebeling
ebond
ebook
ebt
@@ -789,6 +791,7 @@ equilibration
Equilibria
equilization
Ercolessi
Erdmann
eradius
erate
erc
@@ -879,6 +882,7 @@ filename
Filename
filenames
Filenames
Fily
fileper
filesystem
Fincham
@@ -975,6 +979,7 @@ gcc
gcmc
gdot
GeC
Geier
gencode
georg
Georg
@@ -1087,6 +1092,7 @@ Heenen
Hendrik
Henin
Henkelman
Henkes
henrich
Henrich
Herrmann
@@ -1534,6 +1540,7 @@ lmptype
ln
localTemp
localvectors
Loewen
logfile
logfreq
logicals
@@ -1598,6 +1605,7 @@ manpages
manybody
MANYBODY
Maras
Marchetti
Marrink
Marroquin
Marsaglia
@@ -2093,6 +2101,7 @@ outfile
outmost
outputss
Ouyang
overdamped
overlayed
Ovito
oxdna
@@ -2327,6 +2336,7 @@ quadratically
quadrupolar
Quant
quartic
quat
quaternion
quaternions
quati
@@ -2529,6 +2539,7 @@ scalexz
scaleyz
Schaik
Schilfgarde
Schimansky
Schiotz
Schlitter
Schmid
+54 −0
Original line number Diff line number Diff line
dimension 2
boundary p p p

variable L equal 20
region total block -$L $L -$L $L -0.5 0.5
lattice hex 0.3
create_box 2 total
create_atoms 1 box

# Set random fraction to passive:
set type 1 type/fraction 2 0.5 1337

# Purely repulsive particles:
variable rc equal "2^(1.0/6.0)"
pair_style lj/cut ${rc}
pair_coeff * * 1.0 1.0
pair_modify shift yes

mass * 1.0

fix step all nve
fix temp all langevin 1.0 1.0 1.0 13
fix twod all enforce2d

neighbor 0.6 bin

dump traj all custom 250 2d_active.dump.bin id type x y z

thermo_style custom time step pe ke etotal temp
thermo 1000
run 5000

group one type 1
group two type 2

compute ke1 one ke
compute ke2 two ke

thermo_style custom step pe ke etotal temp c_ke1 c_ke2

fix active all propel/self velocity 1.0

# With active force there is more motion so increase bin size:
neighbor 1.0 bin
run 10000

# Only make type 1 active:
fix active all propel/self velocity 1.0 types 1

# With active force there is more motion so increase bin size:
neighbor 1.0 bin
run 10000

Loading