Commit 8ed271f1 authored by Pierre de Buyl's avatar Pierre de Buyl
Browse files

change mode of propel/self to quat instead of quaternion

parent af1e7972
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ 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 quaternion
* mode = velocity or quat
* magnitude = magnitude of the active force
* one or more keyword/value pairs may be appended to args
* keyword = *types*
@@ -28,9 +28,9 @@ Examples
   fix active_group all propel/self velocity 1.0
   fix constant_velocity all viscous 1.0

   fix active_group all propel/self quaternion 1.0
   fix active_group all propel/self quat 1.0

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

Description
"""""""""""
@@ -42,7 +42,7 @@ 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* = *quaternion* the force is applied along the axis obtained
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
@@ -70,9 +70,9 @@ Restrictions
""""""""""""


In quaternion mode, this fix makes use of per-atom quaternions to take
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 quaternion mode
direction of the active force can change. The quat mode
of this fix only works with atom\_style ellipsoid.

Related commands
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ thermo_style custom step pe ke etotal temp
thermo 100
run 500

fix active all propel/self quaternion 1.0
fix active all propel/self quat 1.0

# With active force there is more motion so increase bin size:
neighbor 1.0 bin
+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ FixPropelSelf::FixPropelSelf( LAMMPS *lmp, int narg, char **argv )
  if (strncmp(mode_str, "velocity", 8) == 0) {
    mode = VELOCITY;

  } else if (strncmp(mode_str, "quaternion", 10) == 0) {
  } else if (strncmp(mode_str, "quat", 10) == 0) {

    // This mode should only be supported if the atom style has
    // a quaternion (and if all atoms in the group have it)
@@ -248,7 +248,7 @@ void FixPropelSelf::post_force_velocity(int /*vflag*/)
int FixPropelSelf::atoms_have_quaternion()
{
  if (!atom->ellipsoid_flag) {
    error->all(FLERR, "Mode 'quaternion' requires atom style ellipsoid");
    error->all(FLERR, "Mode 'quat' requires atom style ellipsoid");
    return 0;
  }