Use x-axis along the particle's quaternion.

This change allows the fix to work in 2D as well.
This commit is contained in:
Pierre de Buyl
2019-12-19 21:34:49 +01:00
parent 7b977856b9
commit fe4f7899d2
2 changed files with 3 additions and 3 deletions

View File

@ -40,8 +40,8 @@ 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 "(Erdmann)"_#Erdmann.
For mode = quaternion the force is along the axis obtained by rotating the z-axis along the
atom's quaternion. In other words, the force is along the z-axis in the atom's body
For mode = quaternion the force is 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

View File

@ -188,7 +188,7 @@ void FixPropelSelf::post_force_quaternion(int /* vflag */ )
continue;
}
double f_act[3] = { 0.0, 0.0, 1.0 };
double f_act[3] = { 1.0, 0.0, 0.0 };
double f_rot[3];
double *quat = bonus[ellipsoid[i]].quat;