forked from lijiext/lammps
198 lines
7.2 KiB
Groff
198 lines
7.2 KiB
Groff
LAMMPS (15 Jun 2020)
|
|
# Demonstrate bispectrum computes
|
|
|
|
# initialize simulation
|
|
|
|
variable nsteps index 0
|
|
variable nrep equal 1
|
|
variable a equal 2.0
|
|
units metal
|
|
|
|
# generate the box and atom positions using a BCC lattice
|
|
|
|
variable nx equal ${nrep}
|
|
variable nx equal 1
|
|
variable ny equal ${nrep}
|
|
variable ny equal 1
|
|
variable nz equal ${nrep}
|
|
variable nz equal 1
|
|
|
|
boundary p p p
|
|
|
|
atom_modify map hash
|
|
lattice bcc $a
|
|
lattice bcc 2
|
|
Lattice spacing in x,y,z = 2 2 2
|
|
region box block 0 ${nx} 0 ${ny} 0 ${nz}
|
|
region box block 0 1 0 ${ny} 0 ${nz}
|
|
region box block 0 1 0 1 0 ${nz}
|
|
region box block 0 1 0 1 0 1
|
|
create_box 2 box
|
|
Created orthogonal box = (0.0 0.0 0.0) to (2.0 2.0 2.0)
|
|
1 by 2 by 2 MPI processor grid
|
|
create_atoms 2 box
|
|
Created 2 atoms
|
|
create_atoms CPU = 0.001 seconds
|
|
|
|
mass * 180.88
|
|
|
|
displace_atoms all random 0.1 0.1 0.1 123456
|
|
|
|
# choose SNA parameters
|
|
|
|
variable twojmax equal 2
|
|
variable rcutfac equal 1.0
|
|
variable rfac0 equal 0.99363
|
|
variable rmin0 equal 0
|
|
variable radelem1 equal 2.3
|
|
variable radelem2 equal 2.0
|
|
variable wj1 equal 1.0
|
|
variable wj2 equal 0.96
|
|
variable quadratic equal 0
|
|
variable bzero equal 0
|
|
variable switch equal 0
|
|
variable snap_options string "${rcutfac} ${rfac0} ${twojmax} ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}"
|
|
1 ${rfac0} ${twojmax} ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 ${twojmax} ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 2.3 ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 2.3 2 ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 2.3 2 1 ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 2.3 2 1 0.96 rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 0 bzeroflag ${bzero} switchflag ${switch}
|
|
1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 0 bzeroflag 0 switchflag ${switch}
|
|
1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 0 bzeroflag 0 switchflag 0
|
|
|
|
# set up dummy potential to satisfy cutoff
|
|
|
|
pair_style zero ${rcutfac}
|
|
pair_style zero 1
|
|
pair_coeff * *
|
|
|
|
# set up reference potential
|
|
|
|
variable zblcutinner equal 4
|
|
variable zblcutouter equal 4.8
|
|
variable zblz equal 73
|
|
pair_style zbl ${zblcutinner} ${zblcutouter}
|
|
pair_style zbl 4 ${zblcutouter}
|
|
pair_style zbl 4 4.8
|
|
pair_coeff * * ${zblz} ${zblz}
|
|
pair_coeff * * 73 ${zblz}
|
|
pair_coeff * * 73 73
|
|
|
|
# set up per-atom computes
|
|
|
|
compute b all sna/atom ${snap_options}
|
|
compute b all sna/atom 1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 0 bzeroflag 0 switchflag 0
|
|
compute vb all snav/atom ${snap_options}
|
|
compute vb all snav/atom 1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 0 bzeroflag 0 switchflag 0
|
|
compute db all snad/atom ${snap_options}
|
|
compute db all snad/atom 1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 0 bzeroflag 0 switchflag 0
|
|
|
|
# perform sums over atoms
|
|
|
|
group snapgroup1 type 1
|
|
0 atoms in group snapgroup1
|
|
group snapgroup2 type 2
|
|
2 atoms in group snapgroup2
|
|
compute bsum1 snapgroup1 reduce sum c_b[*]
|
|
compute bsum2 snapgroup2 reduce sum c_b[*]
|
|
# fix bsum1 all ave/time 1 1 1 c_bsum1 file bsum1.dat mode vector
|
|
# fix bsum2 all ave/time 1 1 1 c_bsum2 file bsum2.dat mode vector
|
|
compute vbsum all reduce sum c_vb[*]
|
|
# fix vbsum all ave/time 1 1 1 c_vbsum file vbsum.dat mode vector
|
|
variable db_2_25 equal c_db[2][25]
|
|
|
|
# set up compute snap generating global array
|
|
|
|
compute snap all snap ${snap_options}
|
|
compute snap all snap 1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 0 bzeroflag 0 switchflag 0
|
|
fix snap all ave/time 1 1 1 c_snap[*] file compute.snap.dat mode vector
|
|
|
|
thermo 100
|
|
|
|
# test output: 1: total potential energy
|
|
# 2: xy component of stress tensor
|
|
# 3: Sum(B_{000}^i, all i of type 2)
|
|
# 4: xz component of Sum(Sum(r_j*dB_{222}^i/dR[j]), all i of type 2), all j)
|
|
# 5: y component of -Sum(d(B_{222}^i)/dR[2]), all i of type 2)
|
|
#
|
|
# followed by 5 counterparts from compute snap
|
|
|
|
thermo_style custom pe pxy c_bsum2[1] c_vbsum[55] v_db_2_25 c_snap[1][11] c_snap[13][11] c_snap[1][6] c_snap[12][10] c_snap[6][10]
|
|
thermo_modify norm no
|
|
|
|
# dump mydump_db all custom 1000 dump_db id c_db[*]
|
|
# dump_modify mydump_db sort id
|
|
|
|
# Run MD
|
|
|
|
run ${nsteps}
|
|
run 0
|
|
Neighbor list info ...
|
|
update every 1 steps, delay 10 steps, check yes
|
|
max neighbors/atom: 2000, page size: 100000
|
|
master list distance cutoff = 6.8
|
|
ghost atom cutoff = 6.8
|
|
binsize = 3.4, bins = 1 1 1
|
|
5 neighbor lists, perpetual/occasional/extra = 1 4 0
|
|
(1) pair zbl, perpetual
|
|
attributes: half, newton on
|
|
pair build: half/bin/atomonly/newton
|
|
stencil: half/bin/3d/newton
|
|
bin: standard
|
|
(2) compute sna/atom, occasional
|
|
attributes: full, newton on
|
|
pair build: full/bin/atomonly
|
|
stencil: full/bin/3d
|
|
bin: standard
|
|
(3) compute snav/atom, occasional
|
|
attributes: full, newton on
|
|
pair build: full/bin/atomonly
|
|
stencil: full/bin/3d
|
|
bin: standard
|
|
(4) compute snad/atom, occasional
|
|
attributes: full, newton on
|
|
pair build: full/bin/atomonly
|
|
stencil: full/bin/3d
|
|
bin: standard
|
|
(5) compute snap, occasional
|
|
attributes: full, newton on
|
|
pair build: full/bin/atomonly
|
|
stencil: full/bin/3d
|
|
bin: standard
|
|
WARNING: Proc sub-domain size < neighbor skin, could lead to lost atoms (../domain.cpp:964)
|
|
Per MPI rank memory allocation (min/avg/max) = 9.945 | 9.988 | 10.03 Mbytes
|
|
PotEng Pxy c_bsum2[1] c_vbsum[55] v_db_2_25 c_snap[1][11] c_snap[13][11] c_snap[1][6] c_snap[12][10] c_snap[6][10]
|
|
322.86952 1505558.1 364182.88 -240.25066 1381.7961 322.86952 1505558.1 364182.88 -240.25066 1381.7961
|
|
Loop time of 2.75e-06 on 4 procs for 0 steps with 2 atoms
|
|
|
|
90.9% CPU use with 4 MPI tasks x no 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 | 0 | 0 | 0.0 | 0.00
|
|
Output | 0 | 0 | 0 | 0.0 | 0.00
|
|
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
|
Other | | 2.75e-06 | | |100.00
|
|
|
|
Nlocal: 0.5 ave 1 max 0 min
|
|
Histogram: 2 0 0 0 0 0 0 0 0 2
|
|
Nghost: 734.5 ave 735 max 734 min
|
|
Histogram: 2 0 0 0 0 0 0 0 0 2
|
|
Neighs: 82.5 ave 177 max 0 min
|
|
Histogram: 2 0 0 0 0 0 0 0 1 1
|
|
FullNghs: 165 ave 330 max 0 min
|
|
Histogram: 2 0 0 0 0 0 0 0 0 2
|
|
|
|
Total # of neighbors = 660
|
|
Ave neighs/atom = 330
|
|
Neighbor list builds = 0
|
|
Dangerous builds = 0
|
|
Total wall time: 0:00:00
|