diff --git a/doc/src/fix_active.txt b/doc/src/fix_active.txt deleted file mode 100644 index 3bc6c15326..0000000000 --- a/doc/src/fix_active.txt +++ /dev/null @@ -1,50 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -fix active command :pre - -[Syntax:] - -fix ID group-ID magnitude - -ID, group-ID are documented in "fix"_fix.html command :ulb,l -addforce = style name of this fix command :l -magnitude = magnitude of the active force :l -:ule - -[Examples:] - -fix active_group all active 1.0 -fix constant_velocity all viscous 1.0 - -[Description:] - -Adds a force of a constant magnitude to each atom in the group. The direction -of 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 -frame. - -:line - -[Restart, fix_modify, output, run start/stop, minimize info:] - -No information about this fix is written to "binary restart -files"_restart.html. - -This fix is not imposed during minimization. - -[Restrictions:] - -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. Therefore, this fix only works with -ellipsoidal particles. - -[Related commands:] - -"fix setforce"_fix_setforce.html, "fix addforce"_fix_addforce.html diff --git a/doc/src/fix_propel_self.txt b/doc/src/fix_propel_self.txt index 3bc6c15326..b65b4780e9 100644 --- a/doc/src/fix_propel_self.txt +++ b/doc/src/fix_propel_self.txt @@ -6,28 +6,33 @@ :line -fix active command :pre +fix propel/self command :pre [Syntax:] -fix ID group-ID magnitude +fix ID group-ID propel/self mode magnitude ID, group-ID are documented in "fix"_fix.html command :ulb,l -addforce = style name of this fix command :l +propel/self = style name of this fix command :l +mode = velocity or quaternion :l magnitude = magnitude of the active force :l :ule [Examples:] -fix active_group all active 1.0 +fix active_group all propel/self velocity 1.0 fix constant_velocity all viscous 1.0 [Description:] -Adds a force of a constant magnitude to each atom in the group. The direction -of 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 -frame. +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. +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 frame. This mode requires all atoms in the group +to have a quaternion, so atom_style should either be ellipsoid or body. :line diff --git a/examples/USER/misc/active/active_langevin.in b/examples/USER/misc/active/active_langevin.in deleted file mode 100644 index 3854729fc5..0000000000 --- a/examples/USER/misc/active/active_langevin.in +++ /dev/null @@ -1,61 +0,0 @@ -# Uses a combnation of fix active and fix langevin to achieve -# self-propelled particles. - -dimension 3 -boundary p p p -units lj - -# Fix active uses quaternions to orient the active force so you need -# ellipsoidal particles, even if you do not care about asymmetric shape -atom_style ellipsoid - - -# Set up box and particles: -variable L equal 10 -region total block -$L $L -$L $L -$L $L -create_box 1 total -variable N equal 1000 -create_atoms 1 random $N 123456 total - -# Set particle shape: -set group all shape 1 1 1 -set group all quat/random 18238 -variable V equal "4.0*PI" -variable rho equal "1.0 / v_V" -# Density so that mass = 1 -set group all density ${rho} - -# Simple repulsive LJ -pair_style lj/cut 1.1225 -pair_coeff * * 1.0 1.0 -pair_modify shift yes - -# Remove initial overlap: -minimize 1e-4 1e-6 1000 10000 -reset_timestep 0 - -# Fixes for time integration -fix step all nve/asphere -fix active all active 1.0 -fix temp all langevin 1.0 1.0 1.0 12341 angmom 3.333333333333 - -variable DUMP_OUT string "active_langevin.dump" -variable MSD_OUT string "active_langevin_msd.dat" - -# Compute temperature and orientation -compute T all temp/asphere -compute quat all property/atom quatw quati quatj quatk -compute msd all msd -compute vacf all vacf - -# Some output: -thermo_style custom time step pe ke etotal temp c_T -thermo 1000 - -dump traj all custom 100 ${DUMP_OUT} id type x y z & - c_quat[1] c_quat[2] c_quat[3] c_quat[4] - -fix msd all ave/time 1 10 50 c_msd[4] c_vacf[1] c_vacf[2] c_vacf[3] c_vacf[4] file ${MSD_OUT} - -timestep 0.001 -run 10000 diff --git a/examples/USER/misc/active/active_viscous.in b/examples/USER/misc/active/active_viscous.in deleted file mode 100644 index 62fdaa7751..0000000000 --- a/examples/USER/misc/active/active_viscous.in +++ /dev/null @@ -1,66 +0,0 @@ -# Uses a combnation of fix active and fix langevin to achieve -# self-propelled particles. - -dimension 3 -boundary p p p -units lj - -# Fix active uses quaternions to orient the active force so you need -# ellipsoidal particles, even if you do not care about asymmetric shape -atom_style ellipsoid - - -# Set up box and particles: -variable L equal 10 -region total block -$L $L -$L $L -$L $L -create_box 1 total -variable N equal 1000 -create_atoms 1 random $N 123456 total - -# Set particle shape: -set group all shape 1 1 1 -set group all quat/random 18238 -variable V equal "4.0*PI" -variable rho equal "1.0 / v_V" -# Density so that mass = 1 -set group all density ${rho} - -# Simple repulsive LJ -pair_style lj/cut 1.1225 -pair_coeff * * 1.0 1.0 -pair_modify shift yes - -# Remove initial overlap: -minimize 1e-4 1e-6 1000 10000 -reset_timestep 0 - -# Fixes for time integration -fix step all nve/asphere - -# Should lead to constant velocity of 10 per particle -fix active all active 1.0 -fix visc all viscous 0.1 - -# Initial velocities: -velocity all create 1.0 1234 - -variable DUMP_OUT string "active_viscous.dump" -variable MSD_OUT string "active_viscous_msd.dat" - -# Compute temperature and orientation -compute T all temp/asphere -compute quat all property/atom quatw quati quatj quatk -compute msd all msd -compute vacf all vacf - -# Some output: -thermo_style custom time step pe ke etotal temp c_T -thermo 1000 - -dump traj all custom 100 ${DUMP_OUT} id type x y z & - c_quat[1] c_quat[2] c_quat[3] c_quat[4] - -fix msd all ave/time 1 10 50 c_msd[4] c_vacf[1] c_vacf[2] c_vacf[3] c_vacf[4] file ${MSD_OUT} - -timestep 0.001 -run 100000 diff --git a/src/USER-MISC/fix_propel_self.cpp b/src/USER-MISC/fix_propel_self.cpp index 13c5e0ef90..8f98de518b 100644 --- a/src/USER-MISC/fix_propel_self.cpp +++ b/src/USER-MISC/fix_propel_self.cpp @@ -58,7 +58,7 @@ FixPropelSelf::FixPropelSelf( LAMMPS *lmp, int narg, char **argv ) // 2. Cases where the atoms have an internal ellipsoid. Currently those // styles are only body and aspherical particles. // The first argument (mode) is used to differentiate between these. - + // args: fix ID all propel/self mode magnitude // Optional args are const char *mode_str = argv[3]; @@ -77,7 +77,6 @@ FixPropelSelf::FixPropelSelf( LAMMPS *lmp, int narg, char **argv ) error->all(FLERR, msg); } - magnitude = force->numeric( FLERR, argv[4] ); } @@ -217,12 +216,12 @@ int FixPropelSelf::verify_atoms_have_quaternion() if (mask[i] & groupbit) { if (ellipsoid_flag && atom->ellipsoid[i] < 0) { error->all(FLERR, "Got atom without ellipsoid set"); - // Kind-of pointless but silences some compiler warnings: + // Kind-of pointless return but silences compiler warnings: return 1; } if (body_flag && atom->body[i] < 0) { error->all(FLERR, "Got atom without body set"); - // Kind-of pointless but silences some compiler warnings: + // Kind-of pointless return silences compiler warnings: return 1; } }