Files
lammps/examples/snap/in.grid.pair

77 lines
1.5 KiB
Plaintext

# Demonstrate pair style base on sna/grid
# Initialize simulation
variable dt index 0.5e-5
variable nthermo index 100
variable nsteps index 10000
variable nrep index 3
variable a index 3.0
variable ngrid index 2
variable t index 300
variable del index 0.1
units metal
atom_modify map yes
# generate the box and atom positions using a BCC lattice
variable nx equal ${nrep}
variable ny equal ${nrep}
variable nz equal ${nrep}
boundary p p p
lattice custom $a &
a1 1 0 0 &
a2 0 1 0 &
a3 0 0 1 &
basis 0 0 0 &
basis 0.5 0.5 0.5 &
# origin 0.25 0.25 0.25
# origin 0.25e-3 0.25e-3 0.25e-3
region box block 0 ${nx} 0 ${ny} 0 ${nz}
create_box 1 box
create_atoms 1 box
displace_atoms all random ${del} ${del} ${del} 12345
mass 1 180.88
write_dump all custom test.dump id type x y z
# define grid compute and atom compute
group snapgroup type 1
variable twojmax equal 2
variable rcutfac equal 4.67637
variable rfac0 equal 0.99363
variable rmin0 equal 0
variable wj equal 1
variable radelem equal 0.5
variable bzero equal 0
variable quad equal 0
variable switch equal 1
pair_style sna/grid grid ${ngrid} ${ngrid} ${ngrid} &
${rcutfac} ${rfac0} ${twojmax} ${radelem} &
${wj} rmin0 ${rmin0} bzeroflag ${bzero} &
quadraticflag ${quad} switchflag ${switch}
pair_coeff * * Al
thermo_style custom step temp epair emol etotal press
thermo ${nthermo}
thermo_modify norm yes
# Set up NVE run
timestep ${dt}
neighbor 1.0 bin
neigh_modify once no every 1 delay 0 check yes
# Run MD
velocity all create $t 4928459 loop geom
fix 1 all nve
run ${nsteps}