Commit 7b423c6d authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

integrate USER-MOP package into build and documentat system. apply latest...

integrate USER-MOP package into build and documentat system. apply latest LAMMPS programming style conventions
parent ba4ff774
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -215,8 +215,8 @@ set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE GRANULAR
  SRD KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD USER-BOCS
  USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE
  USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
  USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC USER-SMD
  USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM)
  USER-MOP USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC
  USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM)
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
set(OTHER_PACKAGES CORESHELL QEQ)
foreach(PKG ${DEFAULT_PACKAGES})
+24 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ as contained in the file name.
"USER-MGPT"_#PKG-USER-MGPT,
"USER-MISC"_#PKG-USER-MISC,
"USER-MOFFF"_#PKG-USER-MOFFF,
"USER-MOP"_#PKG-USER-MOP,
"USER-MOLFILE"_#PKG-USER-MOLFILE,
"USER-NETCDF"_#PKG-USER-NETCDF,
"USER-OMP"_#PKG-USER-OMP,
@@ -1572,6 +1573,29 @@ examples/USER/mofff :ul

:line

USER-MOP package :link(PKG-USER-MOP),h4

[Contents:]

This package contains two compute styles: compute mop and compute mop/profile.

compute mop calculates components of the local stress tensor using the method of planes, applied on one plane.

compute mop/profile calculates profiles of components of the local stress tensor using the method of planes, applied on an array of regularly spaced planes.

[Author:] Laurent Joly (University of Lyon 1)
Romain Vermorel at (University of Pau and Pays de l'Adour)

[Supporting info:]

src/USER-MOP: filenames -> commands
src/USER-MOP/README
"compute mop"_compute_mop.html
"compute mop/profile"_compute_mop.html
examples/USER/mop :ul

:line

USER-MOLFILE package :link(PKG-USER-MOLFILE),h4

[Contents:]
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ Package, Description, Doc page, Example, Library
"USER-MESO"_Packages_details.html#PKG-USER-MESO, mesoscale DPD models, "pair_style edpd"_pair_meso.html, USER/meso, no
"USER-MGPT"_Packages_details.html#PKG-USER-MGPT, fast MGPT multi-ion potentials, "pair_style mgpt"_pair_mgpt.html, USER/mgpt, no
"USER-MISC"_Packages_details.html#PKG-USER-MISC, single-file contributions, USER-MISC/README, USER/misc, no
"USER-MOP"_Packages_details.html#PKG-USER-MOP, compute stress via method-of-planes, "compute_style mop"_compute_mop.html, USER/mop, no
"USER-MOFFF"_Packages_details.html#PKG-USER-MOFFF, styles for "MOF-FF"_MOFplus force field, "pair_style buck6d/coul/gauss"_pair_buck6d_coul_gauss.html, USER/mofff, no
"USER-MOLFILE"_Packages_details.html#PKG-USER-MOLFILE, "VMD"_https://www.ks.uiuc.edu/Research/vmd/ molfile plug-ins,"dump molfile"_dump_molfile.html, n/a, ext
"USER-NETCDF"_Packages_details.html#PKG-USER-NETCDF, dump output via NetCDF,"dump netcdf"_dump_netcdf.html, n/a, ext
+59 −19
Original line number Diff line number Diff line
@@ -7,36 +7,58 @@
:line

compute mop command :h3
compute mop/profile command :h3


[Syntax:]

compute ID group-ID mop dir pos keyword ... :pre
compute ID group-ID style dir args keywords ... :pre

ID, group-ID are documented in "compute"_compute.html command
mop = style name of this compute command
style = {mop} or {mop/profile}
dir = {x} or {y} or {z} is the direction normal to the plane
args = argument specific to the compute style
keywords = {kin} or {conf} or {total} (one of more can be specified) :ul
  {mop} args = pos
    pos = {lower} or {center} or {upper} or coordinate value (distance units) is the position of the plane
between one and three keywords can be appended
keyword = {kin} or {conf} or {total} :ul

[Examples:]
:link(mop-examples)
  {mop/profile} args = origin delta
    origin = {lower} or {center} or {upper} or coordinate value (distance units) is the position of the first plane
    delta = value (distance units) is the distance between planes :pre

compute 1 all mop x lower total
compute 1 liquid mop z 0.0 kin conf
fix 1 all ave/time 10 1000 10000 c_1\[*\] file mop.time
fix 1 all ave/time 10 1000 10000 c_1\[2\] file mop.time :pre

[Description:]

Define a computation that calculates components of the local stress tensor using the method of planes "(Todd)"_#mop-todd. 
Specifically 3 components are computed in directions {dir},{x}; {dir},{y}; and {dir},{z}; where {dir} is the direction normal to the plane. 
compute 1 all mop/profile x lower 0.1 total
compute 1 liquid mop/profile z 0.0 0.25 kin conf
fix 1 all ave/time 500 20 10000 c_1\[*\] ave running overwrite file mopp.time mode vector :pre

Contrary to methods based on histograms of atomic stress (i.e. using "compute stress/atom"_compute_stress_atom.html), the method of planes is compatible with mechanical balance in heterogeneous systems and at interfaces "(Todd)"_#mop-todd. 

The stress tensor is the sum of a kinetic term and a configurational term, which are given respectively by Eq. (21) and Eq. (16) in "(Todd)"_#mop-todd. For the kinetic part, the algorithm considers that atoms have crossed the plane if their positions at times t-dt and t are one on either side of the plane, and uses the velocity at time t-dt/2 given by the velocity-Verlet algorithm. 
[Description:]

Between one and three keywords can be used to indicate which contributions to the stress must be computed: kinetic stress (kin), configurational stress (conf), and/or total stress (total). 
Compute {mop} and compute {mop/profile} define computations that
calculate components of the local stress tensor using the method of
planes "(Todd)"_#mop-todd.  Specifically in compute {mop} calculates 3
components are computed in directions {dir},{x}; {dir},{y}; and
{dir},{z}; where {dir} is the direction normal to the plane, while
in compute {mop/profile} the profile of the stress is computed.

Contrary to methods based on histograms of atomic stress (i.e. using
"compute stress/atom"_compute_stress_atom.html), the method of planes is
compatible with mechanical balance in heterogeneous systems and at
interfaces "(Todd)"_#mop-todd.

The stress tensor is the sum of a kinetic term and a configurational
term, which are given respectively by Eq. (21) and Eq. (16) in
"(Todd)"_#mop-todd. For the kinetic part, the algorithm considers that
atoms have crossed the plane if their positions at times t-dt and t are
one on either side of the plane, and uses the velocity at time t-dt/2
given by the velocity-Verlet algorithm.

Between one and three keywords can be used to indicate which
contributions to the stress must be computed: kinetic stress (kin),
configurational stress (conf), and/or total stress (total).

NOTE 1: The configurational stress is computed considering all pairs of atoms where at least one atom belongs to group group-ID. 

@@ -46,21 +68,39 @@ yes"_pair_modify.html command, since those are contributions to the global syste

[Output info:]

This compute calculates a global vector (indices starting at 1), with 3 values for each declared keyword (in the order the keywords have been declared). For each keyword, the stress tensor components are ordered as follows: stress_dir,x, stress_dir,y, and stress_dir,z. 
Compute {mop} calculates a global vector (indices starting at 1), with 3
values for each declared keyword (in the order the keywords have been
declared). For each keyword, the stress tensor components are ordered as
follows: stress_dir,x, stress_dir,y, and stress_dir,z.

Compute {mop/profile} instead calculates a global array, with 1 column
giving the position of the planes where the stress tensor was computed,
and with 3 columns of values for each declared keyword (in the order the
keywords have been declared). For each keyword, the profiles of stress
tensor components are ordered as follows: stress_dir,x; stress_dir,y;
and stress_dir,z.

The values are in pressure "units"_units.html. 

The values produced by this compute can be accessed by various "output commands"_Section_howto.html#howto_15. For instance, the results can be written to a file using the "fix ave/time"_fix_ave_time.html command, see "Examples"_#mop-examples above.
The values produced by this compute can be accessed by various "output commands"_Howto_output.html. For instance, the results can be written to a file using the "fix ave/time"_fix_ave_time.html command. Please see the example in the examples/USER/mop folder.

[Restrictions:] 

The method is only implemented for 3d orthogonal simulation boxes whose size does not change in time, and axis-aligned planes.  
This style is part of the USER-MOP package. It is only enabled if LAMMPS
is built with that package. See the "Build package"_Build_package.html
doc page on for more info.

The method is only implemented for 3d orthogonal simulation boxes whose
size does not change in time, and axis-aligned planes.

The method only works with two-body pair interactions, because it requires the class method pair->single() to be implemented. In particular, it does not work with more than two-body pair interactions, intra-molecular interactions, and long range (kspace) interactions. 
The method only works with two-body pair interactions, because it
requires the class method pair->single() to be implemented. In
particular, it does not work with more than two-body pair interactions,
intra-molecular interactions, and long range (kspace) interactions.

[Related commands:]

"compute mop/profile"_compute_mop_profile.html, "compute stress/atom"_compute_stress_atom.html
"compute stress/atom"_compute_stress_atom.html

[Default:] none

+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ Computes :h1
   compute_meso_e_atom
   compute_meso_rho_atom
   compute_meso_t_atom
   compute_mop
   compute_msd
   compute_msd_chunk
   compute_msd_nongauss
Loading