Hello everyone,
I have been getting the error " Per-atom virial was not tallied on needed timestep" or sometimes its “energy” instead of “virial.”
I had seen the previous mails on this subject earlier and did not find anything. Moreover I cannot find those emails in the archive now. Can someone please explain why we get this error?
I have seen that I get the error when I change the dump frequency of either a energy/atom or stress/atom compute.
Written below, is a small sample input file where I get the error during the 3rd run after the 7000th timestep. I have tried to reduce the size of the problem while keeping it as similar as possible to my original system, hence the 3 runs.
Basic settings
units metal
dimension 3
boundary p p p
atom_style atomic
neighbor settings
neighbor 2 bin
neigh_modify delay 1
create geometry, unit 3.524 A
lattice fcc 3.524
region box block -20 20 -20 20 -2.5 2.5
#create_atoms
create_box 1 box
create_atoms 1 box
mass 2 58.71
EAM potentials
pair_style eam
pair_coeff * * //Ni_u3.eam
********** Define groups ************
Boundary atoms
region btop block INF INF 19 INF INF INF
region bbot block INF INF INF -19 INF INF
group btop region btop
group bbot region bbot
group boundary union btop bbot
group mobile subtract all boundary
A region in the middle to dump atoms
region dumpregion block -10 10 -10 10 INF INF
group dumpregion region dumpregion
initial velocities
compute new mobile temp/deform
velocity mobile create 100 887723 temp new
compute PE and stress
compute PE all pe/atom
compute stress dumpregion stress/atom pair
fixes
fix 1 all nve
fix 2 mobile temp/rescale 100 1E-3 1E-3 0.05 0.5
fix 3 boundary setforce 0.0 0.0 0.0
run
timestep 0.001
thermo 200
thermo_modify temp new
dump 1 all cfg 1000 all_.cfg id type xs ys zs type c_PE c_stress[2]
dump 2 dumpregion cfg 1000 cfgdata_.cfg id type xs ys zs id type c_PE c_stress[2]
dump 3 dumpregion custom 20000 energy.dat c_PE c_stress[2]
run 2000
#****************** 2nd run **********************#
Fixes
unfix 1
unfix 2
fix 4 boundary setforce 0.0 0.0 0.0
fix 5 all nvt 1E-3 1E-3 5 drag 0.1
Apply fix deform to apply a strain
fix deform1 all deform 1 y delta 0 0.1 remap x
dump_modify 1 every 500
dump_modify 2 every 500
dump_modify 3 every 500
timestep 0.001
run 5000
#****************** 3rd run **********************#
strain rate: 3.524 A / 10000 timestep
unfix deform1
fix deform2 all deform 1 y delta 0 0.1 remap x
dump_modify 1 every 200
dump_modify 2 every 200
dump_modify 3 every 200
timestep 0.001
run 5000