forked from lijiext/lammps
add another example to Howto chunk doc page
This commit is contained in:
parent
82b3fad152
commit
c74f5ae416
|
@ -136,7 +136,9 @@ The "compute chunk/spread/atom"_compute_chunk_spread_atom.html command
|
||||||
spreads per-chunk values to each atom in the chunk, producing per-atom
|
spreads per-chunk values to each atom in the chunk, producing per-atom
|
||||||
values as its output. This can be useful for outputting per-chunk
|
values as its output. This can be useful for outputting per-chunk
|
||||||
values to a per-atom "dump file"_dump.html. Or for using an atom's
|
values to a per-atom "dump file"_dump.html. Or for using an atom's
|
||||||
associated chunk value in an "atom-style variable"_variable.html.
|
associated chunk value in an "atom-style variable"_variable.html. Or
|
||||||
|
as input to the "fix ave/chunk"_fix_ave_chunk.html command to
|
||||||
|
spatially average per-chunk values calculated by a per-chunk compute.
|
||||||
|
|
||||||
The "compute reduce/chunk"_compute_reduce_chunk.html command reduces a
|
The "compute reduce/chunk"_compute_reduce_chunk.html command reduces a
|
||||||
peratom value across the atoms in each chunk to produce a value per
|
peratom value across the atoms in each chunk to produce a value per
|
||||||
|
@ -184,12 +186,20 @@ compute cc1 all chunk/atom c_cluster compress yes
|
||||||
compute size all property/chunk cc1 count
|
compute size all property/chunk cc1 count
|
||||||
fix 1 all ave/histo 100 1 100 0 20 20 c_size mode vector ave running beyond ignore file tmp.histo :pre
|
fix 1 all ave/histo 100 1 100 0 20 20 c_size mode vector ave running beyond ignore file tmp.histo :pre
|
||||||
|
|
||||||
(6) An example of using a per-chunk value to apply per-atom forces to
|
(6) An example for using a per-chunk value to apply per-atom forces to
|
||||||
compress individual polymer chains (molecules) in a mixture, is
|
compress individual polymer chains (molecules) in a mixture, is
|
||||||
explained on the "compute
|
explained on the "compute
|
||||||
chunk/spread/atom"_compute_chunk_spread_atom.html command doc page.
|
chunk/spread/atom"_compute_chunk_spread_atom.html command doc page.
|
||||||
|
|
||||||
(7) An example of using one set of per-chunk values for molecule
|
(7) An example for using one set of per-chunk values for molecule
|
||||||
chunks, to create a 2nd set of micelle-scale chunks (clustered
|
chunks, to create a 2nd set of micelle-scale chunks (clustered
|
||||||
molecules, due to hydrophobicity), is explained on the "compute
|
molecules, due to hydrophobicity), is explained on the "compute
|
||||||
chunk/reduce"_compute_reduce_chunk.html command doc page.
|
chunk/reduce"_compute_reduce_chunk.html command doc page.
|
||||||
|
|
||||||
|
(8) An example for using one set of per-chunk values (dipole moment
|
||||||
|
vectors) for molecule chunks, spreading the values to each atom in
|
||||||
|
each chunk, then defining a second set of chunks as spatial bins, and
|
||||||
|
using the "fix ave/chunk"_fix_ave_chunk.html command to calulate an
|
||||||
|
average dipole moment vector for each bin. This example is explained
|
||||||
|
on the "compute chunk/spread/atom"_compute_chunk_spread_atom.html
|
||||||
|
command doc page.
|
||||||
|
|
|
@ -30,11 +30,18 @@ compute 1 all chunk/spread/atom mychunk c_com[*] c_gyration :pre
|
||||||
[Description:]
|
[Description:]
|
||||||
|
|
||||||
Define a calculation that "spreads" one or more per-chunk values to
|
Define a calculation that "spreads" one or more per-chunk values to
|
||||||
each atom in the chunk. This can be useful for creating a "dump
|
each atom in the chunk. This can be useful in several scenarios:
|
||||||
file"_dump.html where each atom lists info about the chunk it is in,
|
|
||||||
e.g. for post-processing purposes. It can also be used in "atom-style
|
For creating a "dump file"_dump.html where each atom lists info about
|
||||||
variables"_variable.html that need info about the chunk each atom is
|
the chunk it is in, e.g. for post-processing purposes. :ulb,l
|
||||||
in. Examples are given below.
|
|
||||||
|
To access chunk value in "atom-style variables"_variable.html that
|
||||||
|
need info about the chunk each atom is in. :l
|
||||||
|
|
||||||
|
To use the "fix ave/chunk"_fix_ave_chunk.html command to spatially
|
||||||
|
average per-chunk values calculated by a per-chunk compute. :l,ule
|
||||||
|
|
||||||
|
Examples are given below.
|
||||||
|
|
||||||
In LAMMPS, chunks are collections of atoms defined by a "compute
|
In LAMMPS, chunks are collections of atoms defined by a "compute
|
||||||
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
|
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
|
||||||
|
@ -148,6 +155,28 @@ thermo_style custom step etotal press v_ave :pre
|
||||||
|
|
||||||
:line
|
:line
|
||||||
|
|
||||||
|
Here is an example for using one set of chunks, defined for molecules,
|
||||||
|
to compute the dipole moment vector for each chunk. E.g. for water
|
||||||
|
molecules. Then spreading those values to each atom in each chunk.
|
||||||
|
Then defining a second set of chunks based on spatial bins. And
|
||||||
|
finally, using the "fix ave/chunk"_fix_ave_chunk.html command to
|
||||||
|
calculate an average dipole moment vector per spatial bin.
|
||||||
|
|
||||||
|
compute cmol all chunk/atom molecule
|
||||||
|
compute dipole all dipole/chunk cmol
|
||||||
|
compute spread all chunk/spread/atom cmol c_dipole\[1\] c_dipole\[2\] c_dipole\[3\]
|
||||||
|
compute cspatial all chunk/atom bin/1d z lower 0.1 units reduced
|
||||||
|
fix ave all ave/chunk 100 10 1000 cspatial c_spread\[*\] :pre
|
||||||
|
|
||||||
|
Note that the "fix ave/chunk"_fix_ave_chunk.html command requires
|
||||||
|
per-atom values as input. That is why the compute chunk/spread/atom
|
||||||
|
command is used to assign per-chunk values to each atom in the chunk.
|
||||||
|
If a molecule straddles bin boundaries, each of its atoms contributes
|
||||||
|
in a weighted manner to the average dipole moment of the spatial bin
|
||||||
|
it is in.
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
[Output info:]
|
[Output info:]
|
||||||
|
|
||||||
This compute calculates a per-atom vector or array, which can be
|
This compute calculates a per-atom vector or array, which can be
|
||||||
|
|
Loading…
Reference in New Issue