diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index dd4c3bcaba..b3dcd36913 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -124,7 +124,7 @@ set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE USER-LB USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH - USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-PACE) + USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-PACE USER-BROWNIAN) set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT USER-INTEL USER-OMP) diff --git a/cmake/presets/most.cmake b/cmake/presets/most.cmake index 5dc58b735b..064b22595f 100644 --- a/cmake/presets/most.cmake +++ b/cmake/presets/most.cmake @@ -5,9 +5,9 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GRANULAR KSPACE MANYBODY MC MISC MLIAP MOLECULE OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI - USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION - USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC USER-MESODPD - USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION + USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS + USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC + USER-MESODPD USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION USER-REAXC USER-SDPD USER-SPH USER-SMD USER-UEF USER-YAFF) foreach(PKG ${ALL_PACKAGES}) diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index 671716e89d..65f4f542cd 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -39,6 +39,9 @@ OPT. * :doc:`ave/time ` * :doc:`aveforce ` * :doc:`balance ` + * :doc:`brownian ` + * :doc:`brownian/asphere ` + * :doc:`brownian/sphere ` * :doc:`bocs ` * :doc:`bond/break ` * :doc:`bond/create ` diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index f1c590d850..d6f40b3228 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -69,6 +69,7 @@ page gives those details. * :ref:`USER-ATC ` * :ref:`USER-AWPMD ` * :ref:`USER-BOCS ` + * :ref:`USER-BROWNIAN ` * :ref:`USER-CGDNA ` * :ref:`USER-CGSDK ` * :ref:`USER-COLVARS ` @@ -1266,6 +1267,26 @@ Example inputs are in the examples/USER/bocs folder. ---------- +.. _PKG-USER-BROWNIAN: + +USER-BROWNIAN package +--------------------- + +**Contents:** + +This package provides :doc:`fix brownian, fix brownian/sphere, and +fix brownian/asphere ` as well as +:doc:`fix propel/self ` which allow to do Brownian +Dynamics time integration of point, spherical and aspherical particles +and also support self-propelled particles. + +**Authors:** Sam Cameron (University of Bristol), +Stefan Paquay (while at Brandeis University) (initial version of fix propel/self) + +Example inputs are in the examples/USER/brownian folder. + +---------- + .. _PKG-USER-CGDNA: USER-CGDNA package diff --git a/doc/src/Packages_user.rst b/doc/src/Packages_user.rst index 00d1dfb67b..23325e8357 100644 --- a/doc/src/Packages_user.rst +++ b/doc/src/Packages_user.rst @@ -39,6 +39,8 @@ package: +------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ | :ref:`USER-BOCS ` | BOCS bottom up coarse graining | :doc:`fix bocs ` | USER/bocs | no | +------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ +| :ref:`USER-BROWNIAN ` | Brownian dynamics and self-propelled particles | :doc:`fix brownian `, :doc:`fix propel/self ` | USER/brownian | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ | :ref:`USER-CGDNA ` | coarse-grained DNA force fields | src/USER-CGDNA/README | USER/cgdna | no | +------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ | :ref:`USER-CGSDK ` | SDK coarse-graining model | :doc:`pair_style lj/sdk ` | USER/cgsdk | no | diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 109bfb00be..41c9732c62 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -182,6 +182,9 @@ accelerated styles exist. * :doc:`ave/time ` - compute/output global time-averaged quantities * :doc:`aveforce ` - add an averaged force to each atom * :doc:`balance ` - perform dynamic load-balancing +* :doc:`brownian ` - overdamped translational brownian motion +* :doc:`brownian/asphere ` - overdamped translational and rotational brownian motion for ellipsoids +* :doc:`brownian/sphere ` - overdamped translational and rotational brownian motion for spheres * :doc:`bocs ` - NPT style time integration with pressure correction * :doc:`bond/break ` - break bonds on the fly * :doc:`bond/create ` - create bonds on the fly diff --git a/doc/src/fix_brownian.rst b/doc/src/fix_brownian.rst new file mode 100644 index 0000000000..d032346617 --- /dev/null +++ b/doc/src/fix_brownian.rst @@ -0,0 +1,216 @@ +.. index:: fix brownian +.. index:: fix brownian/sphere +.. index:: fix brownian/asphere + +fix brownian command +=========================== + +fix brownian/sphere command +=========================== + +fix brownian/sphere command +=========================== + + +Syntax +"""""" + +.. parsed-literal:: + + fix ID group-ID style_name temp seed keyword args + +* ID, group-ID are documented in :doc:`fix ` command +* style_name = *brownian* or *brownian/sphere* or *brownian/asphere* +* temp = temperature +* seed = random number generator seed +* one or more keyword/value pairs may be appended +* keyword = *rng* or *dipole* or *gamma_r_eigen* or *gamma_t_eigen* or *gamma_r* or *gamma_t* + + .. parsed-literal:: + + *rng* value = *uniform* or *gaussian* or *none* + *uniform* = use uniform random number generator + *gaussian* = use gaussian random number generator + *none* = turn off noise + *dipole* value = *mux* and *muy* and *muz* for *brownian/asphere* + *mux*, *muy*, and *muz* = update orientation of dipole having direction (*mux*,*muy*,*muz*) in body frame of rigid body + *gamma_r_eigen* values = *gr1* and *gr2* and *gr3* for *brownian/asphere* + *gr1*, *gr2*, and *gr3* = diagonal entries of body frame rotational friction tensor + *gamma_r* values = *gr* for *brownian/sphere* + *gr* = magnitude of the (isotropic) rotational friction tensor + *gamma_t_eigen* values = *gt1* and *gt2* and *gt3* for *brownian/asphere* + *gt1*, *gt2*, and *gt3* = diagonal entries of body frame translational friction tensor + *gamma_t* values = *gt* for *brownian* and *brownian/sphere* + *gt* = magnitude of the (isotropic) translational friction tensor + + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix 1 all brownian 1.0 12908410 gamma_t 1.0 + fix 1 all brownian 1.0 12908410 gamma_t 3.0 rng gaussian + fix 1 all brownian/sphere 1.0 1294019 gamma_t 3.0 gamma_r 1.0 + fix 1 all brownian/sphere 1.0 19581092 gamma_t 1.0 gamma_r 0.3 rng none + fix 1 all brownian/asphere 1.0 1294019 gamma_t_eigen 1.0 2.0 3.0 gamma_r_eigen 4.0 7.0 8.0 rng gaussian + fix 1 all brownian/asphere 1.0 1294019 gamma_t_eigen 1.0 2.0 3.0 gamma_r_eigen 4.0 7.0 8.0 dipole 1.0 0.0 0.0 + + +Description +""""""""""" + +Perform Brownian Dynamics time integration to update position, velocity, +dipole orientation (for spheres) and quaternion orientation (for +ellipsoids, with optional dipole update as well) of all particles in the +fix group in each timestep. Brownian Dynamics uses Newton's laws of +motion in the limit that inertial forces are negligible compared to +viscous forces. The stochastic equation of motion for the center of mass +positions is + +.. math:: + + d\mathbf{r} = \mathbf{\gamma}_t^{-1}\mathbf{F}dt+\sqrt{2k_BT}\mathbf{\gamma}_t^{-1/2}d\mathbf{W}_t, + +in the lab-frame (i.e. :math:`\mathbf{\gamma}_t` is not diagonal, but +only depends on orientation and so the noise is still additive). + +The rotational motion for the spherical and ellipsoidal particles is not +as simple an expression, but is chosen to replicate the Boltzmann +distribution for the case of conservative torques (see :ref:`(Ilie) +` or :ref:`(Delong) `). + +For the style *brownian*, only the positions of the particles are +updated. This is therefore suitable for point particle simulations. + +For the style *brownian/sphere*, the positions of the particles are +updated, and a dipole slaved to the spherical orientation is also +updated. This style therefore requires the hybrid atom style +:doc:`atom_style dipole ` and :doc:`atom_style sphere +`. + +For the style *brownian/asphere*, the center of mass positions and the +quaternions of ellipsoidal particles are updated. This fix style is +suitable for equations of motion where the rotational and translational +friction tensors can be diagonalized in a certain (body) reference frame. + + +--------- + +.. note:: + + This integrator does not by default assume a relationship between the + rotational and translational friction tensors, though such a relationship + should exist in the case of no-slip boundary conditions between the particles and + the surrounding (implicit) solvent. E.g. in the case of spherical particles, + the condition :math:`\gamma_t=3\gamma_r/\sigma^2` must be explicitly + accounted for by setting *gamma_t* to 3x and *gamma_r* to x (where + :math:`\sigma` is the spherical diameter). A similar (though more complex) + relationship holds for ellipsoids and rod-like particles. + +--------- + +.. note:: + + Temperature computation using the :doc:`compute temp ` + will not correctly compute temperature of these overdamped dynamics + since we are explicitly neglecting inertial effects. + Furthermore, this time integrator does not add the stochastic terms or + viscous terms to the force and/or torques. Rather, they are just added + in to the equations of motion to update the degrees of freedom. + +--------- + + +If the *rng* keyword is used with the *uniform* value, then the noise +is generated from a uniform distribution (see +:ref:`(Dunweg) ` for why this works). This is the same method +of noise generation as used in :doc:`fix_langevin `. + +If the *rng* keyword is used with the *gaussian* value, then the noise +is generated from a gaussian distribution. Typically this added +complexity is unnecessary, and one should be fine using the *uniform* +value for reasons argued in :ref:`(Dunweg) `. + +If the *rng* keyword is used with the *none* value, then the noise +terms are set to zero. + +The *gamma_t* keyword sets the (isotropic) translational viscous damping. +Required for (and only compatible with) *brownian* and *brownian/sphere*. +The units of *gamma_t* are mass/time. + +The *gamma_r* keyword sets the (isotropic) rotational viscous damping. +Required for (and only compatible with) *brownian/sphere*. +The units of *gamma_r* are mass*length**2/time. + +The *gamma_r_eigen*, and *gamma_t_eigen* keywords are the eigenvalues of +the rotational and viscous damping tensors (having the same units as +their isotropic counterparts). Required for (and only compatible with) +*brownian/asphere*. For a 2D system, the first two values of *gamma_r_eigen* +must be inf (only rotation in xy plane), and the third value of *gamma_t_eigen* +must be inf (only diffusion in xy plane). + +If the *dipole* keyword is used, then the dipole moments of the particles +are updated as described above. Only compatible with *brownian/asphere* +(as *brownian/sphere* updates dipoles automatically). + +---------- + +.. note:: + For style *brownian/asphere*, the components *gamma_t_eigen* =(x,x,x) and + *gamma_r_eigen* = (y,y,y), the dynamics will replicate those of the + *brownian/sphere* style with *gamma_t* = x and *gamma_r* = y. + +---------- + +Restart, fix_modify, output, run start/stop, minimize info +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +No information about this fix is written to :doc:`binary restart files `. +No global or per-atom quantities are stored +by this fix for access by various :doc:`output commands `. + + +No parameter of this fix can be used with the *start/stop* keywords of +the :doc:`run ` command. This fix is not invoked during +:doc:`energy minimization `. + +Restrictions +"""""""""""" + +The style *brownian/sphere* fix requires that atoms store torque and angular velocity (omega) +as defined by the :doc:`atom_style sphere ` command. +The style *brownian/asphere* fix requires that atoms store torque and quaternions +as defined by the :doc:`atom_style ellipsoid ` command. +If the *dipole* keyword is used, they must also store a dipole moment +as defined by the :doc:`atom_style dipole ` command. + +This fix is part of the USER-BROWNIAN package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package ` +doc page for more info. + +Related commands +"""""""""""""""" + +:doc:`fix propel/self `, +:doc:`fix langevin `, :doc:`fix nve/sphere `, + +Default +""""""" + +The default for *rng* is *uniform*. The default for the rotational and translational friction +tensors are the identity tensor. + +---------- + +.. _Ilie1: + +**(Ilie)** Ilie, Briels, den Otter, Journal of Chemical Physics, 142, 114103 (2015). + +.. _Delong1: + +**(Delong)** Delong, Usabiaga, Donev, Journal of Chemical Physics. 143, 144107 (2015) + +.. _Dunweg7: + +**(Dunweg)** Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991). diff --git a/doc/src/fix_propel_self.rst b/doc/src/fix_propel_self.rst index 3a1bfb3166..ddc96817f9 100644 --- a/doc/src/fix_propel_self.rst +++ b/doc/src/fix_propel_self.rst @@ -8,52 +8,121 @@ Syntax .. parsed-literal:: - fix ID group-ID propel/self mode magnitude keyword values ... + fix ID group-ID propel/self mode magnitude keyword values * ID, group-ID are documented in :doc:`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* +* mode = *dipole* or *velocity* or *quat* +* magnitude = magnitude of self-propulsion force +* zero or one keyword/value pairs may be appended +* keyword = *qvector* + + .. parsed-literal:: + + *qvector* value = direction of force in ellipsoid frame + *sx*, *sy*, *sz* = components of *qvector* - *types* values = one or more atom types Examples """""""" .. code-block:: LAMMPS - 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 + fix active all propel/self dipole 40.0 + fix active all propel/self velocity 10.0 + fix active all propel/self quat 15.7 qvector 1.0 0.0 0.0 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. +Add a force to each atom in the group due to a self-propulsion force. The +force is given by -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) `. +.. math:: -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) `, :ref:`(Bialke) ` and :ref:`(Fily) -`. + F_i = f_P e_i -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. +where *i* is the particle the force is being applied to, :math:`f_P` +is the magnitude of the force, and :math:`e_i` is the vector direction +of the force. The specification of :math:`e_i` is based on which of the +three keywords (*dipole* or *velocity* or *quat*) one selects. + +For mode *dipole*, :math:`e_i` is just equal to +the dipole vectors of the atoms in the group. Therefore, if the dipoles +are not unit vectors, the :math:`e_i` will not be unit vectors. + +.. note:: + + If another command changes the magnitude of the dipole, this force will + change accordingly (since :math:`|e_i|` will change, which is physically + equivalent to re-scaling :math:`f_P` while keeping :math:`|e_i|` constant), + and no warning will be provided by LAMMPS. This is almost never what you + want, so ensure you are not changing dipole magnitudes with another LAMMPS + fix or pair style. Furthermore, self-propulsion forces (almost) always + set :math:`e_i` to be a unit vector for all times, so it's best to set + all the dipole magnitudes to 1.0 unless you have a good reason not to + (see the :doc:`set ` command on how to do this). + +For mode *velocity*, :math:`e_i` points in the direction +of the current velocity (a unit-vector). This can be interpreted as a +velocity-dependent friction, as proposed by e.g. :ref:`(Erdmann) `. + +For mode *quat*, :math:`e_i` points in the direction of a unit +vector, oriented in the coordinate frame of the ellipsoidal particles, +which defaults to point along the x-direction. This default behavior +can be changed by via the *quatvec* keyword. + +The optional *quatvec* keyword specifies the direction of self-propulsion +via a unit vector (sx,sy,sz). The arguments *sx*, *sy*, and *sz*, are +defined within the coordinate frame of the atom's +ellipsoid. For instance, for an ellipsoid with long axis along +its x-direction, if one wanted the self-propulsion force to also +be along this axis, set *sx* equal to 1 and *sy*, *sz* both equal +to zero. This keyword may only be specified for mode *quat*. + +.. note:: + + In using keyword *quatvec*, the three arguments *sx*, + *sy*, and *sz* will be automatically normalized to components + of a unit vector internally to avoid users having to explicitly + do so themselves. Therefore, in mode *quat*, the vectors :math:`e_i` + will always be of unit length. + + +Along with adding a force contribution, this fix can also +contribute to the virial (pressure) of the system, defined as +:math:`f_P \sum_i /(d V)`, where :math:`r_i` is the +*unwrapped* coordinate of particle i in the case of periodic +boundary conditions. See :ref:`(Winkler) ` for a +discussion of this active pressure contribution. + +For modes *dipole* and *quat*, this fix is by default +included in pressure computations. + +For mode *velocity*, this fix is by default not included +in pressure computations. + + +.. note:: + + In contrast to equilibrium systems, pressure of active systems + in general depends on the geometry of the container. + The active pressure contribution as calculated in this fix + is only valid for certain boundary conditions (spherical + walls, rectangular walls, or periodic boundary conditions). + For other geometries, the pressure must be measured via + explicit calculation of the force per unit area on a wall, + and so one must not calculate it using this fix. + (Use :doc:`fix_modify ` as described below + to turn off the virial contribution of this fix). Again, + see :ref:`(Winkler) ` for discussion of why this + is the case. + + Furthermore, when dealing with active systems, the temperature + is no longer well defined. Therefore, one should ensure that + the *virial* flag is used in the + :doc:`compute pressure ` command (turning + off temperature contributions). ---------- @@ -62,40 +131,48 @@ Restart, fix_modify, output, run start/stop, minimize info No information about this fix is written to :doc:`binary restart files `. -This fix is not imposed during minimization. +The :doc:`fix_modify ` *virial* option is supported by this +fix to add the contribution due to the added forces on atoms to the +system's virial as part of :doc:`thermodynamic output `. +The default is *virial yes* for keywords *dipole* and *quat*. The +default is *virial no* for keyword *velocity*. + + +No parameter of this fix can be used with the *start/stop* keywords of +the :doc:`run ` command. + 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. +With keyword *dipole*, this fix only works when the DIPOLE package is enabled. +See the :doc:`Build package ` doc page for more info. + +This fix is part of the USER-BROWNIAN package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package ` +doc page for more info. + Related commands """""""""""""""" -:doc:`fix setforce `, :doc:`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. +:doc:`fix efield ` , :doc:`fix setforce `, +:doc:`fix addforce ` Default """"""" -types +none +---------- + + +.. _Erdmann1: + +**(Erdmann)** U. Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer, +Eur. Phys. J. B 15, 105-113, 2000. + + +.. _Winkler1: + +**(Winkler)** Winkler, Wysocki, and Gompper, Soft Matter, 11, 6680 (2015). diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index fc40ad004c..aa932fbc2d 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -312,6 +312,7 @@ br Branduardi Branicio brennan +Briels Brien Brilliantov Broadwell @@ -626,6 +627,7 @@ delflag Dellago delocalization delocalized +Delong delr deltaHf Dendrimer @@ -709,6 +711,7 @@ dodgerblue dof doi Donadio +Donev dotc Doty doxygen @@ -1143,6 +1146,7 @@ GMock gneb GNEB Goldfarb +Gompper Gonzalez-Melchor googlemail googletest @@ -1321,6 +1325,7 @@ ijk ijkl ik Ikeshoji +Ilie ilmenau Ilmenau ilp @@ -3109,6 +3114,7 @@ Swinburne Swol Swope Sx +sx sy Sy symplectic @@ -3118,6 +3124,7 @@ sysdim Syst systemd Sz +sz Tabbernor tabinner Tadmor @@ -3358,6 +3365,7 @@ upenn upto Urbakh Urbana +Usabiaga usec uSemiParallel userguide @@ -3502,6 +3510,7 @@ Wikipedia Wildcard wildcard wildcards +Winkler Wirnsberger wirtes witin @@ -3513,6 +3522,7 @@ Worley Wriggers Wuppertal Wurtzite +Wysocki www wx Wx diff --git a/examples/USER/brownian/2d_velocity/in2d.velocity b/examples/USER/brownian/2d_velocity/in2d.velocity new file mode 100644 index 0000000000..fcfae0554b --- /dev/null +++ b/examples/USER/brownian/2d_velocity/in2d.velocity @@ -0,0 +1,53 @@ +##### 2d overdamped brownian dynamics with self-propulsion force in direction of velocity. ##### + +variable gamma_t equal 1.0 +variable temp equal 1.0 +variable seed equal 1974019 +variable fp equal 4.0 +variable params string ${gamma_t}_${temp}_${fp} + +units lj +dimension 2 +newton off + +lattice sq 0.4 +region box block -16 16 -16 16 -0.2 0.2 +create_box 1 box +create_atoms 1 box +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix step all brownian ${temp} ${seed} gamma_t ${gamma_t} +fix vel all propel/self velocity ${fp} +fix 2 all enforce2d +fix_modify vel virial yes + +compute press all pressure NULL virial + +thermo_style custom step temp epair c_press + +#equilibration +timestep 0.0000000001 +thermo 500 +run 5000 +reset_timestep 0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] c_press + +timestep 0.00001 +thermo 1000 + +# main run +run 12000 + + diff --git a/examples/USER/brownian/2d_velocity/log.11May2021.in2d_velocity.g++.1 b/examples/USER/brownian/2d_velocity/log.11May2021.in2d_velocity.g++.1 new file mode 100644 index 0000000000..a5a58ba9f0 --- /dev/null +++ b/examples/USER/brownian/2d_velocity/log.11May2021.in2d_velocity.g++.1 @@ -0,0 +1,151 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### 2d overdamped brownian dynamics with self-propulsion force in direction of velocity. ##### + +variable gamma_t equal 1.0 +variable temp equal 1.0 +variable seed equal 1974019 +variable fp equal 4.0 +variable params string ${gamma_t}_${temp}_${fp} +variable params string 1_${temp}_${fp} +variable params string 1_1_${fp} +variable params string 1_1_4 + +units lj +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -16 16 -16 16 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-25.298221 -25.298221 -0.31622777) to (25.298221 25.298221 0.31622777) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 1024 atoms + create_atoms CPU = 0.001 seconds +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix step all brownian ${temp} ${seed} gamma_t ${gamma_t} +fix step all brownian 1 ${seed} gamma_t ${gamma_t} +fix step all brownian 1 1974019 gamma_t ${gamma_t} +fix step all brownian 1 1974019 gamma_t 1 +fix vel all propel/self velocity ${fp} +fix vel all propel/self velocity 4 +fix 2 all enforce2d +fix_modify vel virial yes + +compute press all pressure NULL virial + +thermo_style custom step temp epair c_press + +#equilibration +timestep 0.0000000001 +thermo 500 +run 5000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.289 | 2.289 | 2.289 Mbytes +Step Temp E_pair c_press + 0 1 0 -0.18336111 + 500 2.0519273e+10 0 -0.048238222 + 1000 1.9821717e+10 0 -0.4711053 + 1500 1.9697609e+10 0 -0.13539588 + 2000 2.0209443e+10 0 0.0094958039 + 2500 1.9591299e+10 0 0.40117118 + 3000 2.089566e+10 0 -0.036548251 + 3500 1.978692e+10 0 0.28282578 + 4000 2.0657848e+10 0 0.17618064 + 4500 2.0837353e+10 0 -0.080724651 + 5000 2.0348316e+10 0 -0.17471195 +Loop time of 0.575164 on 1 procs for 5000 steps with 1024 atoms + +Performance: 0.075 tau/day, 8693.168 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.0036819 | 0.0036819 | 0.0036819 | 0.0 | 0.64 +Output | 0.00027752 | 0.00027752 | 0.00027752 | 0.0 | 0.05 +Modify | 0.51999 | 0.51999 | 0.51999 | 0.0 | 90.41 +Other | | 0.05121 | | | 8.90 + +Nlocal: 1024.00 ave 1024 max 1024 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 65.0000 ave 65 max 65 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +reset_timestep 0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] c_press + +timestep 0.00001 +thermo 1000 + +# main run +run 12000 +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.664 | 2.664 | 2.664 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] c_press + 0 2.0328444e+10 0 0 0 0 0 -0.17471195 + 1000 197017.59 0 0.018147562 0.019839233 0 0.037986796 -0.71897807 + 2000 197030.23 0 0.03909867 0.041721342 0 0.080820011 -0.30051929 + 3000 201997.2 0 0.065694399 0.06235257 0 0.12804697 -0.85167039 + 4000 199927.76 0 0.085698715 0.080328815 0 0.16602753 0.18493117 + 5000 198665.7 0 0.10896054 0.097021266 0 0.2059818 -0.090735406 + 6000 199277.78 0 0.13081111 0.11724814 0 0.24805925 -0.18189034 + 7000 199850.54 0 0.14721838 0.13806858 0 0.28528696 0.11334674 + 8000 191577.11 0 0.16582149 0.15935853 0 0.32518002 -0.73284569 + 9000 197331.29 0 0.17995704 0.18652927 0 0.3664863 -0.015558407 + 10000 197048.17 0 0.2034106 0.20329856 0 0.40670916 0.36985211 + 11000 200105.54 0 0.21809835 0.21966463 0 0.43776298 0.36437 + 12000 203180.39 0 0.23810386 0.23666184 0 0.47476569 -0.072006034 +Loop time of 1.37465 on 1 procs for 12000 steps with 1024 atoms + +Performance: 7542.303 tau/day, 8729.517 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0.00012231 | 0.00012231 | 0.00012231 | 0.0 | 0.01 +Comm | 0.0024607 | 0.0024607 | 0.0024607 | 0.0 | 0.18 +Output | 0.00068665 | 0.00068665 | 0.00068665 | 0.0 | 0.05 +Modify | 1.2479 | 1.2479 | 1.2479 | 0.0 | 90.78 +Other | | 0.1235 | | | 8.98 + +Nlocal: 1024.00 ave 1024 max 1024 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 15 +Dangerous builds = 0 + + +Total wall time: 0:00:01 diff --git a/examples/USER/brownian/2d_velocity/log.11May2021.in2d_velocity.g++.4 b/examples/USER/brownian/2d_velocity/log.11May2021.in2d_velocity.g++.4 new file mode 100644 index 0000000000..df9ff24070 --- /dev/null +++ b/examples/USER/brownian/2d_velocity/log.11May2021.in2d_velocity.g++.4 @@ -0,0 +1,151 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### 2d overdamped brownian dynamics with self-propulsion force in direction of velocity. ##### + +variable gamma_t equal 1.0 +variable temp equal 1.0 +variable seed equal 1974019 +variable fp equal 4.0 +variable params string ${gamma_t}_${temp}_${fp} +variable params string 1_${temp}_${fp} +variable params string 1_1_${fp} +variable params string 1_1_4 + +units lj +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -16 16 -16 16 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-25.298221 -25.298221 -0.31622777) to (25.298221 25.298221 0.31622777) + 2 by 2 by 1 MPI processor grid +create_atoms 1 box +Created 1024 atoms + create_atoms CPU = 0.001 seconds +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix step all brownian ${temp} ${seed} gamma_t ${gamma_t} +fix step all brownian 1 ${seed} gamma_t ${gamma_t} +fix step all brownian 1 1974019 gamma_t ${gamma_t} +fix step all brownian 1 1974019 gamma_t 1 +fix vel all propel/self velocity ${fp} +fix vel all propel/self velocity 4 +fix 2 all enforce2d +fix_modify vel virial yes + +compute press all pressure NULL virial + +thermo_style custom step temp epair c_press + +#equilibration +timestep 0.0000000001 +thermo 500 +run 5000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.289 | 2.289 | 2.289 Mbytes +Step Temp E_pair c_press + 0 1 0 -0.18336111 + 500 1.9862591e+10 0 -0.32013566 + 1000 2.0093184e+10 0 -0.36609742 + 1500 1.9562283e+10 0 -0.53349351 + 2000 1.9903977e+10 0 0.63783249 + 2500 2.0260128e+10 0 0.30046413 + 3000 1.9948065e+10 0 -0.63093105 + 3500 1.9507486e+10 0 0.48762848 + 4000 2.0049087e+10 0 0.40289309 + 4500 1.9975813e+10 0 0.57649363 + 5000 2.0129291e+10 0 -0.41288352 +Loop time of 0.238949 on 4 procs for 5000 steps with 1024 atoms + +Performance: 0.181 tau/day, 20924.952 timesteps/s +92.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.0080078 | 0.024718 | 0.031782 | 6.2 | 10.34 +Output | 0.0001812 | 0.00029999 | 0.00063467 | 0.0 | 0.13 +Modify | 0.13401 | 0.14401 | 0.15438 | 2.4 | 60.27 +Other | | 0.06992 | | | 29.26 + +Nlocal: 256.000 ave 256 max 256 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 33.0000 ave 33 max 33 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +reset_timestep 0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] c_press + +timestep 0.00001 +thermo 1000 + +# main run +run 12000 +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.664 | 2.664 | 2.664 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] c_press + 0 2.0109634e+10 0 0 0 0 0 -0.41288352 + 1000 195711.46 0 0.020076462 0.020523099 0 0.040599561 -0.32125126 + 2000 203263.85 0 0.039242992 0.039661282 0 0.078904274 0.11008705 + 3000 197417.54 0 0.064938128 0.057716419 0 0.12265455 0.16967601 + 4000 200505.97 0 0.086511225 0.074975267 0 0.16148649 0.31338473 + 5000 199373.77 0 0.10583263 0.098175658 0 0.20400829 0.34205791 + 6000 192881.14 0 0.12152088 0.11706037 0 0.23858125 -0.27870467 + 7000 203045.3 0 0.1383248 0.13629503 0 0.27461983 -0.046936646 + 8000 198544.08 0 0.16064738 0.1582206 0 0.31886798 -0.18803452 + 9000 205450.74 0 0.17926529 0.1829047 0 0.36216999 0.47191228 + 10000 200371.73 0 0.20084273 0.20365189 0 0.40449463 0.093098262 + 11000 202911.93 0 0.21569236 0.22221715 0 0.43790952 -0.38430031 + 12000 192590.04 0 0.24041439 0.24114487 0 0.48155926 -0.1677052 +Loop time of 0.443026 on 4 procs for 12000 steps with 1024 atoms + +Performance: 23402.683 tau/day, 27086.439 timesteps/s +97.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 3.2663e-05 | 3.3855e-05 | 3.4809e-05 | 0.0 | 0.01 +Comm | 0.0030291 | 0.0030628 | 0.0030825 | 0.0 | 0.69 +Output | 0.00027895 | 0.00051624 | 0.001184 | 0.0 | 0.12 +Modify | 0.31607 | 0.33372 | 0.37391 | 4.0 | 75.33 +Other | | 0.1057 | | | 23.86 + +Nlocal: 256.000 ave 259 max 253 min +Histogram: 1 0 0 1 0 0 1 0 0 1 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 15 +Dangerous builds = 0 + + +Total wall time: 0:00:00 diff --git a/examples/USER/brownian/asphere/in2d.ellipsoid b/examples/USER/brownian/asphere/in2d.ellipsoid new file mode 100644 index 0000000000..4b1a88bba7 --- /dev/null +++ b/examples/USER/brownian/asphere/in2d.ellipsoid @@ -0,0 +1,54 @@ +##### overdamped dynamics of non-interacting ellipsoids in 2D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 1.0 +variable gamma_r_1 string inf +variable gamma_r_2 string inf +variable gamma_r_3 string 0.1 +variable gamma_t_1 string 5.0 +variable gamma_t_2 string 7.0 +variable gamma_t_3 string inf +variable params string ${rng}_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} + +units lj +atom_style hybrid dipole ellipsoid +dimension 2 +newton off + +lattice sq 0.4 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +create_atoms 1 box +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * shape 3.0 1.0 1.0 +set type * quat/random ${seed} +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/asphere ${temp} ${seed} rng ${rng} & + gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} & + gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} & + dipole 1.0 0.0 0.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type & +# x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 diff --git a/examples/USER/brownian/asphere/in3d.ellipsoid b/examples/USER/brownian/asphere/in3d.ellipsoid new file mode 100644 index 0000000000..34f2684ee7 --- /dev/null +++ b/examples/USER/brownian/asphere/in3d.ellipsoid @@ -0,0 +1,54 @@ +##### overdamped dynamics of non-interacting ellipsoids in 3D ##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_r_1 string 2.0 +variable gamma_r_2 string 0.25 +variable gamma_r_3 string 0.1 +variable gamma_t_1 string 5.0 +variable gamma_t_2 string 7.0 +variable gamma_t_3 string 9.0 +variable params string ${rng}_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} + +units lj +atom_style hybrid dipole ellipsoid +dimension 3 +newton off + +lattice sc 0.4 +region box block -8 8 -8 8 -8 8 +create_box 1 box +create_atoms 1 box +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * shape 3.0 1.0 1.0 +set type * quat/random ${seed} +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/asphere ${temp} ${seed} rng ${rng} & + gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} & + gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} & + dipole 1.0 0.0 0.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type & +# x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 diff --git a/examples/USER/brownian/asphere/log.11May2021.in2d.ellipsoid.g++.1 b/examples/USER/brownian/asphere/log.11May2021.in2d.ellipsoid.g++.1 new file mode 100644 index 0000000000..619ab937c9 --- /dev/null +++ b/examples/USER/brownian/asphere/log.11May2021.in2d.ellipsoid.g++.1 @@ -0,0 +1,145 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of non-interacting ellipsoids in 2D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 1.0 +variable gamma_r_1 string inf +variable gamma_r_2 string inf +variable gamma_r_3 string 0.1 +variable gamma_t_1 string 5.0 +variable gamma_t_2 string 7.0 +variable gamma_t_3 string inf +variable params string ${rng}_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_5.0_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_5.0_7.0_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_5.0_7.0_inf + +units lj +atom_style hybrid dipole ellipsoid +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-47.434165 -47.434165 -0.31622777) to (47.434165 47.434165 0.31622777) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 3600 atoms + create_atoms CPU = 0.005 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 3600 settings made for dipole/random +set type * shape 3.0 1.0 1.0 +Setting atom values ... + 3600 settings made for shape +set type * quat/random ${seed} +set type * quat/random 198098 +Setting atom values ... + 3600 settings made for quat/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/asphere ${temp} ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen 5.0 ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen 5.0 7.0 ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen 5.0 7.0 inf dipole 1.0 0.0 0.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 5.114 | 5.114 | 5.114 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 0.99972222 0 0 0 0 0 + 100 34376.187 0 0.00034728749 0.00034318997 0 0.00069047747 + 200 36135.708 0 0.00067452936 0.0006818928 0 0.0013564222 + 300 34444.929 0 0.0010189319 0.00099849203 0 0.002017424 + 400 35668.312 0 0.0013648699 0.0013311884 0 0.0026960583 + 500 35388.615 0 0.0017330203 0.0016077184 0 0.0033407387 + 600 35180.065 0 0.002052223 0.0019394635 0 0.0039916865 + 700 34035.38 0 0.0024329956 0.0022664905 0 0.0046994861 + 800 34581.664 0 0.002783885 0.0025794872 0 0.0053633723 + 900 34579.945 0 0.003163442 0.0029351952 0 0.0060986372 + 1000 34158.066 0 0.0035589034 0.0032627605 0 0.0068216639 + 1100 33453.827 0 0.0038861895 0.003565372 0 0.0074515615 + 1200 33608.06 0 0.0041325698 0.0038943268 0 0.0080268966 + 1300 34381.633 0 0.004405682 0.0043294156 0 0.0087350976 + 1400 32925.746 0 0.0047383547 0.0046803517 0 0.0094187065 + 1500 34809.764 0 0.0051149571 0.0049309746 0 0.010045932 + 1600 33580.096 0 0.0054893472 0.0052465377 0 0.010735885 + 1700 34596.275 0 0.00581894 0.0056500316 0 0.011468972 + 1800 33926.736 0 0.0062129617 0.0059796125 0 0.012192574 + 1900 35577.131 0 0.0065668637 0.0062530163 0 0.01281988 + 2000 34224.967 0 0.0070005917 0.006598912 0 0.013599504 + 2100 33991.406 0 0.0073134826 0.0069119252 0 0.014225408 + 2200 34647.054 0 0.007659301 0.0073434715 0 0.015002772 + 2300 33956.835 0 0.007965191 0.0076318537 0 0.015597045 + 2400 35272.549 0 0.0082467116 0.007929202 0 0.016175914 + 2500 33901.494 0 0.0086251299 0.0082790757 0 0.016904206 + 2600 34138.227 0 0.0089419364 0.0086639744 0 0.017605911 + 2700 33691.013 0 0.0093083376 0.0090219118 0 0.018330249 + 2800 34716.817 0 0.0095840095 0.0094118945 0 0.018995904 + 2900 34473.982 0 0.0099773501 0.0098167668 0 0.019794117 + 3000 33406.776 0 0.010391969 0.010098625 0 0.020490594 +Loop time of 3.67112 on 1 procs for 3000 steps with 3600 atoms + +Performance: 706.051 tau/day, 817.189 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.037973 | 0.037973 | 0.037973 | 0.0 | 1.03 +Output | 0.0040674 | 0.0040674 | 0.0040674 | 0.0 | 0.11 +Modify | 3.515 | 3.515 | 3.515 | 0.0 | 95.75 +Other | | 0.1141 | | | 3.11 + +Nlocal: 3600.00 ave 3600 max 3600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 121.000 ave 121 max 121 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:03 diff --git a/examples/USER/brownian/asphere/log.11May2021.in2d.ellipsoid.g++.4 b/examples/USER/brownian/asphere/log.11May2021.in2d.ellipsoid.g++.4 new file mode 100644 index 0000000000..b3da385dda --- /dev/null +++ b/examples/USER/brownian/asphere/log.11May2021.in2d.ellipsoid.g++.4 @@ -0,0 +1,145 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of non-interacting ellipsoids in 2D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 1.0 +variable gamma_r_1 string inf +variable gamma_r_2 string inf +variable gamma_r_3 string 0.1 +variable gamma_t_1 string 5.0 +variable gamma_t_2 string 7.0 +variable gamma_t_3 string inf +variable params string ${rng}_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_5.0_${gamma_t_2}_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_5.0_7.0_${gamma_t_3} +variable params string gaussian_1.0_inf_inf_0.1_5.0_7.0_inf + +units lj +atom_style hybrid dipole ellipsoid +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-47.434165 -47.434165 -0.31622777) to (47.434165 47.434165 0.31622777) + 2 by 2 by 1 MPI processor grid +create_atoms 1 box +Created 3600 atoms + create_atoms CPU = 0.007 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 3600 settings made for dipole/random +set type * shape 3.0 1.0 1.0 +Setting atom values ... + 3600 settings made for shape +set type * quat/random ${seed} +set type * quat/random 198098 +Setting atom values ... + 3600 settings made for quat/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/asphere ${temp} ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen 5.0 ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen 5.0 7.0 ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng gaussian gamma_r_eigen inf inf 0.1 gamma_t_eigen 5.0 7.0 inf dipole 1.0 0.0 0.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 5.102 | 5.102 | 5.102 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 0.99972222 0 0 0 0 0 + 100 33874.438 0 0.0003458147 0.00033165629 0 0.00067747099 + 200 34893.188 0 0.00066290209 0.00068146332 0 0.0013443654 + 300 34494.226 0 0.0010064902 0.0010276646 0 0.0020341548 + 400 34537.887 0 0.0013457339 0.0014057042 0 0.0027514381 + 500 34458.46 0 0.0017006949 0.0017120083 0 0.0034127033 + 600 33229.977 0 0.0020841613 0.0020485346 0 0.0041326959 + 700 33288.631 0 0.0024270272 0.0023673304 0 0.0047943576 + 800 35317.512 0 0.0027924435 0.0026950912 0 0.0054875347 + 900 33094.299 0 0.0031503627 0.0030789319 0 0.0062292946 + 1000 35801.751 0 0.003489398 0.0034594626 0 0.0069488607 + 1100 33427.701 0 0.0038547506 0.0038375809 0 0.0076923316 + 1200 34675.07 0 0.0041824195 0.0042017298 0 0.0083841493 + 1300 33080.294 0 0.0045258945 0.0045816356 0 0.0091075301 + 1400 34927.288 0 0.0048252992 0.0049215701 0 0.0097468693 + 1500 34338.558 0 0.0051959155 0.0053020102 0 0.010497926 + 1600 34686.248 0 0.0055111463 0.0056220225 0 0.011133169 + 1700 34336.158 0 0.0059240394 0.0059060319 0 0.011830071 + 1800 34315.859 0 0.0063027944 0.0063004467 0 0.012603241 + 1900 35096.721 0 0.0066098525 0.00672222 0 0.013332073 + 2000 33544.18 0 0.0069401261 0.007074124 0 0.01401425 + 2100 33863.219 0 0.0072726502 0.0074175954 0 0.014690246 + 2200 34705.892 0 0.0075586722 0.0077552683 0 0.015313941 + 2300 34025.357 0 0.0079046728 0.0081760519 0 0.016080725 + 2400 34741.849 0 0.008252969 0.0085203087 0 0.016773278 + 2500 34406.959 0 0.0085370091 0.0088556377 0 0.017392647 + 2600 34062.63 0 0.0088134153 0.0092536326 0 0.018067048 + 2700 34677.666 0 0.0090592854 0.0096225881 0 0.018681874 + 2800 33464.216 0 0.0093984162 0.0099647695 0 0.019363186 + 2900 32920.721 0 0.0098222985 0.010366517 0 0.020188816 + 3000 34539.66 0 0.010133317 0.01068102 0 0.020814337 +Loop time of 1.12143 on 4 procs for 3000 steps with 3600 atoms + +Performance: 2311.341 tau/day, 2675.163 timesteps/s +96.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.036017 | 0.042828 | 0.051558 | 2.7 | 3.82 +Output | 0.0012608 | 0.0025993 | 0.0063775 | 4.3 | 0.23 +Modify | 0.9002 | 0.93095 | 0.99546 | 3.9 | 83.01 +Other | | 0.1451 | | | 12.93 + +Nlocal: 900.000 ave 900 max 900 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 61.0000 ave 61 max 61 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/examples/USER/brownian/asphere/log.11May2021.in3d.ellipsoid.g++.1 b/examples/USER/brownian/asphere/log.11May2021.in3d.ellipsoid.g++.1 new file mode 100644 index 0000000000..a193fc98e2 --- /dev/null +++ b/examples/USER/brownian/asphere/log.11May2021.in3d.ellipsoid.g++.1 @@ -0,0 +1,145 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of non-interacting ellipsoids in 3D ##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_r_1 string 2.0 +variable gamma_r_2 string 0.25 +variable gamma_r_3 string 0.1 +variable gamma_t_1 string 5.0 +variable gamma_t_2 string 7.0 +variable gamma_t_3 string 9.0 +variable params string ${rng}_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_5.0_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_5.0_7.0_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_5.0_7.0_9.0 + +units lj +atom_style hybrid dipole ellipsoid +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.005 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 4096 settings made for dipole/random +set type * shape 3.0 1.0 1.0 +Setting atom values ... + 4096 settings made for shape +set type * quat/random ${seed} +set type * quat/random 198098 +Setting atom values ... + 4096 settings made for quat/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/asphere ${temp} ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen 5.0 ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen 5.0 7.0 ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen 5.0 7.0 9.0 dipole 1.0 0.0 0.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 5.219 | 5.219 | 5.219 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 1.4996338 0 0 0 0 0 + 100 45690.838 0 0.00029994317 0.00029953902 0.00030002809 0.00089951027 + 200 45571.166 0 0.00061376797 0.00060955238 0.00061153551 0.0018348559 + 300 44693.418 0 0.00093058034 0.00089383536 0.00091554588 0.0027399616 + 400 44831.846 0 0.001250227 0.0012230128 0.0012120517 0.0036852914 + 500 45028.015 0 0.0015448869 0.0015339549 0.0014978843 0.0045767262 + 600 45895.442 0 0.0018621952 0.0018169905 0.0018352784 0.0055144641 + 700 45858.744 0 0.0021617097 0.0021137714 0.0021360394 0.0064115206 + 800 45155.215 0 0.002428445 0.0024288837 0.0024516737 0.0073090023 + 900 45427.427 0 0.0027265978 0.0027662531 0.0027329878 0.0082258387 + 1000 45398.166 0 0.0030685345 0.0030805014 0.0029765916 0.0091256275 + 1100 44622.428 0 0.0033766954 0.0033976168 0.0032745406 0.010048853 + 1200 45500.277 0 0.0036410565 0.0036840528 0.0035831659 0.010908275 + 1300 45265.8 0 0.0039143146 0.0039419334 0.0038761633 0.011732411 + 1400 45482.435 0 0.0042006542 0.0043373651 0.004164002 0.012702021 + 1500 45126.629 0 0.0044647379 0.0046021855 0.004487041 0.013553965 + 1600 45178.172 0 0.0047726618 0.0049110287 0.0048012671 0.014484958 + 1700 44918.685 0 0.005104787 0.0052522662 0.0050844375 0.015441491 + 1800 44776.678 0 0.0054395368 0.0056092038 0.0054623875 0.016511128 + 1900 46035.987 0 0.0057735872 0.0059357043 0.0057296009 0.017438892 + 2000 45436.517 0 0.0060837459 0.0063485717 0.0059769119 0.018409229 + 2100 45871.502 0 0.0063736337 0.0066551978 0.0063077439 0.019336575 + 2200 45511.847 0 0.0066419141 0.0069700452 0.0065553318 0.020167291 + 2300 45597.047 0 0.0069251517 0.0073015716 0.0068945654 0.021121289 + 2400 44832.007 0 0.0071894253 0.0076238221 0.0071638554 0.021977103 + 2500 45668.42 0 0.0074351304 0.0079594991 0.0075390719 0.022933701 + 2600 45248.483 0 0.007781496 0.008293944 0.0077956068 0.023871047 + 2700 45308.515 0 0.0080302993 0.0086329679 0.0081457335 0.024809001 + 2800 45637.72 0 0.0083889026 0.0089173198 0.0086032427 0.025909465 + 2900 45909.343 0 0.0087169392 0.009181179 0.0088778569 0.026775975 + 3000 45213.613 0 0.0090508891 0.0094253485 0.0092660321 0.02774227 +Loop time of 4.13937 on 1 procs for 3000 steps with 4096 atoms + +Performance: 626.183 tau/day, 724.749 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.24709 | 0.24709 | 0.24709 | 0.0 | 5.97 +Output | 0.004636 | 0.004636 | 0.004636 | 0.0 | 0.11 +Modify | 3.7604 | 3.7604 | 3.7604 | 0.0 | 90.85 +Other | | 0.1272 | | | 3.07 + +Nlocal: 4096.00 ave 4096 max 4096 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 817.000 ave 817 max 817 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:04 diff --git a/examples/USER/brownian/asphere/log.11May2021.in3d.ellipsoid.g++.4 b/examples/USER/brownian/asphere/log.11May2021.in3d.ellipsoid.g++.4 new file mode 100644 index 0000000000..7f6d8a81f0 --- /dev/null +++ b/examples/USER/brownian/asphere/log.11May2021.in3d.ellipsoid.g++.4 @@ -0,0 +1,145 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of non-interacting ellipsoids in 3D ##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_r_1 string 2.0 +variable gamma_r_2 string 0.25 +variable gamma_r_3 string 0.1 +variable gamma_t_1 string 5.0 +variable gamma_t_2 string 7.0 +variable gamma_t_3 string 9.0 +variable params string ${rng}_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_${temp}_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_${gamma_r_1}_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_${gamma_r_2}_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_${gamma_r_3}_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_${gamma_t_1}_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_5.0_${gamma_t_2}_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_5.0_7.0_${gamma_t_3} +variable params string uniform_1.0_2.0_0.25_0.1_5.0_7.0_9.0 + +units lj +atom_style hybrid dipole ellipsoid +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 2 by 1 by 2 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.002 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 4096 settings made for dipole/random +set type * shape 3.0 1.0 1.0 +Setting atom values ... + 4096 settings made for shape +set type * quat/random ${seed} +set type * quat/random 198098 +Setting atom values ... + 4096 settings made for quat/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/asphere ${temp} ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 ${seed} rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng ${rng} gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen ${gamma_r_1} ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 ${gamma_r_2} ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 ${gamma_r_3} gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen ${gamma_t_1} ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen 5.0 ${gamma_t_2} ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen 5.0 7.0 ${gamma_t_3} dipole 1.0 0.0 0.0 +fix 1 all brownian/asphere 1.0 198098 rng uniform gamma_r_eigen 2.0 0.25 0.1 gamma_t_eigen 5.0 7.0 9.0 dipole 1.0 0.0 0.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 5.152 | 5.152 | 5.152 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 1.4996338 0 0 0 0 0 + 100 45236.508 0 0.00030817418 0.00030717742 0.0003019227 0.0009172743 + 200 45564.566 0 0.00062027526 0.00062110132 0.0006080391 0.0018494157 + 300 46232.801 0 0.00091155216 0.00094473459 0.00093009391 0.0027863807 + 400 45250.414 0 0.0011980791 0.0012538262 0.0012201461 0.0036720513 + 500 45217.133 0 0.0015186813 0.0015752994 0.001509437 0.0046034177 + 600 45531.276 0 0.0018194588 0.0019243758 0.0018209246 0.0055647592 + 700 44834.624 0 0.0021277747 0.0022417115 0.0021352036 0.0065046898 + 800 45413.998 0 0.0024558838 0.0025741787 0.0024088704 0.0074389329 + 900 45668.624 0 0.0027366171 0.002858242 0.0027580782 0.0083529374 + 1000 45809.223 0 0.0030331425 0.003186293 0.0030414906 0.0092609261 + 1100 45193.019 0 0.0033199824 0.0034668659 0.003298885 0.010085733 + 1200 44522.927 0 0.0036503132 0.0037490684 0.0036089852 0.011008367 + 1300 45214.567 0 0.0039958617 0.0040881934 0.0038709079 0.011954963 + 1400 45217.997 0 0.004276499 0.0044624985 0.0041104891 0.012849487 + 1500 45497.171 0 0.0045943272 0.0047116875 0.0044113504 0.013717365 + 1600 45905.187 0 0.0049004996 0.0049982014 0.0047394999 0.014638201 + 1700 45551.346 0 0.0051540939 0.0053187249 0.0050861052 0.015558924 + 1800 45347.782 0 0.0054101891 0.0056306 0.0053515873 0.016392376 + 1900 45107.895 0 0.005743705 0.0059584896 0.0056220384 0.017324233 + 2000 45043.389 0 0.0059803588 0.006230449 0.005911555 0.018122363 + 2100 45433.293 0 0.0062610364 0.0066140744 0.0062152977 0.019090408 + 2200 45804.217 0 0.0064995183 0.0068831274 0.0064971789 0.019879825 + 2300 45697.516 0 0.0067910846 0.0071845673 0.0068046192 0.020780271 + 2400 45447.422 0 0.0071022706 0.0074743709 0.0070983185 0.02167496 + 2500 45395.18 0 0.0073817023 0.0077467991 0.0074263196 0.022554821 + 2600 45943.044 0 0.0075953233 0.007997707 0.0076508583 0.023243889 + 2700 45859.978 0 0.0079082128 0.0082090043 0.0078853376 0.024002555 + 2800 45822.007 0 0.0082607534 0.0084510061 0.0081985549 0.024910314 + 2900 45438.456 0 0.0085958203 0.0088807705 0.0084755353 0.025952126 + 3000 45060.957 0 0.0089017992 0.0090966159 0.0086718875 0.026670303 +Loop time of 1.23282 on 4 procs for 3000 steps with 4096 atoms + +Performance: 2102.502 tau/day, 2433.452 timesteps/s +97.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 8.5831e-06 | 8.5831e-06 | 8.5831e-06 | 0.0 | 0.00 +Comm | 0.10931 | 0.11473 | 0.11748 | 0.9 | 9.31 +Output | 0.001375 | 0.0018924 | 0.0034099 | 2.0 | 0.15 +Modify | 0.97744 | 0.99158 | 1.0089 | 1.3 | 80.43 +Other | | 0.1246 | | | 10.11 + +Nlocal: 1024.00 ave 1035 max 1016 min +Histogram: 2 0 0 0 0 0 1 0 0 1 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 1 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/examples/USER/brownian/point/in2d.point b/examples/USER/brownian/point/in2d.point new file mode 100644 index 0000000000..bf790f8fc2 --- /dev/null +++ b/examples/USER/brownian/point/in2d.point @@ -0,0 +1,43 @@ +##### dynamics of non-interacting point particles in 2D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 5.0 +variable gamma_t string 1.0 +variable params string ${rng}_${temp}_${gamma_t} + +units lj +atom_style atomic +dimension 2 +newton off + +lattice sq 0.4 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +create_atoms 1 box +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian ${temp} ${seed} rng ${rng} gamma_t ${gamma_t} + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type & +# x y z xu yu zu fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 diff --git a/examples/USER/brownian/point/in3d.point b/examples/USER/brownian/point/in3d.point new file mode 100644 index 0000000000..974f08866d --- /dev/null +++ b/examples/USER/brownian/point/in3d.point @@ -0,0 +1,44 @@ +##### overdamped dynamics of non-interacting point particles in 3D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 5.0 +variable gamma_t string 1.0 +variable params string ${rng}_${temp}_${gamma_t} + +units lj +atom_style atomic +dimension 3 +newton off + +lattice sc 0.4 +region box block -8 8 -8 8 -8 8 +create_box 1 box +create_atoms 1 box +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian ${temp} ${seed} rng ${rng} gamma_t ${gamma_t} + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type & +# x y z xu yu zu fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 + diff --git a/examples/USER/brownian/point/log.11May2021.in2d.point.g++.1 b/examples/USER/brownian/point/log.11May2021.in2d.point.g++.1 new file mode 100644 index 0000000000..b875ccedad --- /dev/null +++ b/examples/USER/brownian/point/log.11May2021.in2d.point.g++.1 @@ -0,0 +1,119 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### dynamics of non-interacting point particles in 2D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 5.0 +variable gamma_t string 1.0 +variable params string ${rng}_${temp}_${gamma_t} +variable params string gaussian_${temp}_${gamma_t} +variable params string gaussian_5.0_${gamma_t} +variable params string gaussian_5.0_1.0 + +units lj +atom_style atomic +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-47.434165 -47.434165 -0.31622777) to (47.434165 47.434165 0.31622777) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 3600 atoms + create_atoms CPU = 0.003 seconds +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian ${temp} ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t 1.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type # x y z xu yu zu fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.664 | 2.664 | 2.664 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 0.99972222 0 0 0 0 0 + 100 1022861.2 0 0.010252464 0.0095481044 0 0.019800568 + 200 986781.19 0 0.020552091 0.019485252 0 0.040037343 + 300 1030219 0 0.030642552 0.028377678 0 0.05902023 + 400 1003322.5 0 0.040610693 0.038179284 0 0.078789978 + 500 989343.12 0 0.049978908 0.047445856 0 0.097424764 + 600 1029781.3 0 0.059551719 0.057941149 0 0.11749287 + 700 999447.72 0 0.06979546 0.067552325 0 0.13734778 + 800 995373.97 0 0.080049251 0.078006344 0 0.1580556 + 900 1011991.4 0 0.089753134 0.087065214 0 0.17681835 + 1000 1006017.1 0 0.10041092 0.097934217 0 0.19834514 + 1100 997762.63 0 0.11229742 0.10841547 0 0.22071289 + 1200 1011707.8 0 0.12006388 0.1190115 0 0.23907538 + 1300 1012099.1 0 0.13097486 0.12996632 0 0.26094117 + 1400 997602.43 0 0.14345778 0.13830585 0 0.28176362 + 1500 1005358.1 0 0.15441686 0.14927539 0 0.30369225 + 1600 1007081.8 0 0.16496828 0.15936363 0 0.3243319 + 1700 990284.9 0 0.1747286 0.16818246 0 0.34291106 + 1800 969006.97 0 0.18228778 0.17972813 0 0.3620159 + 1900 998066.69 0 0.19338277 0.19226121 0 0.38564397 + 2000 972300.66 0 0.20352485 0.20145928 0 0.40498413 + 2100 985025.88 0 0.21283854 0.21090075 0 0.42373929 + 2200 1010964.6 0 0.22279055 0.22110734 0 0.44389789 + 2300 975819.44 0 0.23128131 0.23226488 0 0.46354619 + 2400 977043.53 0 0.24284105 0.24301689 0 0.48585794 + 2500 969708.21 0 0.25415238 0.25354284 0 0.50769522 + 2600 981969.5 0 0.26457173 0.26318018 0 0.52775192 + 2700 987261.1 0 0.27497004 0.27761213 0 0.55258218 + 2800 1005751.1 0 0.28530448 0.28715428 0 0.57245876 + 2900 975930.11 0 0.29394811 0.29896948 0 0.59291759 + 3000 997388.08 0 0.30674701 0.31193573 0 0.61868274 +Loop time of 1.501 on 1 procs for 3000 steps with 3600 atoms + +Performance: 1726.852 tau/day, 1998.672 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0.00059271 | 0.00059271 | 0.00059271 | 0.0 | 0.04 +Comm | 0.0055437 | 0.0055437 | 0.0055437 | 0.0 | 0.37 +Output | 0.0039999 | 0.0039999 | 0.0039999 | 0.0 | 0.27 +Modify | 1.3852 | 1.3852 | 1.3852 | 0.0 | 92.28 +Other | | 0.1057 | | | 7.04 + +Nlocal: 3600.00 ave 3600 max 3600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 21 +Dangerous builds = 0 + +Total wall time: 0:00:01 diff --git a/examples/USER/brownian/point/log.11May2021.in2d.point.g++.4 b/examples/USER/brownian/point/log.11May2021.in2d.point.g++.4 new file mode 100644 index 0000000000..d12d71118e --- /dev/null +++ b/examples/USER/brownian/point/log.11May2021.in2d.point.g++.4 @@ -0,0 +1,119 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### dynamics of non-interacting point particles in 2D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 5.0 +variable gamma_t string 1.0 +variable params string ${rng}_${temp}_${gamma_t} +variable params string gaussian_${temp}_${gamma_t} +variable params string gaussian_5.0_${gamma_t} +variable params string gaussian_5.0_1.0 + +units lj +atom_style atomic +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-47.434165 -47.434165 -0.31622777) to (47.434165 47.434165 0.31622777) + 2 by 2 by 1 MPI processor grid +create_atoms 1 box +Created 3600 atoms + create_atoms CPU = 0.001 seconds +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian ${temp} ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t 1.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type # x y z xu yu zu fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.664 | 2.664 | 2.664 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 0.99972222 0 0 0 0 0 + 100 1017972.1 0 0.010094052 0.0097502899 0 0.019844342 + 200 1004552.1 0 0.020125116 0.01957629 0 0.039701406 + 300 1017712.9 0 0.030271373 0.029411656 0 0.059683029 + 400 1016693.8 0 0.040610061 0.038605869 0 0.07921593 + 500 999527.84 0 0.049451389 0.049042225 0 0.098493614 + 600 961157.92 0 0.059691948 0.059033176 0 0.11872512 + 700 1006804.9 0 0.071205977 0.069972106 0 0.14117808 + 800 1007321.8 0 0.081136977 0.079825976 0 0.16096295 + 900 1002801.7 0 0.091236148 0.090833816 0 0.18206996 + 1000 1010134.7 0 0.10091362 0.10023906 0 0.20115269 + 1100 990246.55 0 0.1118367 0.11141049 0 0.22324719 + 1200 1010555.5 0 0.12091736 0.12355456 0 0.24447192 + 1300 997117.19 0 0.13099592 0.13292775 0 0.26392367 + 1400 1020817.1 0 0.14167961 0.14172898 0 0.28340859 + 1500 1015048.1 0 0.15225884 0.15162948 0 0.30388833 + 1600 990291.98 0 0.16460973 0.16251919 0 0.32712891 + 1700 980848.58 0 0.17380313 0.17351201 0 0.34731513 + 1800 1000673.8 0 0.18383991 0.18175453 0 0.36559445 + 1900 1009388.9 0 0.19411523 0.19367453 0 0.38778976 + 2000 1005935.9 0 0.2015342 0.20585359 0 0.40738779 + 2100 985500.56 0 0.21161056 0.21238463 0 0.42399519 + 2200 997241.34 0 0.21841986 0.22117922 0 0.43959908 + 2300 1011672.3 0 0.22688099 0.23155741 0 0.4584384 + 2400 989837.68 0 0.23849839 0.24219 0 0.48068839 + 2500 1035706.8 0 0.24541408 0.24947563 0 0.49488971 + 2600 992370.08 0 0.25537803 0.25758332 0 0.51296135 + 2700 990586.56 0 0.26542605 0.26762286 0 0.53304892 + 2800 1002767.3 0 0.27570392 0.27874972 0 0.55445363 + 2900 995307.27 0 0.28580946 0.29115624 0 0.5769657 + 3000 1024317.7 0 0.29493208 0.30208924 0 0.59702132 +Loop time of 0.413047 on 4 procs for 3000 steps with 3600 atoms + +Performance: 6275.312 tau/day, 7263.093 timesteps/s +98.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0.00016236 | 0.00016338 | 0.00016403 | 0.0 | 0.04 +Comm | 0.0026367 | 0.0030084 | 0.0031497 | 0.4 | 0.73 +Output | 0.0011849 | 0.0013574 | 0.0018065 | 0.7 | 0.33 +Modify | 0.34447 | 0.35223 | 0.36357 | 1.2 | 85.28 +Other | | 0.05629 | | | 13.63 + +Nlocal: 900.000 ave 906 max 891 min +Histogram: 1 0 0 0 0 0 1 0 1 1 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 22 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/brownian/point/log.11May2021.in3d.point.g++.1 b/examples/USER/brownian/point/log.11May2021.in3d.point.g++.1 new file mode 100644 index 0000000000..febb7657e7 --- /dev/null +++ b/examples/USER/brownian/point/log.11May2021.in3d.point.g++.1 @@ -0,0 +1,119 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of non-interacting point particles in 3D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 5.0 +variable gamma_t string 1.0 +variable params string ${rng}_${temp}_${gamma_t} +variable params string gaussian_${temp}_${gamma_t} +variable params string gaussian_5.0_${gamma_t} +variable params string gaussian_5.0_1.0 + +units lj +atom_style atomic +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.002 seconds +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian ${temp} ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t 1.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type # x y z xu yu zu fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.694 | 2.694 | 2.694 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 1.4996338 0 0 0 0 0 + 100 1500286.3 0 0.0098123603 0.010352169 0.010242435 0.030406964 + 200 1488308 0 0.019934427 0.019968198 0.020471735 0.06037436 + 300 1484472.4 0 0.029397156 0.030749312 0.030121294 0.090267762 + 400 1517938.7 0 0.039217504 0.041440617 0.040512943 0.12117106 + 500 1492769.5 0 0.04890343 0.051561801 0.050614941 0.15108017 + 600 1510159.6 0 0.059770181 0.061650364 0.061298117 0.18271866 + 700 1485424.1 0 0.070537955 0.071144877 0.071141546 0.21282438 + 800 1496377.2 0 0.081291995 0.082546059 0.080653381 0.24449144 + 900 1484409.1 0 0.090940427 0.093298981 0.091328056 0.27556746 + 1000 1503322.4 0 0.10176921 0.10246052 0.10151773 0.30574747 + 1100 1503322.4 0 0.11295993 0.11052632 0.11053406 0.33402031 + 1200 1489236.2 0 0.12509723 0.11961982 0.12146498 0.36618203 + 1300 1476050.3 0 0.13449034 0.12941323 0.1309765 0.39488007 + 1400 1520818.7 0 0.14613571 0.13788044 0.14083944 0.42485558 + 1500 1498936.4 0 0.15752286 0.15057712 0.15063399 0.45873397 + 1600 1507524.1 0 0.16793678 0.16095681 0.16063531 0.4895289 + 1700 1480581.2 0 0.17748019 0.172614 0.16922383 0.51931802 + 1800 1505353.6 0 0.18850931 0.18304171 0.18063119 0.55218221 + 1900 1491234.7 0 0.19836402 0.19306339 0.1929707 0.58439811 + 2000 1519868.8 0 0.20698191 0.20211344 0.20328302 0.61237838 + 2100 1493919.5 0 0.21453524 0.21186097 0.21423293 0.64062914 + 2200 1517098.6 0 0.2257338 0.22381647 0.22474081 0.67429108 + 2300 1481270.7 0 0.23499747 0.23348379 0.23498244 0.70346369 + 2400 1495445.1 0 0.24535894 0.24290239 0.24229161 0.73055293 + 2500 1522839.3 0 0.25695938 0.25109669 0.25214541 0.76020148 + 2600 1518697.4 0 0.26680819 0.26120216 0.2604112 0.78842155 + 2700 1529283.1 0 0.27524422 0.26942681 0.27148042 0.81615146 + 2800 1500557.5 0 0.28436226 0.27957592 0.27935619 0.84329437 + 2900 1509711.1 0 0.2948528 0.28562401 0.29055956 0.87103637 + 3000 1522712.8 0 0.30347033 0.2975063 0.30121685 0.90219348 +Loop time of 2.35056 on 1 procs for 3000 steps with 4096 atoms + +Performance: 1102.718 tau/day, 1276.293 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0.00077772 | 0.00077772 | 0.00077772 | 0.0 | 0.03 +Comm | 0.010985 | 0.010985 | 0.010985 | 0.0 | 0.47 +Output | 0.0045807 | 0.0045807 | 0.0045807 | 0.0 | 0.19 +Modify | 2.2116 | 2.2116 | 2.2116 | 0.0 | 94.09 +Other | | 0.1226 | | | 5.22 + +Nlocal: 4096.00 ave 4096 max 4096 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 24 +Dangerous builds = 0 + +Total wall time: 0:00:02 diff --git a/examples/USER/brownian/point/log.11May2021.in3d.point.g++.4 b/examples/USER/brownian/point/log.11May2021.in3d.point.g++.4 new file mode 100644 index 0000000000..6a41a12f0f --- /dev/null +++ b/examples/USER/brownian/point/log.11May2021.in3d.point.g++.4 @@ -0,0 +1,119 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of non-interacting point particles in 3D ##### + +variable rng string gaussian +variable seed string 198098 +variable temp string 5.0 +variable gamma_t string 1.0 +variable params string ${rng}_${temp}_${gamma_t} +variable params string gaussian_${temp}_${gamma_t} +variable params string gaussian_5.0_${gamma_t} +variable params string gaussian_5.0_1.0 + +units lj +atom_style atomic +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 2 by 1 by 2 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.001 seconds +mass * 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian ${temp} ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 ${seed} rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng ${rng} gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t ${gamma_t} +fix 1 all brownian 5.0 198098 rng gaussian gamma_t 1.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type # x y z xu yu zu fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 2.672 | 2.672 | 2.672 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 1.4996338 0 0 0 0 0 + 100 1515328.2 0 0.010465453 0.010044629 0.0097242319 0.030234314 + 200 1510820.8 0 0.020658886 0.019954762 0.020008864 0.060622512 + 300 1482006.5 0 0.030402195 0.029802874 0.030047586 0.090252655 + 400 1492228.5 0 0.039622543 0.038899144 0.040381854 0.11890354 + 500 1494985.5 0 0.050523465 0.050022913 0.050186478 0.15073286 + 600 1516047.4 0 0.061111845 0.061433818 0.059195364 0.18174103 + 700 1510021.8 0 0.071636778 0.072829755 0.06946406 0.21393059 + 800 1505964.7 0 0.08240965 0.08433785 0.078799851 0.24554735 + 900 1491035.9 0 0.093659937 0.094517749 0.08812559 0.27630328 + 1000 1516599.6 0 0.10436496 0.10431759 0.097480868 0.30616342 + 1100 1495170.3 0 0.11468757 0.111397 0.1069763 0.33306087 + 1200 1500630.6 0 0.12360977 0.12264534 0.11583999 0.3620951 + 1300 1474889.5 0 0.13432447 0.13471694 0.12702491 0.39606632 + 1400 1487145.8 0 0.14573239 0.14431493 0.13669403 0.42674135 + 1500 1519496.7 0 0.15610742 0.15505416 0.14600182 0.4571634 + 1600 1525674.1 0 0.16728653 0.1649354 0.15562133 0.48784325 + 1700 1540725.4 0 0.17846447 0.17666562 0.16531781 0.52044791 + 1800 1512334.8 0 0.18872753 0.18538847 0.17450009 0.54861609 + 1900 1498371.4 0 0.19688928 0.19333299 0.18581712 0.5760394 + 2000 1546459.4 0 0.20955053 0.20243854 0.19613897 0.60812803 + 2100 1509712.9 0 0.21922567 0.20940597 0.20567239 0.63430404 + 2200 1509630.4 0 0.23067999 0.21856734 0.21619911 0.66544645 + 2300 1483929.1 0 0.24160803 0.231048 0.22617193 0.69882797 + 2400 1488492.1 0 0.25399491 0.24082678 0.23972356 0.73454526 + 2500 1508107.9 0 0.26608734 0.25316913 0.2486814 0.76793787 + 2600 1511952.1 0 0.27523956 0.2623673 0.25706539 0.79467225 + 2700 1488888.8 0 0.28518299 0.27425585 0.26728622 0.82672506 + 2800 1515428.4 0 0.29595429 0.28589969 0.27781327 0.85966725 + 2900 1504312.1 0 0.30393798 0.29533034 0.28725362 0.88652194 + 3000 1521521.3 0 0.31445132 0.30117607 0.29959324 0.91522062 +Loop time of 0.708196 on 4 procs for 3000 steps with 4096 atoms + +Performance: 3660.004 tau/day, 4236.115 timesteps/s +97.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0.00020647 | 0.00021023 | 0.0002141 | 0.0 | 0.03 +Comm | 0.0045607 | 0.0050649 | 0.0053098 | 0.4 | 0.72 +Output | 0.0013759 | 0.002265 | 0.0037355 | 1.9 | 0.32 +Modify | 0.57353 | 0.58931 | 0.6109 | 1.8 | 83.21 +Other | | 0.1113 | | | 15.72 + +Nlocal: 1024.00 ave 1043 max 1001 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 25 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/USER/brownian/sphere/in2d.sphere b/examples/USER/brownian/sphere/in2d.sphere new file mode 100644 index 0000000000..a194f967cc --- /dev/null +++ b/examples/USER/brownian/sphere/in2d.sphere @@ -0,0 +1,45 @@ +##### overdamped dynamics of a sphere (with dipole attached to it) in 2D ##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_t string 5.0 +variable gamma_r string 0.7 +variable params string ${rng}_${temp}_${gamma_r}_${gamma_t} + +units lj +atom_style hybrid dipole sphere +dimension 2 +newton off + +lattice sq 0.4 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +create_atoms 1 box +mass * 1.0 +set type * dipole/random ${seed} 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/sphere ${temp} ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type & +# x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 diff --git a/examples/USER/brownian/sphere/in3d.sphere b/examples/USER/brownian/sphere/in3d.sphere new file mode 100644 index 0000000000..d3264ee450 --- /dev/null +++ b/examples/USER/brownian/sphere/in3d.sphere @@ -0,0 +1,45 @@ +##### overdamped dynamics of a sphere (with dipole attached to it) in 3D##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_t string 5.0 +variable gamma_r string 0.7 +variable params string ${rng}_${temp}_${gamma_r}_${gamma_t} + +units lj +atom_style hybrid dipole sphere +dimension 3 +newton off + +lattice sc 0.4 +region box block -8 8 -8 8 -8 8 +create_box 1 box +create_atoms 1 box +mass * 1.0 +set type * dipole/random ${seed} 1.0 +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/sphere ${temp} ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type & +# x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 diff --git a/examples/USER/brownian/sphere/log.11May2021.in2d.sphere.g++.1 b/examples/USER/brownian/sphere/log.11May2021.in2d.sphere.g++.1 new file mode 100644 index 0000000000..917f2b63fb --- /dev/null +++ b/examples/USER/brownian/sphere/log.11May2021.in2d.sphere.g++.1 @@ -0,0 +1,126 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of a sphere (with dipole attached to it) in 2D ##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_t string 5.0 +variable gamma_r string 0.7 +variable params string ${rng}_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_1.0_${gamma_r}_${gamma_t} +variable params string uniform_1.0_0.7_${gamma_t} +variable params string uniform_1.0_0.7_5.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-47.434165 -47.434165 -0.31622777) to (47.434165 47.434165 0.31622777) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 3600 atoms + create_atoms CPU = 0.005 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 3600 settings made for dipole/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/sphere ${temp} ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t 5.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.664 | 4.664 | 4.664 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 0.99972222 0 0 0 0 0 + 100 20867.136 0 0.00040006704 0.00039570887 0 0.00079577592 + 200 20835.491 0 0.00077560901 0.00080455484 0 0.0015801638 + 300 20813.122 0 0.0011737739 0.0012172689 0 0.0023910428 + 400 21137.397 0 0.0015587675 0.0016096093 0 0.0031683768 + 500 21167.188 0 0.0019294105 0.0020251322 0 0.0039545428 + 600 21345.908 0 0.0023105313 0.0024111742 0 0.0047217054 + 700 21086.272 0 0.0027236116 0.0027846006 0 0.0055082122 + 800 20840.906 0 0.0031505299 0.0031810732 0 0.0063316031 + 900 20916.456 0 0.0035525852 0.0035981301 0 0.0071507153 + 1000 20752.249 0 0.0039147929 0.0039791172 0 0.0078939101 + 1100 20643.612 0 0.0042977921 0.0043701484 0 0.0086679405 + 1200 21085.63 0 0.0045584242 0.0047475091 0 0.0093059332 + 1300 20900.794 0 0.0049718803 0.0051481706 0 0.010120051 + 1400 20980.731 0 0.0054234603 0.0054230724 0 0.010846533 + 1500 20916.308 0 0.0058502946 0.0058114313 0 0.011661726 + 1600 20949.786 0 0.0062258463 0.006208129 0 0.012433975 + 1700 20531.205 0 0.0066276219 0.006595921 0 0.013223543 + 1800 21418.472 0 0.0070077409 0.007030461 0 0.014038202 + 1900 21291.928 0 0.0074052208 0.0074333041 0 0.014838525 + 2000 20893.895 0 0.0077407477 0.007901402 0 0.01564215 + 2100 21218.001 0 0.0080384756 0.0082611258 0 0.016299601 + 2200 21116.189 0 0.0084325164 0.008617977 0 0.017050493 + 2300 20718.83 0 0.0089455345 0.0091768161 0 0.018122351 + 2400 20719.164 0 0.0093666455 0.0095272546 0 0.0188939 + 2500 20991.382 0 0.009706795 0.0098256506 0 0.019532446 + 2600 20515.74 0 0.0099247069 0.010329841 0 0.020254548 + 2700 21001.55 0 0.010448354 0.010693502 0 0.021141855 + 2800 21363.824 0 0.010990971 0.011142092 0 0.022133063 + 2900 20497.025 0 0.011399704 0.011504868 0 0.022904573 + 3000 20726.572 0 0.011785354 0.01187482 0 0.023660175 +Loop time of 1.76023 on 1 procs for 3000 steps with 3600 atoms + +Performance: 1472.538 tau/day, 1704.326 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.026518 | 0.026518 | 0.026518 | 0.0 | 1.51 +Output | 0.0040107 | 0.0040107 | 0.0040107 | 0.0 | 0.23 +Modify | 1.6194 | 1.6194 | 1.6194 | 0.0 | 92.00 +Other | | 0.1103 | | | 6.27 + +Nlocal: 3600.00 ave 3600 max 3600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 121.000 ave 121 max 121 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/examples/USER/brownian/sphere/log.11May2021.in2d.sphere.g++.4 b/examples/USER/brownian/sphere/log.11May2021.in2d.sphere.g++.4 new file mode 100644 index 0000000000..95602a809c --- /dev/null +++ b/examples/USER/brownian/sphere/log.11May2021.in2d.sphere.g++.4 @@ -0,0 +1,126 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of a sphere (with dipole attached to it) in 2D ##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_t string 5.0 +variable gamma_r string 0.7 +variable params string ${rng}_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_1.0_${gamma_r}_${gamma_t} +variable params string uniform_1.0_0.7_${gamma_t} +variable params string uniform_1.0_0.7_5.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -30 30 -30 30 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-47.434165 -47.434165 -0.31622777) to (47.434165 47.434165 0.31622777) + 2 by 2 by 1 MPI processor grid +create_atoms 1 box +Created 3600 atoms + create_atoms CPU = 0.002 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 3600 settings made for dipole/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/sphere ${temp} ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t 5.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_2d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.664 | 4.664 | 4.664 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 0.99972222 0 0 0 0 0 + 100 21085.797 0 0.00042014118 0.00040399828 0 0.00082413946 + 200 20598.717 0 0.00081715618 0.00082613236 0 0.0016432885 + 300 21040.226 0 0.0012412527 0.0012520475 0 0.0024933002 + 400 21289.734 0 0.0016129899 0.001634482 0 0.003247472 + 500 20951.595 0 0.0020104279 0.0020197694 0 0.0040301973 + 600 20984.974 0 0.0023965593 0.0024277086 0 0.0048242679 + 700 21252.602 0 0.0028349303 0.0028407812 0 0.0056757114 + 800 20951.95 0 0.0032674595 0.0032573476 0 0.0065248071 + 900 20828.611 0 0.003647953 0.0036650963 0 0.0073130493 + 1000 21073.256 0 0.0040238604 0.0040103537 0 0.0080342142 + 1100 21104.396 0 0.0043694059 0.0044146515 0 0.0087840574 + 1200 20580.591 0 0.0047638237 0.0047646659 0 0.0095284896 + 1300 20667.623 0 0.0051512568 0.0051134445 0 0.010264701 + 1400 20466.72 0 0.0055921578 0.005517863 0 0.011110021 + 1500 20842.366 0 0.0059747304 0.0059374031 0 0.011912134 + 1600 20867.02 0 0.0065493697 0.0064163066 0 0.012965676 + 1700 21021.077 0 0.0070208005 0.0068164842 0 0.013837285 + 1800 21191.183 0 0.0073708939 0.0073226521 0 0.014693546 + 1900 20792.8 0 0.0076984189 0.0077400043 0 0.015438423 + 2000 21296.326 0 0.0081882545 0.0081503672 0 0.016338622 + 2100 21085.097 0 0.008596146 0.0086041272 0 0.017200273 + 2200 20506.523 0 0.0089905439 0.0091045462 0 0.01809509 + 2300 21068.555 0 0.0094163509 0.0094703314 0 0.018886682 + 2400 21128.867 0 0.0097349212 0.0098535832 0 0.019588504 + 2500 21009.514 0 0.010218059 0.010244621 0 0.020462679 + 2600 21177.52 0 0.01060437 0.010642719 0 0.021247089 + 2700 20832.56 0 0.011052623 0.011078899 0 0.022131522 + 2800 21298.053 0 0.011439708 0.011587702 0 0.023027411 + 2900 21002.28 0 0.011863624 0.01199682 0 0.023860443 + 3000 20737.939 0 0.012229608 0.012324579 0 0.024554186 +Loop time of 0.492798 on 4 procs for 3000 steps with 3600 atoms + +Performance: 5259.763 tau/day, 6087.689 timesteps/s +96.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.018005 | 0.021524 | 0.025207 | 2.2 | 4.37 +Output | 0.0013187 | 0.0018334 | 0.0032332 | 1.9 | 0.37 +Modify | 0.37545 | 0.38775 | 0.40664 | 1.9 | 78.68 +Other | | 0.08169 | | | 16.58 + +Nlocal: 900.000 ave 900 max 900 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 61.0000 ave 61 max 61 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/USER/brownian/sphere/log.11May2021.in3d.sphere.g++.1 b/examples/USER/brownian/sphere/log.11May2021.in3d.sphere.g++.1 new file mode 100644 index 0000000000..20048f96f1 --- /dev/null +++ b/examples/USER/brownian/sphere/log.11May2021.in3d.sphere.g++.1 @@ -0,0 +1,126 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of a sphere (with dipole attached to it) in 3D##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_t string 5.0 +variable gamma_r string 0.7 +variable params string ${rng}_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_1.0_${gamma_r}_${gamma_t} +variable params string uniform_1.0_0.7_${gamma_t} +variable params string uniform_1.0_0.7_5.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.005 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 4096 settings made for dipole/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/sphere ${temp} ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t 5.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.737 | 4.737 | 4.737 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 1.4996338 0 0 0 0 0 + 100 32032.279 0 0.00040227568 0.00039159837 0.00040147813 0.0011953522 + 200 31673.093 0 0.00077657885 0.00077292327 0.00079963705 0.0023491392 + 300 31476.164 0 0.0011712083 0.0011606723 0.0012089537 0.0035408343 + 400 31911.374 0 0.0015803424 0.001562091 0.0016042321 0.0047466655 + 500 31182.011 0 0.0019677217 0.0019269105 0.0020015977 0.0058962298 + 600 31206.05 0 0.0023360975 0.0023134398 0.0024213372 0.0070708745 + 700 31278.057 0 0.0026966955 0.0027129858 0.0028721373 0.0082818187 + 800 31677.724 0 0.0031197964 0.003134834 0.0032726303 0.0095272607 + 900 31312.741 0 0.0035636612 0.0035573653 0.0037328373 0.010853864 + 1000 31426.075 0 0.0039774626 0.003952159 0.0041879386 0.01211756 + 1100 31361.699 0 0.0044256852 0.004320566 0.004638132 0.013384383 + 1200 31559.778 0 0.0048338539 0.0047210601 0.0050296056 0.01458452 + 1300 31716.797 0 0.0052239651 0.0050796723 0.0054794684 0.015783106 + 1400 31231.077 0 0.0055890568 0.005472377 0.0059264123 0.016987846 + 1500 31605.513 0 0.0059876582 0.0058974054 0.0063452478 0.018230311 + 1600 31551.402 0 0.006413094 0.0062665632 0.0067442106 0.019423868 + 1700 31725.868 0 0.0068244611 0.0067189707 0.0071424779 0.02068591 + 1800 31385.794 0 0.0071570297 0.0070502303 0.0075240296 0.02173129 + 1900 31754.094 0 0.0075638662 0.0074243015 0.0079935325 0.0229817 + 2000 31668.959 0 0.0080059944 0.0079019753 0.0084000614 0.024308031 + 2100 31781.994 0 0.0084108141 0.0082719077 0.0088004977 0.02548322 + 2200 31455.021 0 0.0088844434 0.0086931769 0.0091916929 0.026769313 + 2300 31273.079 0 0.0093155639 0.0091027782 0.0095364621 0.027954804 + 2400 31283.781 0 0.0098441686 0.0094496218 0.0099279073 0.029221698 + 2500 31758.315 0 0.010372129 0.0097843406 0.010334653 0.030491123 + 2600 31780.442 0 0.010770862 0.010313119 0.010637545 0.031721525 + 2700 31552.277 0 0.011268703 0.010693437 0.01110762 0.033069759 + 2800 31124.693 0 0.011661333 0.011100115 0.011480624 0.034242072 + 2900 31438.795 0 0.012068847 0.011346633 0.011842006 0.035257486 + 3000 31574.258 0 0.012482632 0.011691477 0.012210207 0.036384317 +Loop time of 2.8531 on 1 procs for 3000 steps with 4096 atoms + +Performance: 908.486 tau/day, 1051.488 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 3.2425e-05 | 3.2425e-05 | 3.2425e-05 | 0.0 | 0.00 +Comm | 0.13219 | 0.13219 | 0.13219 | 0.0 | 4.63 +Output | 0.0045686 | 0.0045686 | 0.0045686 | 0.0 | 0.16 +Modify | 2.5857 | 2.5857 | 2.5857 | 0.0 | 90.63 +Other | | 0.1307 | | | 4.58 + +Nlocal: 4096.00 ave 4096 max 4096 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 1 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/USER/brownian/sphere/log.11May2021.in3d.sphere.g++.4 b/examples/USER/brownian/sphere/log.11May2021.in3d.sphere.g++.4 new file mode 100644 index 0000000000..57dc6d5f11 --- /dev/null +++ b/examples/USER/brownian/sphere/log.11May2021.in3d.sphere.g++.4 @@ -0,0 +1,126 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +##### overdamped dynamics of a sphere (with dipole attached to it) in 3D##### + +variable rng string uniform +variable seed string 198098 +variable temp string 1.0 +variable gamma_t string 5.0 +variable gamma_r string 0.7 +variable params string ${rng}_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_${temp}_${gamma_r}_${gamma_t} +variable params string uniform_1.0_${gamma_r}_${gamma_t} +variable params string uniform_1.0_0.7_${gamma_t} +variable params string uniform_1.0_0.7_5.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 2 by 1 by 2 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.006 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 198098 1.0 +Setting atom values ... + 4096 settings made for dipole/random +velocity all create 1.0 1 loop geom + +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +pair_style none + +fix 1 all brownian/sphere ${temp} ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 ${seed} rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng ${rng} gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r ${gamma_r} gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t ${gamma_t} +fix 1 all brownian/sphere 1.0 198098 rng uniform gamma_r 0.7 gamma_t 5.0 + +#initialisation for the main run + +# MSD +compute msd all msd + +thermo_style custom step ke pe c_msd[*] + +#dump 1 all custom 1000 dump_${params}_3d.lammpstrj id type # x y z xu yu zu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +timestep 0.00001 +thermo 100 + +# main run +run 3000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.694 | 4.694 | 4.694 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] + 0 1.4996338 0 0 0 0 0 + 100 30882.707 0 0.00040787161 0.00039391576 0.00040796913 0.0012097565 + 200 31370.751 0 0.00081742036 0.00078240455 0.0008195167 0.0024193416 + 300 31469.51 0 0.0012118299 0.0011819412 0.0012477119 0.003641483 + 400 31696.58 0 0.0015540547 0.0015849689 0.0015836091 0.0047226327 + 500 31488.269 0 0.0019638041 0.0019659637 0.0020547832 0.005984551 + 600 30942.589 0 0.0023273784 0.0023572171 0.0024715245 0.00715612 + 700 31228.473 0 0.0027821732 0.002735338 0.0028734675 0.0083909787 + 800 31426.92 0 0.0031663838 0.0031092782 0.0033231014 0.0095987634 + 900 31447.595 0 0.003539588 0.003564381 0.003753036 0.010857005 + 1000 31363.911 0 0.0039854308 0.003937555 0.0041203919 0.012043378 + 1100 31522.958 0 0.0043009285 0.0043676491 0.0044799414 0.013148519 + 1200 31403.033 0 0.0046361199 0.0047513598 0.0049014974 0.014288977 + 1300 31752.182 0 0.0049824718 0.0051327113 0.0053130614 0.015428244 + 1400 31336.955 0 0.0054251445 0.0055442325 0.0057472998 0.016716677 + 1500 31224.306 0 0.0059295596 0.0059920697 0.0061375228 0.018059152 + 1600 31744.535 0 0.0063845142 0.0063600989 0.0064833215 0.019227935 + 1700 31472.081 0 0.0068360092 0.0067985824 0.0069464303 0.020581022 + 1800 31577.334 0 0.0073001079 0.0071355564 0.0073400543 0.021775719 + 1900 31521.234 0 0.0077178677 0.0074371106 0.007708008 0.022862986 + 2000 31045.148 0 0.0080515968 0.0078583776 0.0081000219 0.024009996 + 2100 31289.809 0 0.0084280175 0.0082322226 0.0084475904 0.02510783 + 2200 31505.455 0 0.008802925 0.0085708943 0.0087648194 0.026138639 + 2300 31882.722 0 0.0092223105 0.0089242925 0.0092643028 0.027410906 + 2400 31028.15 0 0.0095737559 0.0093585981 0.0096771837 0.028609538 + 2500 31581.041 0 0.0099316284 0.009785264 0.010100235 0.029817127 + 2600 31272.119 0 0.010332986 0.01007291 0.010474606 0.030880502 + 2700 31537.8 0 0.010751592 0.010565273 0.01093107 0.032247935 + 2800 31060.697 0 0.011156729 0.011010751 0.011260025 0.033427506 + 2900 31541.612 0 0.011542003 0.011499419 0.011642873 0.034684295 + 3000 31305.382 0 0.011876832 0.011866445 0.012052577 0.035795854 +Loop time of 1.00142 on 4 procs for 3000 steps with 4096 atoms + +Performance: 2588.329 tau/day, 2995.751 timesteps/s +95.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.084416 | 0.10685 | 0.12695 | 5.7 | 10.67 +Output | 0.001471 | 0.0019466 | 0.0033245 | 1.8 | 0.19 +Modify | 0.66585 | 0.70645 | 0.78995 | 6.0 | 70.54 +Other | | 0.1862 | | | 18.59 + +Nlocal: 1024.00 ave 1024 max 1024 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 353.000 ave 353 max 353 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/examples/USER/brownian/spherical_ABP/in2d.abp b/examples/USER/brownian/spherical_ABP/in2d.abp new file mode 100644 index 0000000000..bd7dce13b6 --- /dev/null +++ b/examples/USER/brownian/spherical_ABP/in2d.abp @@ -0,0 +1,60 @@ +# 2D overdamped active brownian particle dynamics (ABP) +# with WCA potential + +variable gamma_t string 1.0 +variable gamma_r string 1.0 +variable temp string 1.0 +variable seed equal 1974019 +variable fp string 4.0 +variable params string ${temp}_${gamma_t}_${gamma_r}_${fp} + +units lj +atom_style hybrid dipole sphere +dimension 2 +newton off + +lattice sq 0.4 +region box block -16 16 -16 16 -0.2 0.2 +create_box 1 box +create_atoms 1 box +mass * 1.0 +set type * dipole/random ${seed} 1.0 +velocity all create 1.0 1 loop geom + +# more careful with neighbors since higher diffusion in abps +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +# WCA potential (purely repulsive) +pair_style lj/cut 2.5 +pair_coeff * * 1.0 1.0 1.1224 +pair_modify shift yes + +# overdamped brownian dynamics time-step +fix step all brownian/sphere ${temp} ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +# self-propulsion force along the dipole direction +fix activity all propel/self dipole ${fp} +fix 2 all enforce2d + +compute press all pressure NULL virial + +thermo_style custom step pe ke c_press + +#equilibration +timestep 0.0000000001 +thermo 100 +run 5000 +reset_timestep 0 + + +# MSD +compute msd all msd + +thermo_style custom step temp epair c_msd[*] c_press + + +timestep 0.00001 +thermo 1000 + +# main run +run 20000 diff --git a/examples/USER/brownian/spherical_ABP/in3d.ideal_abp b/examples/USER/brownian/spherical_ABP/in3d.ideal_abp new file mode 100644 index 0000000000..6a6575b510 --- /dev/null +++ b/examples/USER/brownian/spherical_ABP/in3d.ideal_abp @@ -0,0 +1,67 @@ +# 3D overdamped active brownian dynamics with no interactions + +variable gamma_t string 3.0 +variable gamma_r string 1.0 +variable temp string 1.0 +variable seed equal 1974019 +variable fp string 4.0 +variable params string ${temp}_${gamma_t}_${gamma_r}_${fp} + +units lj +atom_style hybrid dipole sphere +dimension 3 +newton off + +lattice sc 0.4 +region box block -8 8 -8 8 -8 8 +create_box 1 box +create_atoms 1 box +mass * 1.0 +set type * dipole/random ${seed} 1.0 +velocity all create 1.0 1 loop geom + +pair_style none + +# overdamped brownian dynamics time-step +fix step all brownian/sphere ${temp} ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +# self-propulsion force along the dipole direction +fix activity all propel/self dipole ${fp} + +compute press all pressure NULL virial + +thermo_style custom step ke pe c_press + +#equilibration +timestep 0.0000000001 +thermo 100 +run 5000 +reset_timestep 0 + +# MSD to demonstrate expected diffusive behaviour for ideal active +# brownian motion, which is +# +# MSD = (2*d*kb*T/gamma_t + 2*fp**2*gamma_r/(kb*T*gamma_t**2*(d-1)))*t +# + 2*fp**2*gamma_r**2/(gamma_t**2*(d-1)**2*(kb*T)**2)*(e^(-(d-1)*t*kb*T/gamma_r)-1) +# +# with d being simulation dimension +compute msd all msd + +thermo_style custom step ke pe c_msd[*] c_press + + +timestep 0.00001 +thermo 1000 + +# main run +run 12000 + +# if you want to check that rotational diffusion is behaving as expected, +# uncomment next three lines for dump output and then plot , +# which should decay exponentially with timescale (d-1)*D_r (with d +# being simulation dimension) + +#dump 1 all custom 2000 dump_ideal_${params}_3d.lammpstrj id type & +# x y xu yu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +#run 120000 diff --git a/examples/USER/brownian/spherical_ABP/log.11May2021.in2d.apb.g++.1 b/examples/USER/brownian/spherical_ABP/log.11May2021.in2d.apb.g++.1 new file mode 100644 index 0000000000..452d8a3d52 --- /dev/null +++ b/examples/USER/brownian/spherical_ABP/log.11May2021.in2d.apb.g++.1 @@ -0,0 +1,221 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +# 2D overdamped active brownian particle dynamics (ABP) +# with WCA potential + +variable gamma_t string 1.0 +variable gamma_r string 1.0 +variable temp string 1.0 +variable seed equal 1974019 +variable fp string 4.0 +variable params string ${temp}_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_1.0_${gamma_r}_${fp} +variable params string 1.0_1.0_1.0_${fp} +variable params string 1.0_1.0_1.0_4.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -16 16 -16 16 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-25.298221 -25.298221 -0.31622777) to (25.298221 25.298221 0.31622777) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 1024 atoms + create_atoms CPU = 0.002 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 1974019 1.0 +Setting atom values ... + 1024 settings made for dipole/random +velocity all create 1.0 1 loop geom + +# more careful with neighbors since higher diffusion in abps +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +# WCA potential (purely repulsive) +pair_style lj/cut 2.5 +pair_coeff * * 1.0 1.0 1.1224 +pair_modify shift yes + +# overdamped brownian dynamics time-step +fix step all brownian/sphere ${temp} ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 1.0 gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 1.0 gamma_r 1.0 +# self-propulsion force along the dipole direction +fix activity all propel/self dipole ${fp} +fix activity all propel/self dipole 4.0 +fix 2 all enforce2d + +compute press all pressure NULL virial + +thermo_style custom step pe ke c_press + +#equilibration +timestep 0.0000000001 +thermo 100 +run 5000 +Neighbor list info ... + update every 1 steps, delay 1 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.1224 + ghost atom cutoff = 2.1224 + binsize = 1.0612, bins = 48 48 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton off + pair build: half/bin/newtoff + stencil: half/bin/2d/newtoff + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.066 | 5.066 | 5.066 Mbytes +Step PotEng KinEng c_press + 0 0 0.99902344 -0.53979198 + 100 0 1.026585e+10 -0.5398101 + 200 0 1.0630628e+10 -0.53977393 + 300 0 1.03483e+10 -0.53977041 + 400 0 1.049279e+10 -0.53974314 + 500 0 1.0832067e+10 -0.53979451 + 600 0 1.0403632e+10 -0.53976233 + 700 0 1.0334726e+10 -0.53976174 + 800 0 1.0119596e+10 -0.53969338 + 900 0 1.0786136e+10 -0.53970415 + 1000 0 1.0539036e+10 -0.53974577 + 1100 0 1.0643695e+10 -0.53982431 + 1200 0 1.0234642e+10 -0.53976823 + 1300 0 1.036268e+10 -0.53981454 + 1400 0 1.0605702e+10 -0.53988117 + 1500 0 1.0517916e+10 -0.53989207 + 1600 0 1.0564482e+10 -0.53993016 + 1700 0 1.0460152e+10 -0.53984454 + 1800 0 1.0468566e+10 -0.53985574 + 1900 0 1.0474075e+10 -0.53985439 + 2000 0 1.0683568e+10 -0.53987349 + 2100 0 1.0269077e+10 -0.53990709 + 2200 0 1.0386943e+10 -0.53990068 + 2300 0 1.0406078e+10 -0.53978402 + 2400 0 1.0482072e+10 -0.53980757 + 2500 0 1.0442975e+10 -0.53982657 + 2600 0 1.0292103e+10 -0.53985533 + 2700 0 1.1106453e+10 -0.53991861 + 2800 0 1.0395289e+10 -0.53990138 + 2900 0 1.034021e+10 -0.53992375 + 3000 0 1.0434718e+10 -0.53995566 + 3100 0 1.0194094e+10 -0.53993997 + 3200 0 1.0411552e+10 -0.54000097 + 3300 0 1.0214175e+10 -0.53999884 + 3400 0 1.0434719e+10 -0.54000005 + 3500 0 1.0529638e+10 -0.53998281 + 3600 0 1.0406541e+10 -0.54000141 + 3700 0 1.0577151e+10 -0.54002354 + 3800 0 1.0488249e+10 -0.53996003 + 3900 0 1.0316153e+10 -0.54002024 + 4000 0 1.0491289e+10 -0.5400259 + 4100 0 1.0587981e+10 -0.5399811 + 4200 0 1.0332035e+10 -0.53997951 + 4300 0 1.0776469e+10 -0.53994151 + 4400 0 1.0982142e+10 -0.53983842 + 4500 0 1.0796919e+10 -0.5398414 + 4600 0 1.0324249e+10 -0.53979712 + 4700 0 1.0420899e+10 -0.53981967 + 4800 0 1.0274188e+10 -0.53976759 + 4900 0 1.0411535e+10 -0.5397757 + 5000 0 1.0399215e+10 -0.53980199 +Loop time of 1.34285 on 1 procs for 5000 steps with 1024 atoms + +Performance: 0.032 tau/day, 3723.422 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.25309 | 0.25309 | 0.25309 | 0.0 | 18.85 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.068734 | 0.068734 | 0.068734 | 0.0 | 5.12 +Output | 0.0012887 | 0.0012887 | 0.0012887 | 0.0 | 0.10 +Modify | 0.96552 | 0.96552 | 0.96552 | 0.0 | 71.90 +Other | | 0.05422 | | | 4.04 + +Nlocal: 1024.00 ave 1024 max 1024 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 201.000 ave 201 max 201 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 2112.00 ave 2112 max 2112 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2112 +Ave neighs/atom = 2.0625000 +Neighbor list builds = 0 +Dangerous builds = 0 +reset_timestep 0 + + +# MSD +compute msd all msd + +thermo_style custom step temp epair c_msd[*] c_press + + +timestep 0.00001 +thermo 1000 + +# main run +run 20000 +Per MPI rank memory allocation (min/avg/max) = 5.441 | 5.441 | 5.441 Mbytes +Step Temp E_pair c_msd[1] c_msd[2] c_msd[3] c_msd[4] c_press + 0 1.0409381e+10 0 0 0 0 0 -0.53980199 + 1000 107022.73 0.0080050427 0.020451432 0.021388798 0 0.04184023 -0.54900967 + 2000 107475.82 0.017262846 0.040669645 0.044251149 0 0.084920794 -0.42740968 + 3000 105388.35 0.042257875 0.062828995 0.05845782 0 0.12128682 -0.31792184 + 4000 106238.38 0.052733384 0.079036841 0.079396453 0 0.15843329 -0.24243699 + 5000 102904.54 0.088524456 0.095977642 0.099533961 0 0.1955116 -0.093468615 + 6000 105274.15 0.065334999 0.11591691 0.11675531 0 0.23267222 -0.21904478 + 7000 108903.41 0.06724271 0.13694218 0.13914947 0 0.27609164 -0.15913012 + 8000 101451.44 0.097201152 0.15704893 0.16178845 0 0.31883738 -0.055786965 + 9000 106808.72 0.084301668 0.18029391 0.175753 0 0.3560469 0.014898739 + 10000 107381.19 0.088583354 0.2000753 0.19569789 0 0.39577319 0.19417596 + 11000 102105.78 0.081066654 0.22042599 0.21914042 0 0.43956641 0.060574143 + 12000 105384.94 0.098716908 0.24382064 0.24673594 0 0.49055657 0.17067875 + 13000 107479.53 0.099989043 0.26942088 0.27207566 0 0.54149654 0.25514896 + 14000 102938.12 0.093252916 0.28529564 0.28698837 0 0.57228401 0.19976355 + 15000 104408.02 0.11900926 0.31291315 0.31195058 0 0.62486373 0.36956014 + 16000 103447.68 0.09627777 0.34145225 0.33159885 0 0.6730511 0.29857404 + 17000 108400.05 0.11433561 0.36561966 0.36068301 0 0.72630267 0.41922801 + 18000 103363.68 0.11040153 0.38709746 0.39228677 0 0.77938423 0.38111686 + 19000 103310.43 0.10660536 0.41406235 0.40975085 0 0.8238132 0.36022184 + 20000 102692.1 0.13517651 0.43870812 0.44138776 0 0.88009588 0.51144366 +Loop time of 5.66207 on 1 procs for 20000 steps with 1024 atoms + +Performance: 3051.889 tau/day, 3532.279 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.3123 | 1.3123 | 1.3123 | 0.0 | 23.18 +Neigh | 0.011856 | 0.011856 | 0.011856 | 0.0 | 0.21 +Comm | 0.2747 | 0.2747 | 0.2747 | 0.0 | 4.85 +Output | 0.0011516 | 0.0011516 | 0.0011516 | 0.0 | 0.02 +Modify | 3.8451 | 3.8451 | 3.8451 | 0.0 | 67.91 +Other | | 0.2169 | | | 3.83 + +Nlocal: 1024.00 ave 1024 max 1024 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 184.000 ave 184 max 184 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 2558.00 ave 2558 max 2558 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2558 +Ave neighs/atom = 2.4980469 +Neighbor list builds = 23 +Dangerous builds = 0 +Total wall time: 0:00:07 diff --git a/examples/USER/brownian/spherical_ABP/log.11May2021.in2d.apb.g++.4 b/examples/USER/brownian/spherical_ABP/log.11May2021.in2d.apb.g++.4 new file mode 100644 index 0000000000..aa902fbe80 --- /dev/null +++ b/examples/USER/brownian/spherical_ABP/log.11May2021.in2d.apb.g++.4 @@ -0,0 +1,221 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +# 2D overdamped active brownian particle dynamics (ABP) +# with WCA potential + +variable gamma_t string 1.0 +variable gamma_r string 1.0 +variable temp string 1.0 +variable seed equal 1974019 +variable fp string 4.0 +variable params string ${temp}_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_1.0_${gamma_r}_${fp} +variable params string 1.0_1.0_1.0_${fp} +variable params string 1.0_1.0_1.0_4.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 2 +newton off + +lattice sq 0.4 +Lattice spacing in x,y,z = 1.5811388 1.5811388 1.5811388 +region box block -16 16 -16 16 -0.2 0.2 +create_box 1 box +Created orthogonal box = (-25.298221 -25.298221 -0.31622777) to (25.298221 25.298221 0.31622777) + 2 by 2 by 1 MPI processor grid +create_atoms 1 box +Created 1024 atoms + create_atoms CPU = 0.001 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 1974019 1.0 +Setting atom values ... + 1024 settings made for dipole/random +velocity all create 1.0 1 loop geom + +# more careful with neighbors since higher diffusion in abps +neighbor 1.0 bin +neigh_modify every 1 delay 1 check yes + +# WCA potential (purely repulsive) +pair_style lj/cut 2.5 +pair_coeff * * 1.0 1.0 1.1224 +pair_modify shift yes + +# overdamped brownian dynamics time-step +fix step all brownian/sphere ${temp} ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 1.0 gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 1.0 gamma_r 1.0 +# self-propulsion force along the dipole direction +fix activity all propel/self dipole ${fp} +fix activity all propel/self dipole 4.0 +fix 2 all enforce2d + +compute press all pressure NULL virial + +thermo_style custom step pe ke c_press + +#equilibration +timestep 0.0000000001 +thermo 100 +run 5000 +Neighbor list info ... + update every 1 steps, delay 1 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.1224 + ghost atom cutoff = 2.1224 + binsize = 1.0612, bins = 48 48 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton off + pair build: half/bin/newtoff + stencil: half/bin/2d/newtoff + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.052 | 5.052 | 5.052 Mbytes +Step PotEng KinEng c_press + 0 0 0.99902344 -0.53979198 + 100 0 1.0503521e+10 -0.53983092 + 200 0 1.0390343e+10 -0.5398287 + 300 0 1.0493441e+10 -0.53979247 + 400 0 1.0545991e+10 -0.53978678 + 500 0 1.0266398e+10 -0.53986297 + 600 0 1.0484775e+10 -0.53978746 + 700 0 1.0583596e+10 -0.53969114 + 800 0 1.0521919e+10 -0.53968754 + 900 0 1.0492019e+10 -0.53958643 + 1000 0 1.0298052e+10 -0.53949872 + 1100 0 1.0531424e+10 -0.53955431 + 1200 0 1.0635635e+10 -0.53960048 + 1300 0 1.0633405e+10 -0.53966331 + 1400 0 1.0195401e+10 -0.53968849 + 1500 0 1.0593758e+10 -0.53969763 + 1600 0 1.0425238e+10 -0.53971936 + 1700 0 1.0470017e+10 -0.53981957 + 1800 0 1.0545953e+10 -0.53987747 + 1900 0 1.0425015e+10 -0.53990412 + 2000 0 1.0655092e+10 -0.5399511 + 2100 0 1.0197224e+10 -0.53988687 + 2200 0 1.0448012e+10 -0.53986066 + 2300 0 1.0355268e+10 -0.53980415 + 2400 0 1.0246979e+10 -0.53979737 + 2500 0 1.0021539e+10 -0.5397919 + 2600 0 1.0200824e+10 -0.5397575 + 2700 0 1.0721591e+10 -0.53973512 + 2800 0 1.0354562e+10 -0.5397127 + 2900 0 1.0306795e+10 -0.5396946 + 3000 0 1.0301339e+10 -0.53968642 + 3100 0 1.0435826e+10 -0.53970945 + 3200 0 1.019524e+10 -0.53969746 + 3300 0 1.0550481e+10 -0.53967977 + 3400 0 1.0283446e+10 -0.53971102 + 3500 0 1.0956695e+10 -0.53976173 + 3600 0 1.0271033e+10 -0.53983632 + 3700 0 1.0389461e+10 -0.53977293 + 3800 0 1.0680515e+10 -0.53977425 + 3900 0 1.0072183e+10 -0.53982922 + 4000 0 1.0458036e+10 -0.53980042 + 4100 0 1.0588689e+10 -0.53971405 + 4200 0 1.0068308e+10 -0.5398033 + 4300 0 1.0502064e+10 -0.53981291 + 4400 0 1.0590544e+10 -0.5398346 + 4500 0 1.0411612e+10 -0.5397916 + 4600 0 1.0518596e+10 -0.53984868 + 4700 0 1.0386105e+10 -0.53977803 + 4800 0 1.029525e+10 -0.53970882 + 4900 0 1.0519112e+10 -0.53969616 + 5000 0 1.0335841e+10 -0.53976477 +Loop time of 0.471663 on 4 procs for 5000 steps with 1024 atoms + +Performance: 0.092 tau/day, 10600.781 timesteps/s +95.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.067099 | 0.07105 | 0.077898 | 1.6 | 15.06 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.0581 | 0.066084 | 0.072322 | 2.0 | 14.01 +Output | 0.0014644 | 0.002618 | 0.0037239 | 1.6 | 0.56 +Modify | 0.24817 | 0.25719 | 0.26697 | 1.3 | 54.53 +Other | | 0.07472 | | | 15.84 + +Nlocal: 256.000 ave 256 max 256 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 105.000 ave 105 max 105 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 544.000 ave 544 max 544 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2176 +Ave neighs/atom = 2.1250000 +Neighbor list builds = 0 +Dangerous builds = 0 +reset_timestep 0 + + +# MSD +compute msd all msd + +thermo_style custom step temp epair c_msd[*] c_press + + +timestep 0.00001 +thermo 1000 + +# main run +run 20000 +Per MPI rank memory allocation (min/avg/max) = 5.427 | 5.427 | 5.427 Mbytes +Step Temp E_pair c_msd[1] c_msd[2] c_msd[3] c_msd[4] c_press + 0 1.0345945e+10 0 0 0 0 0 -0.53976477 + 1000 100114.28 0.0029703577 0.020320684 0.020950989 0 0.041271673 -0.43948247 + 2000 106825.83 0.020969054 0.039616412 0.039459167 0 0.079075578 -0.22765541 + 3000 105287.4 0.037343571 0.056828177 0.058639835 0 0.11546801 -0.11728136 + 4000 104522.23 0.052237136 0.080264931 0.080863543 0 0.16112847 0.033230576 + 5000 103277.94 0.053791862 0.099188864 0.10141444 0 0.20060331 0.073591503 + 6000 104252.87 0.073304776 0.11964238 0.1215576 0 0.24119999 0.22062305 + 7000 105184.19 0.089054043 0.13691291 0.14216478 0 0.27907769 0.29015692 + 8000 104211.82 0.072577918 0.15820522 0.15658491 0 0.31479013 0.25908291 + 9000 99242.172 0.071616004 0.17658708 0.17479704 0 0.35138412 0.26305532 + 10000 105070.83 0.077009979 0.20175025 0.19871513 0 0.40046538 0.34120567 + 11000 106421.07 0.098623061 0.22472634 0.22671582 0 0.45144216 0.44021335 + 12000 103209.85 0.12032847 0.25004966 0.25368441 0 0.50373406 0.57344873 + 13000 107156.89 0.1058386 0.27283231 0.2744873 0 0.54731961 0.47957408 + 14000 108119.3 0.1204768 0.29333677 0.30054535 0 0.59388213 0.51832639 + 15000 105477.62 0.12510026 0.32217621 0.32806599 0 0.6502422 0.50174158 + 16000 106676.27 0.10893618 0.34980866 0.36031184 0 0.7101205 0.44769198 + 17000 103048.41 0.10625673 0.3781797 0.37970499 0 0.75788468 0.42803898 + 18000 109454.8 0.10555778 0.40997694 0.41396777 0 0.82394471 0.41380982 + 19000 107459.73 0.11267582 0.43757738 0.43577856 0 0.87335594 0.4917748 + 20000 101991.9 0.084279008 0.45363612 0.46278076 0 0.91641688 0.41707912 +Loop time of 1.80877 on 4 procs for 20000 steps with 1024 atoms + +Performance: 9553.439 tau/day, 11057.221 timesteps/s +98.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.34461 | 0.36424 | 0.40948 | 4.4 | 20.14 +Neigh | 0.0031493 | 0.003215 | 0.0032432 | 0.1 | 0.18 +Comm | 0.19538 | 0.20419 | 0.2104 | 1.2 | 11.29 +Output | 0.00054121 | 0.00087297 | 0.0018425 | 0.0 | 0.05 +Modify | 0.98335 | 1.0156 | 1.0791 | 3.8 | 56.15 +Other | | 0.2207 | | | 12.20 + +Nlocal: 256.000 ave 261 max 252 min +Histogram: 1 1 0 0 0 0 1 0 0 1 +Nghost: 93.0000 ave 100 max 83 min +Histogram: 1 0 0 0 0 0 1 1 0 1 +Neighs: 662.250 ave 693 max 635 min +Histogram: 1 0 1 0 0 0 1 0 0 1 + +Total # of neighbors = 2649 +Ave neighs/atom = 2.5869141 +Neighbor list builds = 23 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/USER/brownian/spherical_ABP/log.11May2021.in3d.ideal_apb.g++.1 b/examples/USER/brownian/spherical_ABP/log.11May2021.in3d.ideal_apb.g++.1 new file mode 100644 index 0000000000..0820471faa --- /dev/null +++ b/examples/USER/brownian/spherical_ABP/log.11May2021.in3d.ideal_apb.g++.1 @@ -0,0 +1,210 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +# 3D overdamped active brownian dynamics with no interactions + +variable gamma_t string 3.0 +variable gamma_r string 1.0 +variable temp string 1.0 +variable seed equal 1974019 +variable fp string 4.0 +variable params string ${temp}_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_3.0_${gamma_r}_${fp} +variable params string 1.0_3.0_1.0_${fp} +variable params string 1.0_3.0_1.0_4.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.004 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 1974019 1.0 +Setting atom values ... + 4096 settings made for dipole/random +velocity all create 1.0 1 loop geom + +pair_style none + +# overdamped brownian dynamics time-step +fix step all brownian/sphere ${temp} ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 3.0 gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 3.0 gamma_r 1.0 +# self-propulsion force along the dipole direction +fix activity all propel/self dipole ${fp} +fix activity all propel/self dipole 4.0 + +compute press all pressure NULL virial + +thermo_style custom step ke pe c_press + +#equilibration +timestep 0.0000000001 +thermo 100 +run 5000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.362 | 4.362 | 4.362 Mbytes +Step KinEng PotEng c_press + 0 1.4996338 0 0.068021726 + 100 5.184227e+09 0 0.06801544 + 200 5.2165482e+09 0 0.068010729 + 300 5.2782092e+09 0 0.068009058 + 400 5.3244927e+09 0 0.068003481 + 500 5.2376606e+09 0 0.067998237 + 600 5.2735634e+09 0 0.067998037 + 700 5.2692439e+09 0 0.068025402 + 800 5.2667984e+09 0 0.068030143 + 900 5.242057e+09 0 0.0680246 + 1000 5.2557468e+09 0 0.068028348 + 1100 5.2975687e+09 0 0.068029528 + 1200 5.2081927e+09 0 0.068017542 + 1300 5.2636873e+09 0 0.068012572 + 1400 5.2187907e+09 0 0.06802049 + 1500 5.2349541e+09 0 0.0680373 + 1600 5.216092e+09 0 0.068056885 + 1700 5.2598019e+09 0 0.068069504 + 1800 5.2569065e+09 0 0.068065306 + 1900 5.2072055e+09 0 0.068074863 + 2000 5.2092961e+09 0 0.068061619 + 2100 5.2918572e+09 0 0.068076418 + 2200 5.2680626e+09 0 0.068072149 + 2300 5.242958e+09 0 0.06806486 + 2400 5.2494099e+09 0 0.06805038 + 2500 5.2055798e+09 0 0.068072194 + 2600 5.2264829e+09 0 0.068069312 + 2700 5.3557342e+09 0 0.068064812 + 2800 5.2186177e+09 0 0.068042942 + 2900 5.2652497e+09 0 0.068044214 + 3000 5.1894899e+09 0 0.068044801 + 3100 5.241524e+09 0 0.068056675 + 3200 5.1915006e+09 0 0.06805641 + 3300 5.2367825e+09 0 0.068049946 + 3400 5.2288011e+09 0 0.068060182 + 3500 5.2704335e+09 0 0.068070881 + 3600 5.2886558e+09 0 0.068050439 + 3700 5.1976022e+09 0 0.068045927 + 3800 5.1525512e+09 0 0.068054494 + 3900 5.2212395e+09 0 0.068061432 + 4000 5.2309575e+09 0 0.068070842 + 4100 5.2260184e+09 0 0.068078378 + 4200 5.2829349e+09 0 0.068071652 + 4300 5.2204917e+09 0 0.068083072 + 4400 5.255242e+09 0 0.068066175 + 4500 5.2435681e+09 0 0.068050802 + 4600 5.2483356e+09 0 0.06805658 + 4700 5.2365098e+09 0 0.068041845 + 4800 5.2254325e+09 0 0.068038583 + 4900 5.1842852e+09 0 0.068028401 + 5000 5.2240722e+09 0 0.068031544 +Loop time of 5.14275 on 1 procs for 5000 steps with 4096 atoms + +Performance: 0.008 tau/day, 972.242 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.26842 | 0.26842 | 0.26842 | 0.0 | 5.22 +Output | 0.0035088 | 0.0035088 | 0.0035088 | 0.0 | 0.07 +Modify | 4.6588 | 4.6588 | 4.6588 | 0.0 | 90.59 +Other | | 0.212 | | | 4.12 + +Nlocal: 4096.00 ave 4096 max 4096 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 817.000 ave 817 max 817 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +reset_timestep 0 + +# MSD to demonstrate expected diffusive behaviour for ideal active +# brownian motion, which is +# +# MSD = (2*d*kb*T/gamma_t + 2*fp**2*gamma_r/(kb*T*gamma_t**2*(d-1)))*t +# + 2*fp**2*gamma_r**2/(gamma_t**2*(d-1)**2*(kb*T)**2)*(e^(-(d-1)*t*kb*T/gamma_r)-1) +# +# with d being simulation dimension +compute msd all msd + +thermo_style custom step ke pe c_msd[*] c_press + + +timestep 0.00001 +thermo 1000 + +# main run +run 12000 +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.737 | 4.737 | 4.737 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] c_press + 0 5.2240722e+09 0 0 0 0 0 0.068031544 + 1000 52651.581 0 0.0066842466 0.0067977045 0.0066831353 0.020165086 0.060774985 + 2000 52835.806 0 0.013693443 0.014008773 0.013518945 0.041221161 0.094748037 + 3000 52097.629 0 0.020666918 0.021696789 0.020665685 0.063029392 0.10673866 + 4000 52579.452 0 0.028145318 0.028504548 0.02830967 0.084959536 0.13358122 + 5000 51255.456 0 0.035019271 0.034644123 0.03638843 0.10605182 0.13507609 + 6000 52730.035 0 0.041412307 0.042689213 0.043339117 0.12744064 0.16497663 + 7000 52247.642 0 0.048119396 0.050556395 0.050706527 0.14938232 0.16360301 + 8000 52169.849 0 0.055241196 0.058678631 0.059373122 0.17329295 0.1676169 + 9000 52520.526 0 0.063519587 0.066592779 0.066988842 0.19710121 0.17142694 + 10000 53519.297 0 0.07164814 0.074576535 0.075619236 0.22184391 0.15619444 + 11000 52937.293 0 0.077992504 0.083184462 0.082988794 0.24416576 0.15257327 + 12000 51762.283 0 0.085959749 0.090992292 0.08984213 0.26679417 0.15996211 +Loop time of 11.6748 on 1 procs for 12000 steps with 4096 atoms + +Performance: 888.063 tau/day, 1027.851 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0.0024164 | 0.0024164 | 0.0024164 | 0.0 | 0.02 +Comm | 0.048127 | 0.048127 | 0.048127 | 0.0 | 0.41 +Output | 0.0019393 | 0.0019393 | 0.0019393 | 0.0 | 0.02 +Modify | 11.12 | 11.12 | 11.12 | 0.0 | 95.24 +Other | | 0.5027 | | | 4.31 + +Nlocal: 4096.00 ave 4096 max 4096 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 75 +Dangerous builds = 0 + +# if you want to check that rotational diffusion is behaving as expected, +# uncomment next three lines for dump output and then plot , +# which should decay exponentially with timescale (d-1)*D_r (with d +# being simulation dimension) + +#dump 1 all custom 2000 dump_ideal_${params}_3d.lammpstrj id type # x y xu yu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +#run 120000 +Total wall time: 0:00:16 diff --git a/examples/USER/brownian/spherical_ABP/log.11May2021.in3d.ideal_apb.g++.4 b/examples/USER/brownian/spherical_ABP/log.11May2021.in3d.ideal_apb.g++.4 new file mode 100644 index 0000000000..c6e5b82090 --- /dev/null +++ b/examples/USER/brownian/spherical_ABP/log.11May2021.in3d.ideal_apb.g++.4 @@ -0,0 +1,210 @@ +LAMMPS (8 Apr 2021) + using 1 OpenMP thread(s) per MPI task +# 3D overdamped active brownian dynamics with no interactions + +variable gamma_t string 3.0 +variable gamma_r string 1.0 +variable temp string 1.0 +variable seed equal 1974019 +variable fp string 4.0 +variable params string ${temp}_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_${gamma_t}_${gamma_r}_${fp} +variable params string 1.0_3.0_${gamma_r}_${fp} +variable params string 1.0_3.0_1.0_${fp} +variable params string 1.0_3.0_1.0_4.0 + +units lj +atom_style hybrid dipole sphere +WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:156) +dimension 3 +newton off + +lattice sc 0.4 +Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088 +region box block -8 8 -8 8 -8 8 +create_box 1 box +Created orthogonal box = (-10.857670 -10.857670 -10.857670) to (10.857670 10.857670 10.857670) + 2 by 1 by 2 MPI processor grid +create_atoms 1 box +Created 4096 atoms + create_atoms CPU = 0.002 seconds +mass * 1.0 +set type * dipole/random ${seed} 1.0 +set type * dipole/random 1974019 1.0 +Setting atom values ... + 4096 settings made for dipole/random +velocity all create 1.0 1 loop geom + +pair_style none + +# overdamped brownian dynamics time-step +fix step all brownian/sphere ${temp} ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t ${gamma_t} gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 3.0 gamma_r ${gamma_r} +fix step all brownian/sphere 1.0 1974019 gamma_t 3.0 gamma_r 1.0 +# self-propulsion force along the dipole direction +fix activity all propel/self dipole ${fp} +fix activity all propel/self dipole 4.0 + +compute press all pressure NULL virial + +thermo_style custom step ke pe c_press + +#equilibration +timestep 0.0000000001 +thermo 100 +run 5000 +WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (src/atom.cpp:2141) +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.319 | 4.319 | 4.319 Mbytes +Step KinEng PotEng c_press + 0 1.4996338 0 0.068021726 + 100 5.2484581e+09 0 0.068010768 + 200 5.277936e+09 0 0.068024039 + 300 5.2651427e+09 0 0.068014821 + 400 5.2066432e+09 0 0.068027583 + 500 5.2250276e+09 0 0.068030242 + 600 5.239771e+09 0 0.068018406 + 700 5.1953674e+09 0 0.068017081 + 800 5.2097107e+09 0 0.068010167 + 900 5.2559863e+09 0 0.068012923 + 1000 5.2743197e+09 0 0.068017855 + 1100 5.1999741e+09 0 0.068014189 + 1200 5.3216344e+09 0 0.068005604 + 1300 5.2839264e+09 0 0.067982558 + 1400 5.2462761e+09 0 0.067977843 + 1500 5.2208208e+09 0 0.067979594 + 1600 5.2740284e+09 0 0.067972573 + 1700 5.1919692e+09 0 0.067974452 + 1800 5.2497614e+09 0 0.067966417 + 1900 5.2910442e+09 0 0.067976096 + 2000 5.27238e+09 0 0.067963979 + 2100 5.3305398e+09 0 0.06795661 + 2200 5.205471e+09 0 0.067970212 + 2300 5.1803713e+09 0 0.067931775 + 2400 5.2134311e+09 0 0.067941825 + 2500 5.2367424e+09 0 0.067963456 + 2600 5.2246738e+09 0 0.067957556 + 2700 5.2514573e+09 0 0.067960724 + 2800 5.2601577e+09 0 0.067965167 + 2900 5.2422855e+09 0 0.067956561 + 3000 5.1796674e+09 0 0.067946764 + 3100 5.2308189e+09 0 0.067946585 + 3200 5.1835395e+09 0 0.067951909 + 3300 5.2762112e+09 0 0.067963199 + 3400 5.3224133e+09 0 0.067944918 + 3500 5.2314242e+09 0 0.06795318 + 3600 5.2760337e+09 0 0.067958005 + 3700 5.2549349e+09 0 0.06795228 + 3800 5.3343065e+09 0 0.067944561 + 3900 5.2440993e+09 0 0.067947433 + 4000 5.2565026e+09 0 0.067962624 + 4100 5.1766738e+09 0 0.067949542 + 4200 5.2058437e+09 0 0.067959946 + 4300 5.2777775e+09 0 0.067945883 + 4400 5.2020331e+09 0 0.067953495 + 4500 5.1417619e+09 0 0.067944161 + 4600 5.2672994e+09 0 0.067936777 + 4700 5.222847e+09 0 0.067943025 + 4800 5.2467842e+09 0 0.06794191 + 4900 5.2784378e+09 0 0.067939495 + 5000 5.2563969e+09 0 0.067940246 +Loop time of 1.55848 on 4 procs for 5000 steps with 4096 atoms + +Performance: 0.028 tau/day, 3208.260 timesteps/s +97.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.15304 | 0.15677 | 0.16459 | 1.2 | 10.06 +Output | 0.0012078 | 0.0021182 | 0.0047011 | 3.2 | 0.14 +Modify | 1.1966 | 1.2236 | 1.2761 | 2.8 | 78.51 +Other | | 0.176 | | | 11.29 + +Nlocal: 1024.00 ave 1024 max 1024 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 353.000 ave 353 max 353 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 0 +Dangerous builds = 0 +reset_timestep 0 + +# MSD to demonstrate expected diffusive behaviour for ideal active +# brownian motion, which is +# +# MSD = (2*d*kb*T/gamma_t + 2*fp**2*gamma_r/(kb*T*gamma_t**2*(d-1)))*t +# + 2*fp**2*gamma_r**2/(gamma_t**2*(d-1)**2*(kb*T)**2)*(e^(-(d-1)*t*kb*T/gamma_r)-1) +# +# with d being simulation dimension +compute msd all msd + +thermo_style custom step ke pe c_msd[*] c_press + + +timestep 0.00001 +thermo 1000 + +# main run +run 12000 +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:167) +Per MPI rank memory allocation (min/avg/max) = 4.694 | 4.694 | 4.694 Mbytes +Step KinEng PotEng c_msd[1] c_msd[2] c_msd[3] c_msd[4] c_press + 0 5.2563969e+09 0 0 0 0 0 0.067940246 + 1000 52568.549 0 0.0067249858 0.0066478843 0.0066014231 0.019974293 0.066777589 + 2000 52836.937 0 0.013611101 0.013799663 0.013161144 0.040571907 0.066769693 + 3000 52129.467 0 0.020360834 0.02089829 0.01995025 0.061209374 0.060026879 + 4000 52075.177 0 0.027638751 0.028062314 0.026895904 0.082596969 0.078290387 + 5000 52203.996 0 0.034087112 0.034933104 0.033832559 0.10285278 0.083657551 + 6000 52986.764 0 0.041562413 0.042238976 0.040542538 0.12434393 0.11542014 + 7000 51941.229 0 0.049216989 0.049250201 0.047598008 0.1460652 0.13739893 + 8000 52618.713 0 0.057198947 0.057409217 0.05404895 0.16865711 0.13681938 + 9000 52501.332 0 0.066447829 0.065262287 0.062271789 0.19398191 0.14306596 + 10000 52545.628 0 0.073800792 0.072510553 0.070100713 0.21641206 0.14689578 + 11000 52416.561 0 0.081881868 0.080638809 0.078969817 0.24149049 0.15608324 + 12000 52271.578 0 0.090521937 0.088555992 0.08592156 0.26499949 0.1474981 +Loop time of 3.13506 on 4 procs for 12000 steps with 4096 atoms + +Performance: 3307.113 tau/day, 3827.677 timesteps/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0.00060225 | 0.00060934 | 0.00061345 | 0.0 | 0.02 +Comm | 0.029197 | 0.029376 | 0.029582 | 0.1 | 0.94 +Output | 0.00060606 | 0.00087148 | 0.0016448 | 0.0 | 0.03 +Modify | 2.84 | 2.8773 | 2.8942 | 1.3 | 91.78 +Other | | 0.2269 | | | 7.24 + +Nlocal: 1024.00 ave 1037 max 999 min +Histogram: 1 0 0 0 0 0 0 1 1 1 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0.0000000 +Neighbor list builds = 73 +Dangerous builds = 0 + +# if you want to check that rotational diffusion is behaving as expected, +# uncomment next three lines for dump output and then plot , +# which should decay exponentially with timescale (d-1)*D_r (with d +# being simulation dimension) + +#dump 1 all custom 2000 dump_ideal_${params}_3d.lammpstrj id type # x y xu yu mux muy muz fx fy fz +#dump_modify 1 first yes sort id + +#run 120000 +Total wall time: 0:00:04 diff --git a/examples/USER/misc/propel_self/2d_velocity/in.2d_langevin b/examples/USER/misc/propel_self/2d_velocity/in.2d_langevin deleted file mode 100644 index 6a23e0d005..0000000000 --- a/examples/USER/misc/propel_self/2d_velocity/in.2d_langevin +++ /dev/null @@ -1,54 +0,0 @@ -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 - - diff --git a/examples/USER/misc/propel_self/2d_velocity/in.2d_viscous b/examples/USER/misc/propel_self/2d_velocity/in.2d_viscous deleted file mode 100644 index 1283a5d574..0000000000 --- a/examples/USER/misc/propel_self/2d_velocity/in.2d_viscous +++ /dev/null @@ -1,37 +0,0 @@ -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 twod all enforce2d - -neighbor 0.6 bin - -dump traj all custom 250 2d_active.dump.bin id type x y z - -thermo_style custom step pe ke etotal temp -thermo 1000 -run 10000 - -fix active all propel/self velocity 1.0 -fix fric all viscous 1.0 - -# With active force there is more motion so increase bin size: -neighbor 1.0 bin -run 10000 diff --git a/examples/USER/misc/propel_self/3d_quaternion/in.3d_quaternion b/examples/USER/misc/propel_self/3d_quaternion/in.3d_quaternion deleted file mode 100644 index d6b6aff7dd..0000000000 --- a/examples/USER/misc/propel_self/3d_quaternion/in.3d_quaternion +++ /dev/null @@ -1,40 +0,0 @@ -dimension 3 -boundary p p p - -atom_style ellipsoid -variable L equal 20 -region total block -$L $L -$L $L -$L $L -lattice sc 0.1 -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 -set type * shape 1.0 1.0 1.0 -set type * density 1.9098593171027443 -set type * quat 0 0 1 0 - -fix step all nve/asphere -fix temp all langevin 1.0 1.0 1.0 13 angmom 3.333333333 - -neighbor 0.6 bin - -dump traj all custom 100 3d_active.dump.bin id type x y z fx fy fz - -thermo_style custom step pe ke etotal temp -thermo 100 -run 500 - -fix active all propel/self quat 1.0 - -# With active force there is more motion so increase bin size: -neighbor 1.0 bin -run 500 diff --git a/src/.gitignore b/src/.gitignore index 64452b3e08..20a0bde94e 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -27,6 +27,11 @@ /*_ssa.h /*_ssa.cpp +/fix_brownian*.cpp +/fix_brownian*.h +/fix_propel_self.cpp +/fix_propel_self.h + /kim_*.cpp /kim_*.h /pair_kim.cpp @@ -700,8 +705,6 @@ /fix_poems.h /fix_pour.cpp /fix_pour.h -/fix_propel_self.cpp -/fix_propel_self.h /fix_qeq_comb.cpp /fix_qeq_comb.h /fix_qeq_reax.cpp diff --git a/src/Makefile b/src/Makefile index 1606f9b239..6523870d75 100644 --- a/src/Makefile +++ b/src/Makefile @@ -51,12 +51,13 @@ PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ mliap molecule mpiio mscg opt peri plugin poems \ python qeq replica rigid shock snap spin srd voronoi -PACKUSER = user-adios user-atc user-awpmd user-bocs user-cgdna user-cgsdk user-colvars \ - user-diffraction user-dpd user-drude user-eff user-fep user-h5md \ - user-intel user-lb user-manifold user-meamc user-mesodpd user-mesont \ - user-mgpt user-misc user-mofff user-molfile \ - user-netcdf user-omp user-phonon user-pace user-plumed user-ptm user-qmmm \ - user-qtb user-quip user-reaction user-reaxc user-scafacos user-smd user-smtbq \ +PACKUSER = user-adios user-atc user-awpmd user-brownian user-bocs user-cgdna \ + user-cgsdk user-colvars user-diffraction user-dpd user-drude \ + user-eff user-fep user-h5md user-intel user-lb user-manifold \ + user-meamc user-mesodpd user-mesont user-mgpt user-misc \ + user-mofff \user-molfile user-netcdf user-omp user-phonon \ + user-pace user-plumed user-ptm user-qmmm user-qtb user-quip \ + user-reaction user-reaxc user-scafacos user-smd user-smtbq \ user-sdpd user-sph user-tally user-uef user-vtk user-yaff PACKLIB = compress gpu kim kokkos latte message mpiio mscg poems python voronoi \ diff --git a/src/USER-BROWNIAN/fix_brownian.cpp b/src/USER-BROWNIAN/fix_brownian.cpp new file mode 100644 index 0000000000..92a969661b --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian.cpp @@ -0,0 +1,136 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Originally modified from USER-CGDNA/fix_nve_dotc_langevin.cpp. + + Contributing author: Sam Cameron (University of Bristol) +------------------------------------------------------------------------- */ + +#include "fix_brownian.h" + +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "math_extra.h" +#include "memory.h" +#include "random_mars.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixBrownian::FixBrownian(LAMMPS *lmp, int narg, char **arg) : FixBrownianBase(lmp, narg, arg) +{ + if (dipole_flag || gamma_t_eigen_flag || gamma_r_eigen_flag || gamma_r_flag) { + error->all(FLERR, "Illegal fix brownian command."); + } + if (!gamma_t_flag) { error->all(FLERR, "Illegal fix brownian command."); } +} + +/* ---------------------------------------------------------------------- */ + +void FixBrownian::init() +{ + FixBrownianBase::init(); + g1 /= gamma_t; + g2 *= sqrt(gamma_t); +} + +/* ---------------------------------------------------------------------- */ + +void FixBrownian::initial_integrate(int /*vflag */) +{ + if (domain->dimension == 2) { + if (!noise_flag) { + initial_integrate_templated<0, 0, 1>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 1>(); + } else { + initial_integrate_templated<1, 0, 1>(); + } + } else { + if (!noise_flag) { + initial_integrate_templated<0, 0, 0>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 0>(); + } else { + initial_integrate_templated<1, 0, 0>(); + } + } + return; +} + +/* ---------------------------------------------------------------------- */ + +template void FixBrownian::initial_integrate_templated() +{ + double **x = atom->x; + double **v = atom->v; + double **f = atom->f; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + double dx, dy, dz; + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + if (Tp_2D) { + dz = 0; + if (Tp_UNIFORM) { + dx = dt * (g1 * f[i][0] + g2 * (rng->uniform() - 0.5)); + dy = dt * (g1 * f[i][1] + g2 * (rng->uniform() - 0.5)); + } else if (Tp_GAUSS) { + dx = dt * (g1 * f[i][0] + g2 * rng->gaussian()); + dy = dt * (g1 * f[i][1] + g2 * rng->gaussian()); + } else { + dx = dt * g1 * f[i][0]; + dy = dt * g1 * f[i][1]; + } + } else { + if (Tp_UNIFORM) { + dx = dt * (g1 * f[i][0] + g2 * (rng->uniform() - 0.5)); + dy = dt * (g1 * f[i][1] + g2 * (rng->uniform() - 0.5)); + dz = dt * (g1 * f[i][2] + g2 * (rng->uniform() - 0.5)); + } else if (Tp_GAUSS) { + dx = dt * (g1 * f[i][0] + g2 * rng->gaussian()); + dy = dt * (g1 * f[i][1] + g2 * rng->gaussian()); + dz = dt * (g1 * f[i][2] + g2 * rng->gaussian()); + } else { + dx = dt * g1 * f[i][0]; + dy = dt * g1 * f[i][1]; + dz = dt * g1 * f[i][2]; + } + } + + x[i][0] += dx; + v[i][0] = dx / dt; + + x[i][1] += dy; + v[i][1] = dy / dt; + + x[i][2] += dz; + v[i][2] = dz / dt; + } + } + return; +} diff --git a/src/USER-BROWNIAN/fix_brownian.h b/src/USER-BROWNIAN/fix_brownian.h new file mode 100644 index 0000000000..97705f4f48 --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian.h @@ -0,0 +1,61 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(brownian,FixBrownian); +// clang-format on +#else + +#ifndef LMP_FIX_BROWNIAN_H +#define LMP_FIX_BROWNIAN_H + +#include "fix_brownian_base.h" + +namespace LAMMPS_NS { + +class FixBrownian : public FixBrownianBase { + public: + FixBrownian(class LAMMPS *, int, char **); + virtual ~FixBrownian() {}; + void init(); + void initial_integrate(int); + + private: + template + void initial_integrate_templated(); +}; + +} // namespace LAMMPS_NS +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal fix brownian command. + +Wrong number/type of input arguments. + +E: Fix brownian viscous drag coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian diffusion coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian seed must be > 0. + +Self-explanatory. + +*/ diff --git a/src/USER-BROWNIAN/fix_brownian_asphere.cpp b/src/USER-BROWNIAN/fix_brownian_asphere.cpp new file mode 100644 index 0000000000..e7b6eb2728 --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian_asphere.cpp @@ -0,0 +1,272 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Originally modified from USER-CGDNA/fix_nve_dotc_langevin.cpp. + + Contributing author: Sam Cameron (University of Bristol) +------------------------------------------------------------------------- */ + +#include "fix_brownian_asphere.h" + +#include "atom.h" +#include "atom_vec_ellipsoid.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "math_extra.h" +#include "memory.h" +#include "random_mars.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixBrownianAsphere::FixBrownianAsphere(LAMMPS *lmp, int narg, char **arg) : + FixBrownianBase(lmp, narg, arg) +{ + if (!gamma_t_eigen_flag || !gamma_r_eigen_flag) { + error->all(FLERR, "Illegal fix brownian command."); + } + + if (gamma_t_flag || gamma_r_flag) error->all(FLERR, "Illegal fix brownian command."); + + if (dipole_flag && !atom->mu_flag) + error->all(FLERR, "Fix brownian/asphere dipole requires atom attribute mu"); +} + +/* ---------------------------------------------------------------------- */ + +void FixBrownianAsphere::init() +{ + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) error->all(FLERR, "Compute brownian/asphere requires atom style ellipsoid"); + + // check that all particles are finite-size ellipsoids + // no point particles allowed, spherical is OK + + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + if (ellipsoid[i] < 0) error->one(FLERR, "Fix brownian/asphere requires extended particles"); + + if (dipole_flag) { + + double f_rot[3]; + double *quat; + int *ellipsoid = atom->ellipsoid; + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + + double Q[3][3]; + double **mu = atom->mu; + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + quat = bonus[ellipsoid[i]].quat; + MathExtra::quat_to_mat(quat, Q); + MathExtra::matvec(Q, dipole_body, f_rot); + + mu[i][0] = f_rot[0]; + mu[i][1] = f_rot[1]; + mu[i][2] = f_rot[2]; + } + } + } + + FixBrownianBase::init(); +} + +/* ---------------------------------------------------------------------- */ + +void FixBrownianAsphere::initial_integrate(int /*vflag */) +{ + if (domain->dimension == 2) { + if (dipole_flag) { + if (!noise_flag) { + initial_integrate_templated<0, 0, 1, 1>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 1, 1>(); + } else { + initial_integrate_templated<1, 0, 1, 1>(); + } + } else { + if (!noise_flag) { + initial_integrate_templated<0, 0, 0, 1>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 0, 1>(); + } else { + initial_integrate_templated<1, 0, 0, 1>(); + } + } + } else { + if (dipole_flag) { + if (!noise_flag) { + initial_integrate_templated<0, 0, 1, 0>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 1, 0>(); + } else { + initial_integrate_templated<1, 0, 1, 0>(); + } + } else { + if (!noise_flag) { + initial_integrate_templated<0, 0, 0, 0>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 0, 0>(); + } else { + initial_integrate_templated<1, 0, 0, 0>(); + } + } + } + return; +} + +/* ---------------------------------------------------------------------- */ + +template +void FixBrownianAsphere::initial_integrate_templated() +{ + double **x = atom->x; + double **v = atom->v; + double **f = atom->f; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + + double **mu = atom->mu; + double **torque = atom->torque; + double qw[4]; + double *quat; + int *ellipsoid = atom->ellipsoid; + + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + // project dipole along x axis of quat + double f_rot[3]; + double rotationmatrix_transpose[3][3]; + double tmp[3]; + double dv[3]; + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + + // update orientation first + + quat = bonus[ellipsoid[i]].quat; + MathExtra::quat_to_mat_trans(quat, rotationmatrix_transpose); + + // tmp holds angular velocity in body frame + MathExtra::matvec(rotationmatrix_transpose, torque[i], tmp); + + if (Tp_2D) { + tmp[0] = tmp[1] = 0.0; + if (Tp_UNIFORM) { + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * (rng->uniform() - 0.5) * g2; + } else if (Tp_GAUSS) { + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * rng->gaussian() * g2; + } else { + tmp[2] = g1 * tmp[2] * gamma_r_inv[2]; + } + } else { + if (Tp_UNIFORM) { + tmp[0] = g1 * tmp[0] * gamma_r_inv[0] + gamma_r_invsqrt[0] * (rng->uniform() - 0.5) * g2; + tmp[1] = g1 * tmp[1] * gamma_r_inv[1] + gamma_r_invsqrt[1] * (rng->uniform() - 0.5) * g2; + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * (rng->uniform() - 0.5) * g2; + } else if (Tp_GAUSS) { + tmp[0] = g1 * tmp[0] * gamma_r_inv[0] + gamma_r_invsqrt[0] * rng->gaussian() * g2; + tmp[1] = g1 * tmp[1] * gamma_r_inv[1] + gamma_r_invsqrt[1] * rng->gaussian() * g2; + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * rng->gaussian() * g2; + } else { + tmp[0] = g1 * tmp[0] * gamma_r_inv[0]; + tmp[1] = g1 * tmp[1] * gamma_r_inv[1]; + tmp[2] = g1 * tmp[2] * gamma_r_inv[2]; + } + } + + // convert body frame angular velocity to quaternion + MathExtra::quatvec(quat, tmp, qw); + quat[0] = quat[0] + 0.5 * dt * qw[0]; + quat[1] = quat[1] + 0.5 * dt * qw[1]; + quat[2] = quat[2] + 0.5 * dt * qw[2]; + quat[3] = quat[3] + 0.5 * dt * qw[3]; + + // normalisation introduces the stochastic drift term + // to recover the Boltzmann distribution for the case of conservative torques + MathExtra::qnormalize(quat); + + // next, update centre of mass positions and velocities + + // tmp now holds force in body frame + MathExtra::matvec(rotationmatrix_transpose, f[i], tmp); + // and then converts to gamma_t^{-1} * F (velocity) in body frame + + if (Tp_2D) { + tmp[2] = 0.0; + if (Tp_UNIFORM) { + tmp[0] = g1 * tmp[0] * gamma_t_inv[0] + gamma_t_invsqrt[0] * (rng->uniform() - 0.5) * g2; + tmp[1] = g1 * tmp[1] * gamma_t_inv[1] + gamma_t_invsqrt[1] * (rng->uniform() - 0.5) * g2; + } else if (Tp_GAUSS) { + tmp[0] = g1 * tmp[0] * gamma_t_inv[0] + gamma_t_invsqrt[0] * rng->gaussian() * g2; + tmp[1] = g1 * tmp[1] * gamma_t_inv[1] + gamma_t_invsqrt[1] * rng->gaussian() * g2; + } else { + tmp[0] = g1 * tmp[0] * gamma_t_inv[0]; + tmp[1] = g1 * tmp[1] * gamma_t_inv[1]; + } + } else { + if (Tp_UNIFORM) { + tmp[0] = g1 * tmp[0] * gamma_t_inv[0] + gamma_t_invsqrt[0] * (rng->uniform() - 0.5) * g2; + tmp[1] = g1 * tmp[1] * gamma_t_inv[1] + gamma_t_invsqrt[1] * (rng->uniform() - 0.5) * g2; + tmp[2] = g1 * tmp[2] * gamma_t_inv[2] + gamma_t_invsqrt[2] * (rng->uniform() - 0.5) * g2; + } else if (Tp_GAUSS) { + tmp[0] = g1 * tmp[0] * gamma_t_inv[0] + gamma_t_invsqrt[0] * rng->gaussian() * g2; + tmp[1] = g1 * tmp[1] * gamma_t_inv[1] + gamma_t_invsqrt[1] * rng->gaussian() * g2; + tmp[2] = g1 * tmp[2] * gamma_t_inv[2] + gamma_t_invsqrt[2] * rng->gaussian() * g2; + } else { + tmp[0] = g1 * tmp[0] * gamma_t_inv[0]; + tmp[1] = g1 * tmp[1] * gamma_t_inv[1]; + tmp[2] = g1 * tmp[2] * gamma_t_inv[2]; + } + } + + // finally, convert this back to lab-frame velocity and store in dv + MathExtra::transpose_matvec(rotationmatrix_transpose, tmp, dv); + + v[i][0] = dv[0]; + v[i][1] = dv[1]; + v[i][2] = dv[2]; + + x[i][0] += dv[0] * dt; + x[i][1] += dv[1] * dt; + x[i][2] += dv[2] * dt; + + if (Tp_DIPOLE) { + MathExtra::quat_to_mat_trans(quat, rotationmatrix_transpose); + MathExtra::transpose_matvec(rotationmatrix_transpose, dipole_body, f_rot); + mu[i][0] = f_rot[0]; + mu[i][1] = f_rot[1]; + mu[i][2] = f_rot[2]; + } + } + } + + return; +} diff --git a/src/USER-BROWNIAN/fix_brownian_asphere.h b/src/USER-BROWNIAN/fix_brownian_asphere.h new file mode 100644 index 0000000000..23a88ddaba --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian_asphere.h @@ -0,0 +1,81 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(brownian/asphere,FixBrownianAsphere); +// clang-format on +#else + +#ifndef LMP_FIX_BROWNIAN_ASPHERE_H +#define LMP_FIX_BROWNIAN_ASPHERE_H + +#include "fix_brownian_base.h" + +namespace LAMMPS_NS { + +class FixBrownianAsphere : public FixBrownianBase { + public: + FixBrownianAsphere(class LAMMPS *, int, char **); + virtual ~FixBrownianAsphere() {}; + void initial_integrate(int); + void init(); + + protected: + class AtomVecEllipsoid *avec; + + private: + template + void initial_integrate_templated(); +}; +} // namespace LAMMPS_NS +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal fix brownian/asphere command. + +Wrong number/type of input arguments. + +E: Compute brownian/asphere requires atom style sphere + +Self-explanatory. + +E: Compute brownian/asphere requires atom style ellipsoid + +Self-explanatory. + +E: Compute brownian/asphere dipole requires atom attribute mu + +Self-explanatory. + +E: Fix brownian/asphere translational viscous drag coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/asphere rotational viscous drag coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/asphere translational diffusion coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/asphere rotational diffusion coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/asphere seed must be > 0. + +*/ diff --git a/src/USER-BROWNIAN/fix_brownian_base.cpp b/src/USER-BROWNIAN/fix_brownian_base.cpp new file mode 100644 index 0000000000..93990681bd --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian_base.cpp @@ -0,0 +1,218 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Originally modified from USER-CGDNA/fix_nve_dotc_langevin.cpp. + + Contributing author: Sam Cameron (University of Bristol) +------------------------------------------------------------------------- */ + +#include "fix_brownian.h" + +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "math_extra.h" +#include "memory.h" +#include "random_mars.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixBrownianBase::FixBrownianBase(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) +{ + time_integrate = 1; + + noise_flag = 1; + gaussian_noise_flag = 0; + gamma_t_flag = gamma_r_flag = 0; + gamma_t_eigen_flag = gamma_r_eigen_flag = 0; + dipole_flag = 0; + + if (narg < 5) error->all(FLERR, "Illegal fix brownian command."); + + temp = utils::numeric(FLERR, arg[3], false, lmp); + if (temp <= 0) error->all(FLERR, "Fix brownian temp must be > 0."); + + seed = utils::inumeric(FLERR, arg[4], false, lmp); + if (seed <= 0) error->all(FLERR, "Fix brownian seed must be > 0."); + + int iarg = 5; + while (iarg < narg) { + if (strcmp(arg[iarg], "rng") == 0) { + if (narg == iarg + 1) error->all(FLERR, "Illegal fix brownian command."); + if (strcmp(arg[iarg + 1], "uniform") == 0) { + noise_flag = 1; + } else if (strcmp(arg[iarg + 1], "gaussian") == 0) { + noise_flag = 1; + gaussian_noise_flag = 1; + } else if (strcmp(arg[iarg + 1], "none") == 0) { + noise_flag = 0; + } else { + error->all(FLERR, "Illegal fix brownian command."); + } + iarg = iarg + 2; + } else if (strcmp(arg[iarg], "dipole") == 0) { + if (narg == iarg + 3) error->all(FLERR, "Illegal fix brownian command."); + + dipole_flag = 1; + dipole_body = new double[3]; + + dipole_body[0] = utils::numeric(FLERR, arg[iarg + 1], false, lmp); + dipole_body[1] = utils::numeric(FLERR, arg[iarg + 2], false, lmp); + dipole_body[2] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + iarg = iarg + 4; + + } else if (strcmp(arg[iarg], "gamma_t_eigen") == 0) { + if (narg == iarg + 3) error->all(FLERR, "Illegal fix brownian command."); + + gamma_t_eigen_flag = 1; + gamma_t_inv = new double[3]; + gamma_t_invsqrt = new double[3]; + gamma_t_inv[0] = 1. / utils::numeric(FLERR, arg[iarg + 1], false, lmp); + gamma_t_inv[1] = 1. / utils::numeric(FLERR, arg[iarg + 2], false, lmp); + + if (domain->dimension == 2) { + if (strcmp(arg[iarg + 3], "inf") != 0) { + error->all(FLERR, "Fix brownian gamma_t_eigen third value must be inf for 2D system."); + } + gamma_t_inv[2] = 0; + } else { + gamma_t_inv[2] = 1.0 / utils::numeric(FLERR, arg[iarg + 3], false, lmp); + } + + if (gamma_t_inv[0] < 0 || gamma_t_inv[1] < 0 || gamma_t_inv[2] < 0) + error->all(FLERR, "Fix brownian gamma_t_eigen values must be > 0."); + + gamma_t_invsqrt[0] = sqrt(gamma_t_inv[0]); + gamma_t_invsqrt[1] = sqrt(gamma_t_inv[1]); + gamma_t_invsqrt[2] = sqrt(gamma_t_inv[2]); + iarg = iarg + 4; + + } else if (strcmp(arg[iarg], "gamma_r_eigen") == 0) { + if (narg == iarg + 3) error->all(FLERR, "Illegal fix brownian command."); + + gamma_r_eigen_flag = 1; + gamma_r_inv = new double[3]; + gamma_r_invsqrt = new double[3]; + + if (domain->dimension == 2) { + if (strcmp(arg[iarg + 1], "inf") != 0) { + error->all(FLERR, "Fix brownian gamma_r_eigen first value must be inf for 2D system."); + } + gamma_r_inv[0] = 0; + + if (strcmp(arg[iarg + 2], "inf") != 0) { + error->all(FLERR, "Fix brownian gamma_r_eigen second value must be inf for 2D system."); + } + gamma_r_inv[1] = 0; + } else { + + gamma_r_inv[0] = 1. / utils::numeric(FLERR, arg[iarg + 1], false, lmp); + gamma_r_inv[1] = 1. / utils::numeric(FLERR, arg[iarg + 2], false, lmp); + } + + gamma_r_inv[2] = 1. / utils::numeric(FLERR, arg[iarg + 3], false, lmp); + + if (gamma_r_inv[0] < 0 || gamma_r_inv[1] < 0 || gamma_r_inv[2] < 0) + error->all(FLERR, "Fix brownian gamma_r_eigen values must be > 0."); + + gamma_r_invsqrt[0] = sqrt(gamma_r_inv[0]); + gamma_r_invsqrt[1] = sqrt(gamma_r_inv[1]); + gamma_r_invsqrt[2] = sqrt(gamma_r_inv[2]); + iarg = iarg + 4; + + } else if (strcmp(arg[iarg], "gamma_t") == 0) { + if (narg == iarg + 1) { error->all(FLERR, "Illegal fix brownian command."); } + + gamma_t_flag = 1; + gamma_t = utils::numeric(FLERR, arg[iarg + 1], false, lmp); + if (gamma_t <= 0) error->all(FLERR, "Fix brownian gamma_t must be > 0."); + iarg = iarg + 2; + + } else if (strcmp(arg[iarg], "gamma_r") == 0) { + if (narg == iarg + 1) { error->all(FLERR, "Illegal fix brownian command."); } + + gamma_r_flag = 1; + gamma_r = utils::numeric(FLERR, arg[iarg + 1], false, lmp); + if (gamma_r <= 0) error->all(FLERR, "Fix brownian gamma_r must be > 0."); + iarg = iarg + 2; + + } else { + error->all(FLERR, "Illegal fix brownian command."); + } + } + + // initialize Marsaglia RNG with processor-unique seed + rng = new RanMars(lmp, seed + comm->me); +} + +/* ---------------------------------------------------------------------- */ + +int FixBrownianBase::setmask() +{ + int mask = 0; + mask |= INITIAL_INTEGRATE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +FixBrownianBase::~FixBrownianBase() +{ + + if (gamma_t_eigen_flag) { + delete[] gamma_t_inv; + delete[] gamma_t_invsqrt; + } + if (gamma_r_eigen_flag) { + delete[] gamma_r_inv; + delete[] gamma_r_invsqrt; + } + + if (dipole_flag) { delete[] dipole_body; } + delete rng; +} + +/* ---------------------------------------------------------------------- */ + +void FixBrownianBase::init() +{ + dt = update->dt; + sqrtdt = sqrt(dt); + + g1 = force->ftm2v; + if (noise_flag == 0) { + g2 = 0; + } else if (gaussian_noise_flag == 1) { + g2 = sqrt(2 * force->boltz * temp / dt / force->mvv2e); + } else { + g2 = sqrt(24 * force->boltz * temp / dt / force->mvv2e); + } +} + +void FixBrownianBase::reset_dt() +{ + double sqrtdt_old = sqrtdt; + dt = update->dt; + sqrtdt = sqrt(dt); + g2 *= sqrtdt_old / sqrtdt; +} diff --git a/src/USER-BROWNIAN/fix_brownian_base.h b/src/USER-BROWNIAN/fix_brownian_base.h new file mode 100644 index 0000000000..5d3b7fe69b --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian_base.h @@ -0,0 +1,88 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_FIX_BROWNIAN_BASE_H +#define LMP_FIX_BROWNIAN_BASE_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixBrownianBase : public Fix { + public: + FixBrownianBase(class LAMMPS *, int, char **); + virtual ~FixBrownianBase(); + void init(); + int setmask(); + void reset_dt(); + + protected: + int seed; // RNG seed + double dt, sqrtdt; // time step interval and its sqrt + int gamma_t_flag; // 0/1 if isotropic translational damping is unset/set + int gamma_r_flag; // 0/1 if isotropic rotational damping is unset/set + int gamma_t_eigen_flag; // 0/1 if anisotropic translational damping is unset/set + int gamma_r_eigen_flag; // 0/1 if anisotropic rotational damping is unset/set + + double gamma_t, gamma_r; // translational and rotational (isotropic) damping params + double *gamma_t_inv; // anisotropic damping parameter eigenvalues + double *gamma_r_inv; + double *gamma_t_invsqrt; + double *gamma_r_invsqrt; + + int dipole_flag; // set if dipole is used for asphere + double *dipole_body; // direction dipole is slaved to in body frame + + int noise_flag; // 0/1 for noise off/on + int gaussian_noise_flag; // 0/1 for uniform/gaussian noise + + double temp; // temperature + double g1, g2; // prefactors in time stepping + + class RanMars *rng; +}; + +} // namespace LAMMPS_NS +#endif + +/* ERROR/WARNING messages: + +E: Illegal fix brownian command. + +Wrong number/type of input arguments. + +E: Fix brownian gamma_t_eigen values must be > 0. + +Self-explanatory. + +E: Fix brownian gamma_r_eigen values must be > 0. + +Self-explanatory. + +E: Fix brownian seed must be > 0. + +Self-explanatory. + +E: Fix brownian temp must be > 0. + +Self-explanatory. + +E: Fix brownian gamma_t must be > 0. + +Self-explanatory. + +E: Fix brownian gamma_r must be > 0. + +Self-explanatory. + +*/ diff --git a/src/USER-BROWNIAN/fix_brownian_sphere.cpp b/src/USER-BROWNIAN/fix_brownian_sphere.cpp new file mode 100644 index 0000000000..00893d77e7 --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian_sphere.cpp @@ -0,0 +1,185 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Originally modified from USER-CGDNA/fix_nve_dotc_langevin.cpp. + + Contributing author: Sam Cameron (University of Bristol) +------------------------------------------------------------------------- */ + +#include "fix_brownian_sphere.h" + +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "math_extra.h" +#include "memory.h" +#include "random_mars.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixBrownianSphere::FixBrownianSphere(LAMMPS *lmp, int narg, char **arg) : + FixBrownianBase(lmp, narg, arg) +{ + if (gamma_t_eigen_flag || gamma_r_eigen_flag) { + error->all(FLERR, "Illegal fix brownian command."); + } + + if (!gamma_t_flag || !gamma_r_flag) { error->all(FLERR, "Illegal fix brownian command."); } + if (!atom->mu_flag) error->all(FLERR, "Fix brownian/sphere requires atom attribute mu"); +} + +/* ---------------------------------------------------------------------- */ + +void FixBrownianSphere::init() +{ + FixBrownianBase::init(); + + g3 = g1 / gamma_r; + g4 = g2 / sqrt(gamma_r); + g1 /= gamma_t; + g2 /= sqrt(gamma_t); +} + +/* ---------------------------------------------------------------------- */ + +void FixBrownianSphere::initial_integrate(int /*vflag */) +{ + if (domain->dimension == 2) { + if (!noise_flag) { + initial_integrate_templated<0, 0, 1>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 1>(); + } else { + initial_integrate_templated<1, 0, 1>(); + } + } else { + if (!noise_flag) { + initial_integrate_templated<0, 0, 0>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 0>(); + } else { + initial_integrate_templated<1, 0, 0>(); + } + } + return; +} + +/* ---------------------------------------------------------------------- */ + +template +void FixBrownianSphere::initial_integrate_templated() +{ + double **x = atom->x; + double **v = atom->v; + double **f = atom->f; + int *mask = atom->mask; + int nlocal = atom->nlocal; + double wx, wy, wz; + double **torque = atom->torque; + double **mu = atom->mu; + double mux, muy, muz, mulen; + + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + double dx, dy, dz; + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + if (Tp_2D) { + dz = 0; + wx = wy = 0; + if (Tp_UNIFORM) { + dx = dt * (g1 * f[i][0] + g2 * (rng->uniform() - 0.5)); + dy = dt * (g1 * f[i][1] + g2 * (rng->uniform() - 0.5)); + wz = (rng->uniform() - 0.5) * g4; + } else if (Tp_GAUSS) { + dx = dt * (g1 * f[i][0] + g2 * rng->gaussian()); + dy = dt * (g1 * f[i][1] + g2 * rng->gaussian()); + wz = rng->gaussian() * g4; + } else { + dx = dt * g1 * f[i][0]; + dy = dt * g1 * f[i][1]; + wz = 0; + } + } else { + if (Tp_UNIFORM) { + dx = dt * (g1 * f[i][0] + g2 * (rng->uniform() - 0.5)); + dy = dt * (g1 * f[i][1] + g2 * (rng->uniform() - 0.5)); + dz = dt * (g1 * f[i][2] + g2 * (rng->uniform() - 0.5)); + wx = (rng->uniform() - 0.5) * g4; + wy = (rng->uniform() - 0.5) * g4; + wz = (rng->uniform() - 0.5) * g4; + } else if (Tp_GAUSS) { + dx = dt * (g1 * f[i][0] + g2 * rng->gaussian()); + dy = dt * (g1 * f[i][1] + g2 * rng->gaussian()); + dz = dt * (g1 * f[i][2] + g2 * rng->gaussian()); + wx = rng->gaussian() * g4; + wy = rng->gaussian() * g4; + wz = rng->gaussian() * g4; + } else { + dx = dt * g1 * f[i][0]; + dy = dt * g1 * f[i][1]; + dz = dt * g1 * f[i][2]; + wx = wy = wz = 0; + } + } + + x[i][0] += dx; + v[i][0] = dx / dt; + + x[i][1] += dy; + v[i][1] = dy / dt; + + x[i][2] += dz; + v[i][2] = dz / dt; + + wx += g3 * torque[i][0]; + wy += g3 * torque[i][1]; + wz += g3 * torque[i][2]; + + // store length of dipole as we need to convert it to a unit vector and + // then back again + + mulen = sqrt(mu[i][0] * mu[i][0] + mu[i][1] * mu[i][1] + mu[i][2] * mu[i][2]); + + // unit vector at time t + mux = mu[i][0] / mulen; + muy = mu[i][1] / mulen; + muz = mu[i][2] / mulen; + + // un-normalised unit vector at time t + dt + mu[i][0] = mux + (wy * muz - wz * muy) * dt; + mu[i][1] = muy + (wz * mux - wx * muz) * dt; + mu[i][2] = muz + (wx * muy - wy * mux) * dt; + + // normalisation introduces the stochastic drift term due to changing from + // Stratonovich to Ito interpretation + MathExtra::norm3(mu[i]); + + // multiply by original magnitude to obtain dipole of same length + mu[i][0] = mu[i][0] * mulen; + mu[i][1] = mu[i][1] * mulen; + mu[i][2] = mu[i][2] * mulen; + } + } +} diff --git a/src/USER-BROWNIAN/fix_brownian_sphere.h b/src/USER-BROWNIAN/fix_brownian_sphere.h new file mode 100644 index 0000000000..19e86204ad --- /dev/null +++ b/src/USER-BROWNIAN/fix_brownian_sphere.h @@ -0,0 +1,75 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(brownian/sphere,FixBrownianSphere); +// clang-format on +#else + +#ifndef LMP_FIX_BROWNIAN_SPHERE_H +#define LMP_FIX_BROWNIAN_SPHERE_H + +#include "fix_brownian_base.h" + +namespace LAMMPS_NS { + +class FixBrownianSphere : public FixBrownianBase { + public: + FixBrownianSphere(class LAMMPS *, int, char **); + virtual ~FixBrownianSphere() {}; + void init(); + void initial_integrate(int); + + private: + template + void initial_integrate_templated(); + double g3, g4; +}; +} // namespace LAMMPS_NS +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal fix brownian/sphere command. + +Wrong number/type of input arguments. + +E: Compute brownian/sphere requires atom style sphere + +Self-explanatory. + +E: Compute brownian/sphere requires atom attribute mu + +Self-explanatory. + +E: Fix brownian/sphere translational viscous drag coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/sphere rotational viscous drag coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/sphere translational diffusion coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/sphere rotational diffusion coefficient must be > 0. + +Self-explanatory. + +E: Fix brownian/sphere seed must be > 0. + +*/ diff --git a/src/USER-BROWNIAN/fix_propel_self.cpp b/src/USER-BROWNIAN/fix_propel_self.cpp new file mode 100644 index 0000000000..9adb49d039 --- /dev/null +++ b/src/USER-BROWNIAN/fix_propel_self.cpp @@ -0,0 +1,303 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ----------------------------------------------------------------------- + Contributed by Stefan Paquay @ Brandeis University + + Thanks to Liesbeth Janssen @ Eindhoven University for useful discussions! + + Current maintainer: Sam Cameron @ University of Bristol +----------------------------------------------------------------------- */ + +#include "fix_propel_self.h" + +#include "atom.h" +#include "atom_vec_ellipsoid.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "math_extra.h" +#include "memory.h" +#include "update.h" + +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +enum { DIPOLE, VELOCITY, QUAT }; + +#define TOL 1e-14 + +/* ---------------------------------------------------------------------- */ + +FixPropelSelf::FixPropelSelf(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) +{ + + virial_global_flag = virial_peratom_flag = 1; + + if (narg != 5 && narg != 9) error->all(FLERR, "Illegal fix propel/self command"); + + if (strcmp(arg[3], "velocity") == 0) { + mode = VELOCITY; + thermo_virial = 0; + } else if (strcmp(arg[3], "dipole") == 0) { + mode = DIPOLE; + thermo_virial = 1; + } else if (strcmp(arg[3], "quat") == 0) { + mode = QUAT; + thermo_virial = 1; + } else { + error->all(FLERR, "Illegal fix propel/self command"); + } + + magnitude = utils::numeric(FLERR, arg[4], false, lmp); + + // check for keyword + + if (narg == 9) { + if (mode != QUAT) { error->all(FLERR, "Illegal fix propel/self command"); } + if (strcmp(arg[5], "qvector") == 0) { + sx = utils::numeric(FLERR, arg[6], false, lmp); + sy = utils::numeric(FLERR, arg[7], false, lmp); + sz = utils::numeric(FLERR, arg[8], false, lmp); + double snorm = sqrt(sx * sx + sy * sy + sz * sz); + sx = sx / snorm; + sy = sy / snorm; + sz = sz / snorm; + } else { + error->all(FLERR, "Illegal fix propel/self command"); + } + } else { + sx = 1.0; + sy = 0.0; + sz = 0.0; + } +} + +/* ---------------------------------------------------------------------- */ + +int FixPropelSelf::setmask() +{ + int mask = 0; + mask |= POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixPropelSelf::init() +{ + if (mode == DIPOLE && !atom->mu_flag) + error->all(FLERR, "Fix propel/self requires atom attribute mu with option dipole"); + + if (mode == QUAT) { + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) error->all(FLERR, "Fix propel/self requires atom style ellipsoid with option quat"); + + // check that all particles are finite-size ellipsoids + // no point particles allowed, spherical is OK + + int *ellipsoid = atom->ellipsoid; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + if (ellipsoid[i] < 0) + error->one(FLERR, "Fix propel/self requires extended particles with option quat"); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixPropelSelf::setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixPropelSelf::post_force(int vflag) +{ + if (mode == DIPOLE) + post_force_dipole(vflag); + else if (mode == VELOCITY) + post_force_velocity(vflag); + else if (mode == QUAT) + post_force_quaternion(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixPropelSelf::post_force_dipole(int vflag) +{ + double **f = atom->f; + int *mask = atom->mask; + int nlocal = atom->nlocal; + double **x = atom->x; + double **mu = atom->mu; + double fx, fy, fz; + + // energy and virial setup + double vi[6]; + if (vflag) + v_setup(vflag); + else + evflag = 0; + + // if domain has PBC, need to unwrap for virial + double unwrap[3]; + imageint *image = atom->image; + + // Add the active force to the atom force: + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + + fx = magnitude * mu[i][0]; + fy = magnitude * mu[i][1]; + fz = magnitude * mu[i][2]; + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + + if (evflag) { + domain->unmap(x[i], image[i], unwrap); + vi[0] = fx * unwrap[0]; + vi[1] = fy * unwrap[1]; + vi[2] = fz * unwrap[2]; + vi[3] = fx * unwrap[1]; + vi[4] = fx * unwrap[2]; + vi[5] = fy * unwrap[2]; + v_tally(i, vi); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void FixPropelSelf::post_force_velocity(int vflag) +{ + double **f = atom->f; + double **v = atom->v; + double **x = atom->x; + int *mask = atom->mask; + int nlocal = atom->nlocal; + double nv2, fnorm, fx, fy, fz; + + // energy and virial setup + double vi[6]; + if (vflag) + v_setup(vflag); + else + evflag = 0; + + // if domain has PBC, need to unwrap for virial + double unwrap[3]; + imageint *image = atom->image; + + // Add the active force to the atom force: + for (int i = 0; i < nlocal; ++i) { + if (mask[i] & groupbit) { + + nv2 = v[i][0] * v[i][0] + v[i][1] * v[i][1] + v[i][2] * v[i][2]; + fnorm = 0.0; + + if (nv2 > TOL) { + + // Without this check you can run into numerical + // issues because fnorm will blow up. + + fnorm = magnitude / sqrt(nv2); + } + fx = fnorm * v[i][0]; + fy = fnorm * v[i][1]; + fz = fnorm * v[i][2]; + + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + + if (evflag) { + domain->unmap(x[i], image[i], unwrap); + vi[0] = fx * unwrap[0]; + vi[1] = fy * unwrap[1]; + vi[2] = fz * unwrap[2]; + vi[3] = fx * unwrap[1]; + vi[4] = fx * unwrap[2]; + vi[5] = fy * unwrap[2]; + v_tally(i, vi); + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +void FixPropelSelf::post_force_quaternion(int vflag) +{ + double **f = atom->f; + double **x = atom->x; + int *mask = atom->mask; + int nlocal = atom->nlocal; + int *ellipsoid = atom->ellipsoid; + + // ellipsoidal properties + AtomVecEllipsoid::Bonus *bonus = avec->bonus; + double f_act[3] = {sx, sy, sz}; + double f_rot[3]; + double *quat; + double Q[3][3]; + double fx, fy, fz; + + // energy and virial setup + double vi[6]; + if (vflag) + v_setup(vflag); + else + evflag = 0; + + // if domain has PBC, need to unwrap for virial + double unwrap[3]; + imageint *image = atom->image; + + // Add the active force to the atom force: + for (int i = 0; i < nlocal; ++i) { + if (mask[i] & groupbit) { + + quat = bonus[ellipsoid[i]].quat; + MathExtra::quat_to_mat(quat, Q); + MathExtra::matvec(Q, f_act, f_rot); + + fx = magnitude * f_rot[0]; + fy = magnitude * f_rot[1]; + fz = magnitude * f_rot[2]; + + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + + if (evflag) { + domain->unmap(x[i], image[i], unwrap); + vi[0] = fx * unwrap[0]; + vi[1] = fy * unwrap[1]; + vi[2] = fz * unwrap[2]; + vi[3] = fx * unwrap[1]; + vi[4] = fx * unwrap[2]; + vi[5] = fy * unwrap[2]; + v_tally(i, vi); + } + } + } +} diff --git a/src/USER-MISC/fix_propel_self.h b/src/USER-BROWNIAN/fix_propel_self.h similarity index 52% rename from src/USER-MISC/fix_propel_self.h rename to src/USER-BROWNIAN/fix_propel_self.h index 968dd3af57..9874635818 100644 --- a/src/USER-MISC/fix_propel_self.h +++ b/src/USER-BROWNIAN/fix_propel_self.h @@ -12,60 +12,57 @@ ------------------------------------------------------------------------- */ #ifdef FIX_CLASS - -FixStyle(propel/self,FixPropelSelf) - +// clang-format off +FixStyle(propel/self,FixPropelSelf); +// clang-format on #else #ifndef LMP_FIX_PROPEL_SELF_H #define LMP_FIX_PROPEL_SELF_H #include "fix.h" - namespace LAMMPS_NS { class FixPropelSelf : public Fix { public: - FixPropelSelf(class LAMMPS *, int, char **); - virtual ~FixPropelSelf(); - virtual int setmask(); - virtual void post_force(int); + virtual ~FixPropelSelf() {}; + void init(); + void post_force(int); + void setup(int); + int setmask(); - double memory_usage(); - - protected: - enum operation_modes { - VELOCITY = 0, - QUATERNION = 1 - }; - -private: + private: double magnitude; + double sx, sy, sz; int mode; - // If 0, apply fix to everything in group. If > 0, apply only to those - // types i for which i <= n_types_filter _and_ apply_to_type[i] == 1: - int n_types_filter; - int *apply_to_type; //< Specifies, per type, if the fix applies to it or not. + void post_force_dipole(int); + void post_force_velocity(int); + void post_force_quaternion(int); - - int atoms_have_quaternion(); - - template void post_force_velocity(int); - template void post_force_quaternion(int); + class AtomVecEllipsoid *avec; }; -} - +} // namespace LAMMPS_NS #endif #endif /* ERROR/WARNING messages: -E: Illegal ... command +E: Illegal fix propel/self command. -Self-explanatory. Check the input script syntax and compare to the -documentation for the command. You can use -echo screen as a -command-line option when running LAMMPS to see the offending line. +Wrong number/type of input arguments. + +E: Fix propel/self requires atom attribute mu with option dipole. + +Self-explanatory. + +E: Fix propel/self requires atom style ellipsoid with option quat. + +Self-explanatory. + +Fix propel/self requires extended particles with option quat. + +Self-explanatory. */ diff --git a/src/USER-MISC/README b/src/USER-MISC/README index 3e2c8ed000..d6f859b359 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -68,7 +68,6 @@ fix nvk, Efrem Braun (UC Berkeley), efrem.braun at gmail.com, https://github.com fix orient/eco Adrian A. Schratt and Volker Mohles (Ruhr-Uni Bochum), volker.mohles at rub.de, 6 Jun 2020 fix pafi, Thomas Swinburne (CNRS), swinburne at cinam.univ-mrs.fr, 1st Sep 2020 fix pimd, Yuxing Peng (U Chicago), yuxing at uchicago.edu, 24 Nov 2014 -fix propel/self, Stefan Paquay (Brandeis U), stefanpaquay at gmail.com, 20 Jan 2020 fix rhok, Ulf Pedersen (Roskilde U), ulf at urp.dk, 25 Sep 2017 fix smd, Axel Kohlmeyer, akohlmey at gmail.com, 19 May 2008 fix ti/spring, Rodrigo Freitas (Unicamp/Brazil), rodrigohb at gmail.com, 7 Nov 2013 diff --git a/src/USER-MISC/fix_propel_self.cpp b/src/USER-MISC/fix_propel_self.cpp deleted file mode 100644 index 0affa24ffe..0000000000 --- a/src/USER-MISC/fix_propel_self.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://lammps.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -/* ----------------------------------------------------------------------- - Contributed by Stefan Paquay @ Brandeis University - - Thanks to Liesbeth Janssen @ Eindhoven University for useful discussions! ------------------------------------------------------------------------ */ - -#include "fix_propel_self.h" - -#include "atom.h" -#include "atom_vec_ellipsoid.h" -#include "error.h" -#include "math_const.h" -#include "math_extra.h" - -#include -#include -#include - -using namespace LAMMPS_NS; -using namespace FixConst; -using namespace MathConst; - -#define PRINT_DEBUG_OUTPUT 0 - -/* ---------------------------------------------------------------------- */ - -FixPropelSelf::FixPropelSelf( LAMMPS *lmp, int narg, char **argv ) - : Fix(lmp, narg, argv), magnitude(0.0), - mode(VELOCITY), n_types_filter(0), apply_to_type(nullptr) -{ - if (narg < 5) error->all(FLERR, "Illegal fix propel/self command"); - - // The fix is to support the following cases: - // 1. Simple atoms, in which case the force points along the velocity - // 2. Aspherical particles with an orientation. - // 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]; - - if (strcmp(mode_str, "velocity") == 0) { - mode = VELOCITY; - - } else if (strcmp(mode_str, "quat") == 0) { - - // This mode should only be supported if the atom style has - // a quaternion (and if all atoms in the group have it) - - if (!atoms_have_quaternion()) { - error->all(FLERR, "All fix atoms need to be extended particles"); - } - mode = QUATERNION; - - } else { - char msg[2048]; - sprintf(msg, "Illegal mode \"%s\" for fix propel/self", mode_str); - error->all(FLERR, msg); - } - - magnitude = utils::numeric( FLERR, argv[4] ,false,lmp); - - // Handle rest of args: - - int iarg = 5; - while (iarg < narg) { - - if (strcmp(argv[iarg],"types") == 0) { - - apply_to_type = new int[atom->ntypes+1]; - memset(apply_to_type, 0, atom->ntypes * sizeof(int)); - - // consume all following numerical arguments as types - - iarg++; - int flag=0; - while (iarg < narg) { - if (isdigit(argv[iarg][0])) { - int thistype = utils::inumeric(FLERR,argv[iarg],false,lmp); - if ((thistype < 1) || (thistype > atom->ntypes)) - error->all(FLERR,"Illegal atom type to types keyword"); - apply_to_type[thistype] = 1; - flag = 1; - iarg++; - } else break; - } - if (!flag) - error->all(FLERR,"'types' keyword requires at least one type"); - else - n_types_filter = 1; - - } else { - error->all(FLERR,"Illegal fix propel/self command."); - } - } -} - -/* ---------------------------------------------------------------------- */ - -FixPropelSelf::~FixPropelSelf() -{ - delete[] apply_to_type; -} -/* ---------------------------------------------------------------------- */ - -int FixPropelSelf::setmask() -{ - int mask = 0; - mask |= POST_FORCE; - - return mask; -} - -/* ---------------------------------------------------------------------- */ - -double FixPropelSelf::memory_usage() -{ - // magnitude + thermostat_orient + mode + n_types_filter + apply_to_type - double bytes = (double)sizeof(double) + 3*sizeof(int) + sizeof(int*); - bytes += (double)sizeof(int)*atom->ntypes*n_types_filter; - - return bytes; -} - -/* ---------------------------------------------------------------------- */ - -void FixPropelSelf::post_force(int vflag ) -{ - switch(mode) { - case QUATERNION: - if (n_types_filter) post_force_quaternion<1>(vflag); - else post_force_quaternion<0>(vflag); - break; - case VELOCITY: - if (n_types_filter) post_force_velocity<1>(vflag); - else post_force_velocity<0>(vflag); - break; - default: - ; - } -} - -/* ---------------------------------------------------------------------- */ - -template -void FixPropelSelf::post_force_quaternion(int /* vflag */ ) -{ - double **f = atom->f; - - int *mask = atom->mask; - int nlocal = atom->nlocal; - int *type = atom->type; - int* ellipsoid = atom->ellipsoid; - - AtomVecEllipsoid *av = static_cast(atom->style_match("ellipsoid")); - AtomVecEllipsoid::Bonus *bonus = av->bonus; - - // Add the active force to the atom force: - - for (int i = 0; i < nlocal; ++i) { - if (mask[i] & groupbit) { - if (filter_by_type && !apply_to_type[type[i]]) { - continue; - } - - double f_act[3] = { 1.0, 0.0, 0.0 }; - double f_rot[3]; - - double *quat = bonus[ellipsoid[i]].quat; - - double Q[3][3]; - MathExtra::quat_to_mat( quat, Q ); - MathExtra::matvec( Q, f_act, f_rot ); - - f[i][0] += magnitude * f_rot[0]; - f[i][1] += magnitude * f_rot[1]; - f[i][2] += magnitude * f_rot[2]; - } - } -} - -/* ---------------------------------------------------------------------- */ - -template -void FixPropelSelf::post_force_velocity(int /*vflag*/) -{ - double **f = atom->f; - double **v = atom->v; - int *mask = atom->mask; - int nlocal = atom->nlocal; - int *type = atom->type; - - // Add the active force to the atom force: - - for (int i = 0; i < nlocal; ++i) { - if (mask[i] & groupbit) { - if (filter_by_type && !apply_to_type[type[i]]) { - continue; - } - - const double *vi = v[i]; - double f_act[3] = { vi[0], vi[1], vi[2] }; - double nv2 = vi[0]*vi[0] + vi[1]*vi[1] + vi[2]*vi[2]; - double fnorm = 0.0; - const double TOL = 1e-14; - - if (nv2 > TOL) { - - // Without this check you can run into numerical - // issues because fnorm will blow up. - - fnorm = magnitude / sqrt(nv2); - } - - f[i][0] += fnorm * f_act[0]; - f[i][1] += fnorm * f_act[1]; - f[i][2] += fnorm * f_act[2]; - } - } -} - -/* ---------------------------------------------------------------------- */ - -int FixPropelSelf::atoms_have_quaternion() -{ - if (!atom->ellipsoid_flag) { - error->all(FLERR, "Mode 'quat' requires atom style ellipsoid"); - return 0; - } - - int *mask = atom->mask; - int flag=0,flagall=0; - - // Make sure all atoms have ellipsoid data: - - for (int i = 0; i < atom->nlocal; ++i) - if (mask[i] & groupbit) - if (atom->ellipsoid[i] < 0) ++flag; - - MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); - if (flagall > 0) return 0; - - return 1; -} diff --git a/src/random_mars.cpp b/src/random_mars.cpp index 78c6f93ba4..cefb246648 100644 --- a/src/random_mars.cpp +++ b/src/random_mars.cpp @@ -94,6 +94,7 @@ double RanMars::uniform() return uni; } + /* ---------------------------------------------------------------------- gaussian RN ------------------------------------------------------------------------- */ diff --git a/unittest/force-styles/tests/data.brownian b/unittest/force-styles/tests/data.brownian new file mode 100644 index 0000000000..3fbad7d05e --- /dev/null +++ b/unittest/force-styles/tests/data.brownian @@ -0,0 +1,86 @@ +LAMMPS data file via write_data, version 30 Nov 2020, timestep = 120000 + +32 atoms +1 atom types + +-2.7144176165949063 2.7144176165949063 xlo xhi +-2.7144176165949063 2.7144176165949063 ylo yhi +-1.3572088082974532 1.3572088082974532 zlo zhi + +Masses + +1 1 + +Pair Coeffs # zero + +1 + +Atoms # hybrid + +1 1 0.8174385639059338 -1.5010271964354949 1.0637924298773633 0 0.6257069940596588 -0.111108944542851 -0.7721046302331049 1 1 -1 0 -1 +2 1 -1.5885878110813303 2.2401728691740113 0.47068930278928994 0 -0.5102593570021903 0.8585717488647711 -0.049899305035241655 1 1 0 -1 -1 +3 1 -1.1818944957014061 -2.6848623178033457 -1.1800939297629425 0 -0.004166477179696561 0.19766436575888424 0.9802609035236738 1 1 0 0 0 +4 1 0.1720589621174558 1.3643946759490944 -1.1522506184595422 0 0.11721568749368932 0.2990753541702089 -0.9470028590945996 1 1 0 -1 0 +5 1 -2.5038595242428823 -1.624930716630223 -1.1484315973168586 0 -0.3868419197154481 -0.6136739748888413 0.6883005024660352 1 1 0 0 0 +6 1 -1.2345478646498314 -0.3224402671532977 0.5533955773621407 0 0.24969915142093102 -0.15640101573329426 -0.9556092590893315 1 1 0 0 -1 +7 1 1.1946150666115714 0.4921384424233923 -0.516829526742452 0 0.0036359783326705107 -0.4590891155800383 -0.8883827798969893 1 1 0 0 -1 +8 1 1.8342027600045443 1.516095010832566 0.043843911607852545 0 -0.8435468778359277 0.11782686457134713 -0.5239708912511688 1 1 0 -1 -1 +9 1 -0.5406701027756321 2.23952568921304 0.5241488585364904 0 0.045872039042421424 0.13268297551853248 -0.9900964518882184 1 1 0 0 -1 +10 1 -0.3972258497968314 0.7566024687022016 -0.2323435643206888 0 0.655171514572036 -0.43050189344470563 0.6208207520966965 1 1 0 0 -1 +11 1 -0.7183933447005026 1.1587411649504586 0.20950093049531074 0 0.22933670283280452 -0.6843477395075139 -0.6921508854034168 1 1 0 0 -1 +12 1 1.022524253197315 0.17877446802634833 0.29899480569943504 0 0.6711103355965887 -0.41621190608313047 -0.6134969981100816 1 1 0 0 -2 +13 1 -1.4250800612966135 -2.4056565408365356 0.21801121763465003 0 -0.5029961497078136 0.46126362983367525 -0.7309108955076378 1 1 0 1 0 +14 1 -1.7432369014700662 1.621196939810902 0.07955801420882219 0 -0.7988534279257005 0.3194109740977685 -0.5097154405325315 1 1 0 0 -1 +15 1 -0.9908151496097626 -2.6488792381485773 -1.1948117198271224 0 0.5516163133238324 -0.6234158094772195 0.5541409309633126 1 1 0 1 0 +16 1 2.6948716697156523 0.41280900513864877 0.1548529904178103 0 -0.8512724888069316 0.23988291811633639 0.4666811924605956 1 1 0 0 -1 +17 1 -1.5494542712095147 -0.53420074244155 -0.6250925146711168 0 -0.07678144567993991 -0.03950496198488684 0.9962650087089635 1 1 0 0 0 +18 1 -2.3151948315996678 -2.6221617748715036 -0.1899804833264763 0 -0.7569384929404162 -0.33315612552157964 -0.562184234866597 1 1 0 0 0 +19 1 2.1590179665621467 1.6095466091914918 -1.2253859221608403 0 0.20879037375649698 -0.06905534931949565 0.9755193173674137 1 1 0 -1 0 +20 1 2.202409043221526 0.14395355359028536 1.335860415061412 0 -0.14984238844204667 -0.9847320173066201 0.08860086183112265 1 1 0 -1 -1 +21 1 -1.4500395490531754 -1.5281375693866057 0.00020797713894412338 0 -0.9915462127271186 0.08451237717795997 0.09845692525281326 1 1 0 0 0 +22 1 -1.0657362106538344 0.6350242518491277 -0.7513800843604899 0 -0.6569043427466144 -0.07223746743273625 0.7505054515321944 1 1 0 -1 0 +23 1 -0.5619632776222234 1.8699713384517294 -0.9467270322768698 0 0.7911745431454184 0.5177930983571434 -0.3254737310019788 1 1 0 0 0 +24 1 -2.1040517028343215 -2.247249268720423 0.11322260281322279 0 -0.04193441020358475 0.2313330374822751 -0.9719704373128341 1 1 1 0 -1 +25 1 -0.868354233492487 -0.14640654973697223 -0.9035771863161228 0 -0.15652971300701132 0.0848859275832726 -0.9840187133608133 1 1 0 0 0 +26 1 -0.4652717213714348 0.12334049868763304 -0.3826888902964762 0 0.6487662426744875 0.7578954080882759 0.06853402632804934 1 1 -1 0 -1 +27 1 -1.0478542019398558 2.3814414358320106 1.2039965288246885 0 0.10846325104076994 -0.6457073741173193 -0.7558423844851409 1 1 0 0 -1 +28 1 2.500698605198214 -0.728008572758278 0.48410831318342695 0 -0.3622892345018212 0.911584495321123 0.19431988692415955 1 1 0 0 -1 +29 1 -1.416084269787537 -1.7066588654378656 0.8328319180724224 0 -0.08971242415920104 -0.44687722085944426 0.8900856309526737 1 1 0 1 -1 +30 1 -0.6370519124977301 0.47113373856505564 -0.08549434306971403 0 -0.6030496979424049 -0.7976847581640081 -0.0054852898193420265 1 1 0 0 0 +31 1 0.8225325721319097 -0.441545584269452 0.3381678086542899 0 -0.6909877678544062 -0.7162885851668209 0.09729628685258002 1 1 0 0 0 +32 1 2.1861742760925518 1.5740929150306235 -0.01693950575830974 0 0.890366016527044 0.3247001065794207 0.3190896385047258 1 1 0 0 0 + +Velocities + +1 -524.6769664299819 215.42199277006424 -112.27005568908588 -462.03530876082846 -551.9512642384534 -196.46403300264745 +2 391.3416799472542 48.7957761872576 -623.1311508507263 489.33832403519347 -260.3072072833973 -529.7105564646685 +3 109.86388293585976 665.5499875054874 -583.4371492475789 -678.3137468561738 622.6210695594215 37.427168579931944 +4 398.4814329387423 -117.47798197974335 -376.25882363220865 44.966011242133156 -720.7197483734453 654.1933839835833 +5 584.5314601424474 159.82839534760055 -199.69054648577074 298.5492685852273 657.8565691587017 -616.4449676099423 +6 609.4975570025578 738.2439586459146 284.06966373218285 143.74329023895925 256.75048911205783 -57.96098774586574 +7 -27.968041606728725 752.3634409363073 223.6145040530379 -496.9033910070852 198.22198514310026 -81.32767873220877 +8 -451.1189781565461 -759.642533657806 547.0603381420482 316.5054412546416 669.7302717449263 -447.9786170711034 +9 -54.531235862640735 -115.1466962517251 -610.7279757582849 -731.9703465871636 -735.0301879611621 -584.8114323501295 +10 748.6292469789635 701.8693636792311 -498.1997398935133 208.99011146198362 -538.4269075676226 130.16593091403558 +11 -174.9453247974202 153.40962619436522 390.8158086666639 -381.20607659097726 548.6301954978544 225.4382939850729 +12 -393.58450479962613 562.7494007708912 -512.2495061493412 425.83486537187855 260.1521699032197 -605.409242525273 +13 294.0485676041469 -416.4803586200817 -678.9550420350499 284.48925268723156 -67.2753269810592 559.4386740115784 +14 -764.1287373972617 733.8169442814999 720.6030317274988 357.0913464046234 521.8205481343224 173.7714175822938 +15 -91.18940426263303 224.9036504882129 284.4326488075122 -207.62866349692237 501.5282881027212 445.99895870682315 +16 179.07740801693492 -535.4403834538152 -318.55850921823156 266.7175735768374 444.97898080245074 -381.12832705309194 +17 -428.2045641732463 -491.50884735767914 -270.6175162521197 727.5062118970601 128.20058511314278 270.88345291377027 +18 395.0795674693432 306.1681692632796 -13.216405710204159 671.3857274637012 102.79070644890297 322.4136674209789 +19 -203.6409986589429 -54.701509197392014 581.0635722032287 -186.75568274826543 476.4083542709755 -601.0363388843747 +20 -115.92502268264624 -762.0000436955148 -223.1167962036293 489.85643882981896 -247.41158767130918 -365.8330907652003 +21 658.7418242889948 586.715926671846 -624.8573383343708 -10.66175165422313 359.69577124554525 -340.2786090411881 +22 56.13036471905219 261.41167548131494 373.8653013382346 673.5607754029996 -245.8613985477709 353.0482780954667 +23 -252.99394908800596 -466.09490577221976 -670.846651689147 -616.9981712696467 -541.8114132827196 -369.70154580103025 +24 -627.059810991902 278.53716543954556 457.18418082455213 -101.65170342061822 225.64771910612274 649.9004460194175 +25 -542.388717452386 -105.31239543953356 69.1170307021082 -204.78231016519337 -522.3497436231834 -357.49930063072486 +26 -213.4605252121538 -534.3449644895232 244.1099101456221 275.4530388773477 212.2684271906576 -165.97485643999994 +27 595.2153731851414 626.5401264322599 -736.723964414168 -188.93350086112284 -459.44316502268424 -484.4606024327521 +28 -400.55444615195614 606.638183855102 121.6628831751137 359.49918126198475 668.2849798601502 -135.04633035091715 +29 -347.6624143232117 -365.7917228400548 -541.6372617049859 160.0398519292602 -624.5129134218859 -448.13097661684066 +30 -104.98117502101249 500.1388613847156 731.4317325082025 -481.0858846642298 -574.8809141763269 122.21267028742885 +31 754.8558584263326 -34.937336585228245 -726.0948084688208 -103.81133072710576 431.8053281041717 -479.89267857331 +32 140.02839515740888 643.0847109951975 -535.5893264521633 -373.10470401809016 -661.5529040774077 37.5722333352976 diff --git a/unittest/force-styles/tests/fix-timestep-brownian.yaml b/unittest/force-styles/tests/fix-timestep-brownian.yaml new file mode 100644 index 0000000000..76477d874e --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-brownian.yaml @@ -0,0 +1,80 @@ +--- +lammps_version: 24 Aug 2020 +date_generated: Tue Dec 08 12:28:40 2020 +epsilon: 1e-12 +prerequisites: ! | + atom hybrid dipole sphere + fix brownian/sphere +pre_commands: ! "" +post_commands: ! | + fix test solute brownian/sphere 1.0 1.0 1.0 1.0 1049270 dipole + fix_modify test virial yes +input_file: in.brownian +natoms: 32 +run_pos: ! |2 +1 0.8198132185477983 -1.5120221815010249 1.069236010215717 +2 -1.583657719347759 2.2448791290372445 0.48185576252150486 +3 -1.1880610036164596 -2.678219122115848 -1.1824396130063375 +4 0.1908794667962731 1.3593710068293134 -1.1524405138570022 +5 -2.502067366922716 -1.6291621715156412 -1.155308629818198 +6 -1.214213515524568 -0.33667539680264325 0.5468489960944642 +7 1.2020658999364164 0.5045561046001554 -0.5265404283266816 +8 1.8138899397447894 1.5212405777462397 0.04943268689972926 +9 -0.547736141448719 2.2385521615789026 0.5146647473679599 +10 -0.38821952892982114 0.7570899758491753 -0.23554333362488367 +11 -0.7101567507222957 1.1587573566149103 0.19674801175715137 +12 1.0217947252204158 0.1732739652383159 0.3064332055619567 +13 -1.43254480550968 -2.4145346257525504 0.22508495277327453 +14 -1.7469141674373843 1.605802890508775 0.07604534549063337 +15 -0.9840165887382163 -2.631709004347024 -1.1933270065258215 +16 2.6947076505094056 0.4027838910781582 0.16197472527708037 +17 -1.553343026077184 -0.5326249015108566 -0.6372569894483383 +18 -2.32697929027452 -2.6229660088889384 -0.1908463010722981 +19 2.161025566743724 1.613342829181601 -1.2185964188334404 +20 2.200299550516107 0.13388691832171218 1.3492239308384593 +21 -1.444652156145116 -1.5251851082502694 -0.01486082239207267 +22 -1.069098522661769 0.6345737477571621 -0.7476592232484849 +23 -0.5530156382651018 1.8581482829486815 -0.9359906503001887 +24 -2.1057002294256346 -2.2411635326026076 0.1027461222133986 +25 -0.846470575235486 -0.16100145290710122 -0.8945542130124591 +26 -0.4600833044897612 0.1168099650353831 -0.3780372490219117 +27 -1.0507601010756238 2.380597031527799 1.2042435415073673 +28 2.4951223446270854 -0.7272384746662179 0.49148118274363145 +29 -1.4227701815513125 -1.7103131555856865 0.8522428843219197 +30 -0.6362527497446904 0.4809930863631752 -0.09023977411046079 +31 0.8307577317570568 -0.43366523738108803 0.3435388363003548 +32 2.193071783870056 1.5720818983016567 -0.002617308630618007 +run_vel: ! |2 +1 -199.33264006196603 -425.90458140644324 687.4446082626521 +2 -437.96841023792416 91.79431782876951 428.57844526457393 +3 256.4136360073004 753.6546188320922 -477.2093961250793 +4 566.9823183079484 -598.4626629699561 -572.6010613373849 +5 193.3673483203161 517.2757090545375 86.71381952181962 +6 330.2395000638781 -14.096120493379578 -736.8264608358458 +7 772.6058378438489 335.4342218605717 -492.47120565202727 +8 -379.69346948872095 328.07026948905315 212.8907928502149 +9 -32.22616772317161 520.1349898628745 -354.5179475075607 +10 1.0828608441585152 -152.03654350035677 -287.63229160711455 +11 -8.398427517515586 462.54972999070884 -696.8949630195855 +12 -35.97938353895289 590.1362599649709 750.3193298672243 +13 -738.0063700936831 2.1036698005985586 521.0581963709241 +14 734.7145728536893 -576.3310076952716 -212.8973489276375 +15 462.14962458969075 517.8011186395346 582.1970348843957 +16 579.8864331189503 -723.7080269305067 -397.93358494791835 +17 -74.75036331228799 -271.6937286797369 318.88308122021147 +18 -390.80278885093725 -625.5459111419849 -678.090840223804 +19 -598.6933260882906 41.7579655827356 750.013779723682 +20 158.9763823000137 310.0053213378944 226.83667759758563 +21 -578.1763126419472 755.241466585726 -387.1851268613029 +22 -686.649568451259 496.2326396493665 -392.30182210275524 +23 139.72339904857833 686.4901911325059 460.94182891802774 +24 625.6387119562066 -178.79780516572728 194.63377933230842 +25 761.5753760889415 -550.6374632586046 -355.3666363468769 +26 -167.9925585211552 -748.0176849962858 537.6949353742531 +27 -687.973065038564 -637.3675344653028 -231.07938308121751 +28 -480.2313784604401 372.9809695991278 24.972745276651647 +29 67.21410614540838 54.58636231646205 639.3712010004265 +30 -469.9090654062959 715.7242943947524 -386.21519675922724 +31 -380.59017466972404 487.7214660680053 177.24466119039292 +32 138.31144158562722 31.005629253137737 621.8772779588675 +... diff --git a/unittest/force-styles/tests/in.brownian b/unittest/force-styles/tests/in.brownian new file mode 100644 index 0000000000..cf85742e59 --- /dev/null +++ b/unittest/force-styles/tests/in.brownian @@ -0,0 +1,16 @@ +variable newton_pair index on +variable newton_bond index on +variable units index lj +variable input_dir index . +variable data_file index ${input_dir}/data.brownian +variable pair_style index 'zero 8.0' + +atom_style hybrid dipole sphere +atom_modify map array +neigh_modify delay 2 every 2 check no +units ${units} +timestep 0.00001 +newton ${newton_pair} ${newton_bond} + +pair_style ${pair_style} +read_data ${data_file}