mirror of https://github.com/lammps/lammps.git
Added data output example
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14468 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
eb105410ad
commit
4da36d1c01
|
@ -26,25 +26,21 @@ pair_style lj/cut ${rcut}
|
|||
pair_coeff 1 1 0.0 1.0
|
||||
|
||||
neighbor ${rskin} nsq
|
||||
neigh_modify delay 10
|
||||
|
||||
# set the minimum communication cut-off
|
||||
comm_modify cutoff ${rcomm}
|
||||
|
||||
compute v1 all voronoi/atom neighbors yes
|
||||
compute volvor all reduce sum c_v1[1]
|
||||
variable volsys equal lz*lx*ly
|
||||
variable err equal c_volvor-v_volsys
|
||||
thermo_style custom c_volvor v_volsys vol v_err
|
||||
thermo 1
|
||||
|
||||
#
|
||||
# TEST 1: Volume check for 2d bulk system
|
||||
#
|
||||
|
||||
compute v1 all voronoi/atom neighbors yes
|
||||
dump d1 all custom 1 dump.voro id type x y z c_v1[1] c_v1[2]
|
||||
dump d2 all local 1 dump.neighbors index c_v1[1] c_v1[2] c_v1[3]
|
||||
|
||||
compute volvor all reduce sum c_v1[1]
|
||||
variable volsys equal lz*lx*ly
|
||||
variable err equal c_volvor-v_volsys
|
||||
thermo_style custom c_volvor v_volsys vol v_err
|
||||
run 0
|
||||
|
||||
#
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
# Exercise different output data options
|
||||
|
||||
variable len equal 4.0
|
||||
variable lenz equal 10.0
|
||||
|
||||
dimension 2
|
||||
units metal
|
||||
boundary f f p
|
||||
|
||||
lattice hex 1.0 origin 0.25 0.25 0.0
|
||||
|
||||
atom_style atomic
|
||||
|
||||
region box block 0 ${len} 0 ${len} 0.0 ${lenz}
|
||||
region atoms block 0 ${len} 0 ${len} 0.0 0.0
|
||||
create_box 1 box
|
||||
create_atoms 1 region atoms
|
||||
|
||||
mass 1 1.0
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 0.0 1.0
|
||||
|
||||
neighbor 1.0 nsq
|
||||
|
||||
#
|
||||
# TEST 1:
|
||||
#
|
||||
|
||||
# This compute voronoi generates all three
|
||||
# types of quantity: per-atom, local, and global
|
||||
|
||||
compute v1 all voronoi/atom neighbors yes edge_histo 6
|
||||
|
||||
# write voronoi per-atom quantities to a file
|
||||
|
||||
dump dperatom all custom 1 dump.voro id type x y z c_v1[1] c_v1[2]
|
||||
|
||||
# writing voronoi local quantities to a file
|
||||
|
||||
dump dlocal all local 1 dump.neighbors index c_v1[1] c_v1[2] c_v1[3]
|
||||
|
||||
# sum up a voronoi per-atom quantity
|
||||
|
||||
compute volvor all reduce sum c_v1[1]
|
||||
|
||||
variable volsys equal lz*lx*ly
|
||||
variable err equal c_volvor-v_volsys
|
||||
|
||||
# output voronoi global quantities
|
||||
|
||||
thermo_style custom c_volvor v_volsys vol v_err c_v1[3] c_v1[4] c_v1[5] c_v1[6] c_v1[7]
|
||||
thermo 1
|
||||
|
||||
run 0
|
||||
|
||||
uncompute v1
|
||||
uncompute volvor
|
||||
undump dperatom
|
||||
undump dlocal
|
||||
|
||||
#
|
||||
# TEST 2:
|
||||
#
|
||||
|
||||
# This compute voronoi generates
|
||||
# local and global quantities, but
|
||||
# not per-atom quantities
|
||||
|
||||
compute v2 all voronoi/atom neighbors yes edge_histo 6 peratom no
|
||||
|
||||
# write voronoi local quantities to a file
|
||||
|
||||
dump d2 all local 1 dump.neighbors2 index c_v2[1] c_v2[2] c_v2[3]
|
||||
|
||||
# sum up a voronoi local quantity
|
||||
|
||||
compute sumarea all reduce sum c_v2[3]
|
||||
|
||||
# output voronoi global quantities
|
||||
|
||||
thermo_style custom c_sumarea c_v2[3] c_v2[4] c_v2[5] c_v2[6] c_v2[7]
|
||||
thermo 1
|
||||
|
||||
run 0
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue