1 # Demonstrate MLIAP interface to SNAP nn Cu potential 2 3 # Initialize simulation 4 5 variable nsteps index 100 6 variable nrep equal 4 7 variable a equal 3.621262 8 units metal 9 10 # generate the box and atom positions using a FCC lattice 11 12 variable nx equal ${nrep} 13 variable ny equal ${nrep} 14 variable nz equal ${nrep} 15 16 boundary p p p 17 18 lattice fcc $a 19 region box block 0 ${nx} 0 ${ny} 0 ${nz} 20 create_box 1 box 21 create_atoms 1 box 22 23 mass 1 63.546 24 25 # choose potential 26 27 pair_style mliap model nn Cu.nn.mliap.model descriptor sna Cu.snap.mliap.descriptor 28 pair_coeff * * Cu 29 30 # Setup output 31 32 compute eatom all pe/atom 33 compute energy all reduce sum c_eatom 34 35 compute satom all stress/atom NULL 36 compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] 37 variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) 38 39 thermo_style custom step temp epair c_energy etotal press v_press 40 thermo 10 41 thermo_modify norm yes 42 43 # Set up NVE run 44 45 timestep 0.5e-3 46 neighbor 1.0 bin 47 neigh_modify once no every 1 delay 0 check yes 48 49 # Run MD 50 51 velocity all create 300.0 4928459 loop geom 52 fix 1 all nve 53 run ${nsteps} 54