Dear LAMMPS Community,
I am a beginner in LAMMPS and I am currently trying to simulate a crystalline metallic glass. I would appreciate it if someone could take a look at the script below and let me know if this part is correct or if there are any errors.
#simulation
clear
units metal
dimension 3
boundary p p p
atom_style atomic
variable n_iter equal 20000
#Initialize-simulation
region box block 0 30 0 30 0 30 units box
create_box 2 box
lattice fcc 3.516
region Ni block 0 30 0 30 0 30 units box
create_atoms 2 region X units box
#composition
set region X type/fraction 1 0.733 123
#Mass x1
mass 1 X
#Mass x2
mass 2 X
#---------potential
pair_style eam/fs
pair_coeff * * xx.eam.fs X X
neighbor 0.3 bin
neigh_modify every 20 delay 0 check yes
timestep 0.001
compute ep all pe/atom
compute ek all ke/atom
velocity all create 300.0 87287
fix 1 all npt temp 300.0 2500.0 0.005 iso 0.0 0.0 0.1
thermo 3000
thermo_style custom step temp pe etotal press vol enthalpy density
dump dump_1 all custom 3000 heating.lammpstrj id type x y z c_ep c_ek
run 440000
unfix 1
undump dump_1
Thank you very much for your time and help!
That input is obviously incomplete, cannot run, and has multiple syntax and logical errors.
Please come back with in input that can actually be tested.
Thank you very much, sir, for your reply and your time.
I have tested the input script and it runs successfully.
Below I am sharing the complete script so, Please you can check if there are any remaining errors, and if so, I would really appreciate it if you could suggest the correct version.
neighbor 0.3 bin
neigh_modify every 20 delay 0 check yes
timestep 0.001
compute ep all pe/atom
compute ek all ke/atom
velocity all create 300.0 87287
fix 1 all npt temp 300.0 2500.0 0.005 iso 0.0 0.0 0.1
thermo 3000
thermo_style custom step temp pe etotal press vol enthalpy density
dump dump_1 all custom 3000 heating.lammpstrj id type x y z c_ep c_ek
run 440000
unfix 1
undump dump_1
fix 2 all nvt temp 2500.0 2500.0 0.10 drag 0.2
thermo 1000
thermo_style custom step temp pe etotal press vol enthalpy density
dump dump_2 all custom 1000 relaxion.lammpstrj id type x y z c_ep c_ek
run 100000
unfix 2
undump dump_2
fix 3 all npt temp 2500.0 300.0 0.10 iso 0.0 100000.0 0.2
thermo 3000
thermo_style custom step temp pe etotal press vol enthalpy density
dump dump_3 all custom 3000 cooling.lammpstrj id type x y z c_ep c_ek
run 22000000
unfix 3
undump dump_3
fix 4 all nvt temp 300.0 300.0 0.10 drag 0.2
thermo 3000
thermo_style custom step temp pe etotal press vol enthalpy density lx ly lz
dump dump_4 all custom 3000 relaxationfinal.lammpstrj id type x y z c_ep c_ek
run 100000
unfix 4
undump dump_4
Thank you again for your help and patience!
This script is still very obviously incomplete and thus not correct and cannot run:
LAMMPS (30 Mar 2026 - Development - patch_30Mar2026-341-g71a77305ae)
using 1 OpenMP thread(s) per MPI task
ERROR: Velocity command before simulation box is defined
For more information see https://docs.lammps.org/err0033 (src/velocity.cpp:54)
Last input line: velocity all create 300.0 87287
As I wrote before, it is your job to follow the documentation and to check that a simulation does what you expect it to do and that there are no unexpected warnings or errors in output. The purpose of this forum is not to do your job for you. You have to have more specific questions or requests than “correct the errors in my input”. Please also see the post with guidelines and suggestions for this forum.