I prepared the following restart scritp.
read_restart restart.run.750000.tio2.t1273.p1.01325 LAMMPS restart file
Some constants
variable tequi equal 1273 # equilibrium temperature, K
variable pequi equal 1.01325 # equilibrium pressure, bat
variable nrun equal 1000000 # number of running steps
variable nrestart equal 25000 # number of steps before a new restart file is output
variable ndump equal 25000 # number of steps between dumps
variable ndt equal 0.001 # timestep, picoseconds
variable damp equal 100 # T damp in timesteps units (recommended by the manual), same value is applied for T and P
variable nthermomd equal 10000 # number of fix output results for molecular dynamics calculation
log log.tio2.t${tequi}.p${pequi}.max${nrun}
type1 = O e type2 = Ti
group type1 type 1
compute charge1 type1 property/atom q
compute q1 type1 reduce ave c_charge1
group type2 type 2
compute charge2 type2 property/atom q
compute q2 type2 reduce ave c_charge2
variable qcat equal 4.
variable qani equal -${qcat}*count(type2)/count(type1)
set group type1 charge ${qani}
set group type2 charge ${qcat}
variable qsum equal count(type1)*c_q1+count(type2)*c_q2
pair_style hybrid/overlay eam/alloy coul/ctip 0.3 12.
pair_coeff * * coul/ctip TiO.ctip O Ti
pair_coeff * * eam/alloy HfNbZrTiTaO.eam.alloy O Ti
fix qeq all qeq/ctip 1 15.0 1.0e-8 200 coul/ctip cdamp 0.30 maxrepeat 10
timestep ${ndt}
Compute the energy per atom
compute eperat all pe/atom
Compute the average energy per atom for all atoms
compute meperat all reduce ave c_eperat
Compute the temperature
compute T1 all temp
Thermodynamic output
thermo_style custom step temp c_meperat pe lx ly lz pxx pyy pzz c_q1 c_q2 v_qsum press
thermo_modify warn default norm yes
thermo v_nthermomd
dump of atom positions
dump 1 all custom {ndump} dump.tio2.t{tequi}.p${pequi}.max${nrun} id type x y z c_eperat
#Dynamics
fix npt1 all npt temp {tequi} {tequi} (v_damp*dt) iso {pequi} {pequi} (v_damp*dt)
restart v_nrestart restart.run.*.tio2.t${tequi}.p${pequi}
run ${nrun}
I got the following output with error.
LAMMPS (10 Dec 2025)
using 4 OpenMP thread(s) per MPI task
Reading restart file …
restart file = 10 Dec 2025, LAMMPS = 10 Dec 2025
restoring atom style charge from restart
orthogonal box = (-0.39624574 -0.39624574 -0.42692949) to (26.887746 26.887746 28.969829)
1 by 1 by 1 MPI processor grid
pair style hybrid/overlay stores no restart info
1764 atoms
read_restart CPU = 0.005 seconds
1176 atoms in group type1
588 atoms in group type2
Setting atom values …
1176 settings made for charge
Setting atom values …
588 settings made for charge
Reading coul/ctip potential file TiO.ctip with DATE: 2022-04-28,
Resetting global fix info from restart file:
fix style: npt, fix ID: npt1
All restart file global fix info was re-assigned
Neighbor list info …
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 14
ghost atom cutoff = 14
binsize = 7, bins = 4 4 5
3 neighbor lists, perpetual/occasional/extra = 3 0 0
(1) pair eam/alloy, perpetual, half/full from (3)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
(2) pair coul/ctip, perpetual, half/full from (3)
attributes: half, newton on, cut 14
pair build: halffull/newton
stencil: none
bin: none
(3) fix qeq/ctip, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Setting up Verlet run …
Unit style : metal
Current step : 750000
Time step : 0.001
Per MPI rank memory allocation (min/avg/max) = 48.17 | 48.17 | 48.17 Mbytes
Step Temp c_meperat PotEng Lx Ly Lz Pxx Pyy Pzz c_q1 c_q2 v_qsum Press
750000 1263.3956 -1.9700289 -1.9700289 27.283991 27.283991 29.396759 19217.216 20729.941 -48892.856 0.11993657 -0.23987313 -1.9895197e-13 -2981.8999
ERROR: Thermo every variable returned a bad timestep (src/output.cpp:223)
Last input line: run ${nrun}
I cannot see the reason for the error. I hope someone may help me. Furthermore, I had restarted the computation without problems using the same script but with different restart files.
Thanks,
Roberto