LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Regarding restart file and error:Per-atom energy was not tallied on needed timestep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Regarding restart file and error:Per-atom energy was not tallied on needed timestep


From: Prakash Makwana <pmakwana9005@...24...>
Date: Tue, 1 May 2018 15:03:51 +0530

Dear all,

LAMMPS version: 16 Mar 2018

My simulation has two stage. The first stage is working fine.I am reading the restart file of the first stage and run the second stage script.  I am getting the error like per-atom energy was not tallied on needed timestep.

I tried to debug this issue but not able to do that,

can anyone please help me with this issue.

I am attaching the script along with the potential file.
# bulk melting of aluminium

################ setting up box  ######################

units metal
atom_style full
boundary f f f
lattice fcc 4.072


#######cube making###################

region supercell sphere 0 0 0 100 units box
region mysphere sphere 0 0 0 50 units box
create_box 1 supercell
create_atoms 1 region mysphere
mass 1 26.981579
velocity all create 300.0 4928459 mom yes rot yes dist gaussian units box


###############defien the Varibles#################

variable		t equal 0.001
variable		t_int equal 300
variable		t_fin equal 1500
variable		t_demp equal "100* v_t"
variable		p_demp equal "1000* v_t"

########potential################

pair_style		eam/alloy
pair_coeff		* * Al.eam Al

##########TIMESTEP AND COMPUTE############

timestep 		0.001
compute 		pe all pe/atom
compute 		ke all ke/atom
compute 		Al_msd all msd
variable		mass_g equal mass(all,mysphere)/6.022e27
variable		vol_cm7 equal 527598.77*1.0e-24
variable		density equal v_mass_g/v_vol_cm7
variable  		peatom equal pe/atoms
variable        vmsd equal c_Al_msd[4]
variable  		vstep equal step
variable 		vtemp equal temp
variable 		vpress equal press
variable te_atom atom temp
compute dis all displace/atom

###############creting bins############################################

######bins_pe###################

#####inner_most_zone1#################

########potential_energy####################

region inner_1 sphere 0.0 0.0 0.0 10.0 units box side in
region inner_bin_1 intersect 2 mysphere inner_1
group inner_bin_1 region inner_bin_1 
variable inner_atoms_1 equal count(inner_bin_1)
compute        inner_pe_1 inner_bin_1 pe/atom 
compute        inner_peatom_1 inner_bin_1 reduce ave c_inner_pe_1
variable       inner_pebin_1 equal c_inner_peatom_1


########kinetic_energy############################
compute        inner_ke_1 inner_bin_1 ke/atom 
compute        inner_keatom_1 inner_bin_1 reduce ave c_inner_ke_1
variable       inner_kebin_1 equal c_inner_keatom_1

###########msd###########hh########

compute inner_msd_1 inner_bin_1 msd com yes
variable inner_msd_1 equal c_inner_msd_1[4]

######### Middle_layer_zone###########################

######potential_energy######################################

region box_10 sphere 0.0 0.0 0.0 20.0 units box side out
region box_11 sphere 0.0 0.0 0.0 30.0 units box side in
region mid_bin_1 intersect 2 box_10 box_11
group  mid_bin_1 region mid_bin_1 
variable mid_atoms_1 equal count(mid_bin_1)
compute        mid_pe_1 mid_bin_1 pe/atom 
compute        mid_peatom_1 mid_bin_1 reduce ave c_mid_pe_1
variable       mid_pebin_1 equal c_mid_peatom_1

############kinetic_energy###################

compute        mid_ke_1 mid_bin_1 ke/atom 
compute        mid_keatom_1 mid_bin_1 reduce ave c_mid_ke_1
variable       mid_kebin_1 equal c_mid_keatom_1



####msd###################

compute mid_msd_1 mid_bin_1 msd com yes
variable mid_msd_1 equal c_mid_msd_1[4]


##########outer_most_zone7##########################
region box_20 sphere 0.0 0.0 0.0 40 units box side out
region box_21 sphere 0.0 0.0 0.0 50 units box side in
region bin_3 intersect 2 box_20 box_21
group  bin_3 region bin_3 
variable atoms_3 equal count(bin_3)
compute        pe_3 bin_3 pe/atom 
compute        peatom_3 bin_3 reduce  ave c_pe_3
variable       pebin_3 equal c_peatom_3

##########bin_ke######################
compute        ke_3 bin_3 ke/atom 
compute        keatom_3 bin_3 reduce  ave c_ke_3
variable       kebin_3 equal c_keatom_3

############bin msd ##################

compute 19 all msd  
variable sph_msd equal c_19[4]


compute  14 bin_3 msd 
variable msd_3 equal c_14[4]




###### print the MSD DENSIty and PEATOM in file##############

run 0


print "# vstep vtemp inner_pebin_1  inner_kebin_1  inner_msd_1  inner_atoms_1 " file stage1/stage1_inner_0.1_1.txt 

fix inner all print 100 "${vstep} ${vtemp} ${inner_pebin_1} ${inner_kebin_1}  ${inner_msd_1}  ${inner_atoms_1} " append stage1/stage1_inner_0.1_1.txt screen no

print "# vstep vtemp mid_pebin_1  mid_kebin_1  mid_msd_1  mid_atoms_1 " file stage1/stage1_mid_0.1_1.txt 

fix mid all print 100 "${vstep} ${vtemp} ${mid_pebin_1}  ${mid_kebin_1} ${mid_msd_1} ${mid_atoms_1}" append stage1/stage1_mid_0.1_1.txt screen no

print "# vstep vtemp pebin_1  kebin_1  msd_1  atoms_1 " file stage1/stage1_outer_0.1_1.txt 

fix mid all print 100 "${vstep} ${vtemp} ${pebin_3}  ${kebin_3} ${msd_3} ${atoms_3} " append stage1/stage1_outer_0.1_1.txt screen no


########therom and Dump ##############################
reset_timestep 0

thermo			100
thermo_style 	custom	step temp pe ke press pxx  pyy pzz v_sph_msd
dump 			1 all custom 100 stage1/stage1.dump id type x y z vx vy vz c_pe c_ke c_dis[4]


##########FIX the ensemble and file gneration##########


log stage1/log.int_equi
fix 5 all nvt temp ${t_int} ${t_int} ${t_demp} 
fix 6 all recenter INIT INIT INIT  units box
run 200
unfix 6
unfix 5
########### restart file ####################################

write_restart restart.stage1


########  END ##########################






		

Attachment: Al.eam
Description: Binary data

# bulk melting of aluminium



read_restart restart.stage1 


########defining the loop###########

label runloop

region supercell sphere 0 0 0 100 units box
region mysphere sphere 0 0 0 50 units box
variable x loop 48  #50
variable y equal $x-1


if "${y}>0" then  "read_restart stage2/restart.stage2.${y}"

variable t_int equal (300+25*($x-1))
variable t_fin equal (300+25*$x)


###############defien the Varibles#################

variable		t equal 0.001
variable		t_demp equal "100* v_t"
variable		p_demp equal "1000* v_t"


########potential################

pair_style		eam/alloy
pair_coeff		* * Al.eam Al

##########TIMESTEP AND COMPUTE############

timestep 		0.001
compute 		pe all pe/atom
compute 		ke all ke/atom
compute 		Al_msd all msd
variable		mass_g equal mass(all,mysphere)/6.022e27
variable		vol_cm7 equal 527598.77*1.0e-24
variable		density equal v_mass_g/v_vol_cm7
variable  		peatom equal pe/atoms
variable        vmsd equal c_Al_msd[4]
variable  		vstep equal step
variable 		vtemp equal temp
variable 		vpress equal press
variable te_atom atom temp
compute dis all displace/atom

###############creting bins############################################

######bins_pe###################

#####inner_most_zone1#################

########potential_energy####################

variable inner_atoms_1 equal count(inner_bin_1)
compute        inner_pe_1 inner_bin_1 pe/atom 
compute        inner_peatom_1 inner_bin_1 reduce ave c_inner_pe_1
variable       inner_pebin_1 equal c_inner_peatom_1


########kinetic_energy############################
compute        inner_ke_1 inner_bin_1 ke/atom 
compute        inner_keatom_1 inner_bin_1 reduce ave c_inner_ke_1
variable       inner_kebin_1 equal c_inner_keatom_1

###########msd###################

compute inner_msd_1 inner_bin_1 msd com yes
variable inner_msd_1 equal c_inner_msd_1[4]

######### Middle_layer_zone###########################

######potential_energy######################################


variable mid_atoms_1 equal count(mid_bin_1)
compute        mid_pe_1 mid_bin_1 pe/atom 
compute        mid_peatom_1 mid_bin_1 reduce ave c_mid_pe_1
variable       mid_pebin_1 equal c_mid_peatom_1

############kinetic_energy###################

compute        mid_ke_1 mid_bin_1 ke/atom 
compute        mid_keatom_1 mid_bin_1 reduce ave c_mid_ke_1
variable       mid_kebin_1 equal c_mid_keatom_1

####msd###################

compute mid_msd_1 mid_bin_1 msd com yes
variable mid_msd_1 equal c_mid_msd_1[4]

##########outer_most_zone7##########################

variable atoms_3 equal count(bin_3)
compute        pe_3 bin_3 pe/atom 
compute        peatom_3 bin_3 reduce  ave c_pe_3
variable       pebin_3 equal c_peatom_3

##########bin_ke######################
compute        ke_3 bin_3 ke/atom 
compute        keatom_3 bin_3 reduce  ave c_ke_3
variable       kebin_3 equal c_keatom_3

############bin msd ##################

compute 19 all msd  
variable sph_msd equal c_19[4]

compute  14 bin_3 msd 
variable msd_3 equal c_14[4]


###### print PEATOM in file##############

#run 0


print "# vstep vtemp inner_pebin_1  inner_kebin_1  inner_msd_1  inner_atoms_1  inner_atoms_5" file stage2/stage2_inner_$x.txt 

fix inner all print 100 "${vstep} ${vtemp} ${inner_pebin_1} ${inner_kebin_1} ${inner_msd_1} ${inner_atoms_1}" append stage2/stage2_inner_$x.txt screen no

print "# vstep vtemp mid_pebin_1  mid_kebin_1  mid_msd_1  mid_atoms_1 " file stage2/stage2_mid_$x.txt 

fix mid all print 100 "${vstep} ${vtemp} ${mid_pebin_1} ${mid_kebin_1} ${mid_msd_1} ${mid_atoms_1}" append stage2/stag2_mid_$x.txt screen no

print "# vstep vtemp pebin_1  kebin_1  msd_1  atoms_1 " file stage2/stage2_outer_$x.txt 

fix mid all print 100 "${vstep} ${vtemp} ${pebin_3} ${kebin_3} ${msd_3} ${atoms_3} " append stage2/stage2_outer_$x.txt screen no

########therom and Dump ##############################
reset_timestep 0

thermo			100
thermo_style 	custom	step temp pe ke press pxx  pyy pzz v_sph_msd
dump 			1 all custom 52500 stage1/stage2.$x.dump id type x y z vx vy vz c_pe c_ke v_te_atom c_dis[4]


##########FIX the ensemble and file gneration##########


fix 5 all nvt temp ${t_int} ${t_fin} ${t_demp} 
fix 6 all recenter INIT INIT INIT  units box
run 2500
unfix 6
unfix 5

log stage2/log.$x.heat
fix 7 all nvt temp ${t_fin} ${t_fin} ${t_demp} 
fix 8 all recenter INIT INIT INIT  units box
run 50000
unfix 8
unfix 7

########### restart file ####################################

write_restart stage2/restart.stage2.$x


clear

next x
jump stage2.txt runloop


########  END ##########################