LAMMPS (15 Jun 2020)
# Demonstrate MLIAP interface to SNAP W-Be potential

# Initialize simulation

variable nsteps index 100
variable nrep equal 4
variable a equal 3.1803
units           metal

# generate the box and atom positions using a BCC lattice

variable nx equal ${nrep}
variable nx equal 4
variable ny equal ${nrep}
variable ny equal 4
variable nz equal ${nrep}
variable nz equal 4

boundary        p p p

lattice         bcc $a
lattice         bcc 3.1803
Lattice spacing in x,y,z = 3.1803 3.1803 3.1803
region          box block 0 ${nx} 0 ${ny} 0 ${nz}
region          box block 0 4 0 ${ny} 0 ${nz}
region          box block 0 4 0 4 0 ${nz}
region          box block 0 4 0 4 0 4
create_box      2 box
Created orthogonal box = (0.0 0.0 0.0) to (12.7212 12.7212 12.7212)
  1 by 2 by 2 MPI processor grid
create_atoms    1 box
Created 128 atoms
  create_atoms CPU = 0.000 seconds
mass 1 183.84
mass 2 9.012182

set     group all type/fraction 2 0.05 3590153 # Change 5% of W to He
  5 settings made for type/fractiongroup   tungsten         type 1
123 atoms in group tungsten
group   beryllium        type 2
5 atoms in group beryllium
# choose potential

include WBe_Wood_PRB2019.mliap
# DATE: 2019-09-18 UNITS: metal CONTRIBUTOR: Mary Alice Cusentino mcusent@sandia.gov CITATION: M.A. Wood, M.A. Cusentino, B.D. Wirth, and A.P. Thompson, "Data-driven material models for atomistic simulation", Physical Review B 99, 184305 (2019)
# Definition of SNAP+ZBL potential.
variable zblcutinner equal 4
variable zblcutouter equal 4.8
variable zblz1 equal 74
variable zblz2 equal 4

# Specify hybrid with SNAP and ZBL

pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} mliap model linear WBe_Wood_PRB2019.mliap.model descriptor sna WBe_Wood_PRB2019.mliap.descriptor
pair_style hybrid/overlay zbl 4 ${zblcutouter} mliap model linear WBe_Wood_PRB2019.mliap.model descriptor sna WBe_Wood_PRB2019.mliap.descriptor
pair_style hybrid/overlay zbl 4 4.8 mliap model linear WBe_Wood_PRB2019.mliap.model descriptor sna WBe_Wood_PRB2019.mliap.descriptor
Reading potential file WBe_Wood_PRB2019.mliap.model with DATE: 2019-09-18
Reading potential file WBe_Wood_PRB2019.mliap.descriptor with DATE: 2019-09-18
SNAP keyword rcutfac 4.8123 
SNAP keyword twojmax 8 
SNAP keyword nelems 2 
SNAP keyword elems W 
SNAP keyword radelems 0.5 
SNAP keyword welems 1 
SNAP keyword rfac0 0.99363 
SNAP keyword rmin0 0 
SNAP keyword bzeroflag 1 
pair_coeff 1 1 zbl ${zblz1} ${zblz1}
pair_coeff 1 1 zbl 74 ${zblz1}
pair_coeff 1 1 zbl 74 74
pair_coeff 1 2 zbl ${zblz1} ${zblz2}
pair_coeff 1 2 zbl 74 ${zblz2}
pair_coeff 1 2 zbl 74 4
pair_coeff 2 2 zbl ${zblz2} ${zblz2}
pair_coeff 2 2 zbl 4 ${zblz2}
pair_coeff 2 2 zbl 4 4
pair_coeff * * mliap   W Be


# Setup output

compute  eatom all pe/atom
compute  energy all reduce sum c_eatom

compute  satom all stress/atom NULL
compute  str all reduce sum c_satom[1] c_satom[2] c_satom[3]
variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol)

thermo_style    custom step temp epair c_energy etotal press v_press
thermo          10
thermo_modify norm yes

# Set up NVE run

timestep 0.5e-3
neighbor 1.0 bin
neigh_modify once no every 1 delay 0 check yes

# Run MD

velocity all create 300.0 4928459 loop geom
fix 1 all nve
run             ${nsteps}
run             100
Neighbor list info ...
  update every 1 steps, delay 0 steps, check yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 5.8123
  ghost atom cutoff = 5.8123
  binsize = 2.90615, bins = 5 5 5
  2 neighbor lists, perpetual/occasional/extra = 2 0 0
  (1) pair zbl, perpetual, half/full from (2)
      attributes: half, newton on
      pair build: halffull/newton
      stencil: none
      bin: none
  (2) pair mliap, perpetual
      attributes: full, newton on
      pair build: full/bin/atomonly
      stencil: full/bin/3d
      bin: standard
Per MPI rank memory allocation (min/avg/max) = 6.793 | 6.793 | 6.793 Mbytes
Step Temp E_pair c_energy TotEng Press v_press 
       0          300   -8.5980876   -8.5980876   -8.5596125   -35284.855    35284.855 
      10    296.32664   -8.5976164   -8.5976164   -8.5596124   -35188.339    35188.339 
      20    282.41417    -8.595832    -8.595832   -8.5596123   -34782.293    34782.293 
      30    259.69014   -8.5929175   -8.5929175   -8.5596121   -34113.316    34113.316 
      40    230.50415   -8.5891741   -8.5891741   -8.5596119   -33260.777    33260.777 
      50    197.88816   -8.5849908   -8.5849908   -8.5596116   -32309.975    32309.975 
      60    165.27259   -8.5808076   -8.5808076   -8.5596113   -31365.766    31365.766 
      70    136.15697   -8.5770733   -8.5770733   -8.5596111   -30542.657    30542.657 
      80    113.58947   -8.5741788   -8.5741788   -8.5596109    -29939.23     29939.23 
      90    99.477916    -8.572369    -8.572369   -8.5596109   -29619.939    29619.939 
     100    94.121939   -8.5716822   -8.5716822    -8.559611   -29598.002    29598.002 
Loop time of 0.897476 on 4 procs for 100 steps with 128 atoms

Performance: 4.813 ns/day, 4.986 hours/ns, 111.424 timesteps/s
99.7% 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.84854    | 0.85737    | 0.87512    |   1.1 | 95.53
Neigh   | 0          | 0          | 0          |   0.0 |  0.00
Comm    | 0.021045   | 0.038782   | 0.047601   |   5.3 |  4.32
Output  | 0.00061    | 0.0006525  | 0.000774   |   0.0 |  0.07
Modify  | 0.00011    | 0.00011375 | 0.000117   |   0.0 |  0.01
Other   |            | 0.0005625  |            |       |  0.06

Nlocal:    32 ave 32 max 32 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost:    431 ave 431 max 431 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Neighs:    928 ave 928 max 928 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs:  1856 ave 1856 max 1856 min
Histogram: 4 0 0 0 0 0 0 0 0 0

Total # of neighbors = 7424
Ave neighs/atom = 58
Neighbor list builds = 0
Dangerous builds = 0

Total wall time: 0:00:00
