Hello all,
I was testing out the fix print option where I notice that there seems to be a problem with formatting of the written files.
My input script looks like this:
# BF Slag MD Simulation/Pure Systems/SiO2/SiO2_1500_atoms - LAMMPS Input Script
# This script performs NPT simulation for SiO2 system at 5000K for 10 ps
#***********************************************************************
units real # Set units format
boundary p p p # Set periodic boundary conditions
atom_style full # Molecular Style including charge
pair_style buck/coul/long 8 10 # Long range couloumbic and short range Buckingham potential
kspace_style pppm 1e-4 # For long range forces
#***********************************************************************
# Simulation variables
#***********************************************************************
variable time_step equal 1.0 # 1 timestep is 1.0 fs
variable run_time equal 10 # Specify run time for simulation in ps
variable run_steps equal 1000.0*${run_time}/${time_step} # Total no. of steps in simulation run
variable th_freq equal 10000 # Frequency for calculating thermodynamic property
variable restart_freq equal ${run_steps}/1 # Frequency for creating restart files
variable T equal 5000 # Temperature of system in K
# Reading and Writing
#***********************************************************************
read_data SiO2_1500_atoms.data # Read atom data from data file
log SiO2_1500_atoms_5000K.log # Write log file for output
# Reset timestep and Write restart commands
#***********************************************************************
reset_timestep 0 # This resets the timestep to 0.
restart ${restart_freq} SiO2_1500_atoms_5000K # Write a restart file every ${restart_freq} steps
# Specify pair wise coefficient for short range forces
#***********************************************************************
pair_coeff 1 1 1843388098006.800 0.046 580.902 # Si-Si
pair_coeff 1 2 1157587.838 0.161 1067.657 # Si-O
pair_coeff 2 2 149032.853 0.276 1962.280 # O-O
# Intialize velocities
#***********************************************************************
velocity all create ${T} 12345 dist gaussian mom yes
# Specify timestep
#***********************************************************************
timestep ${time_step}
# Thermostating and Barostating the system
#***********************************************************************
fix NPT all npt temp ${T} ${T} 100 iso 1.0 1.0 1000
# Property Calculation & Dumping
#***********************************************************************
thermo ${th_freq}
variable T equal temp
variable P equal press
variable rho equal density
compute 1 all ke
compute 2 all pe
fix 1 all print 1000 """{"timestep": $(step), "pe": $(pe), "ke": $(ke), "temp": $T, "Pressure": $P, "Density": ${rho}}""" title "" file output.json screen no
# Output file writing
#***********************************************************************
thermo_style custom step cpu cpuremain spcpu ke pe etotal temp press density
thermo_modify flush yes
# Run Details
#***********************************************************************
run ${run_steps}
Here while printing the output.json file, the first 3 or 4 lines are printed as expected with one output per line then we run into problems. See the attached output file to understand what I mean.
I am using Lammps 23-Jun-22 verison.
Can anyone tell me where I am going wrong and resolve the error ?
Thanks in advance.
output.json (1.8 KB)
in.SiO2_1500_atoms_5000K (3.1 KB)
log.lammps (2.1 KB)
SiO2_1500_atoms_5000K.log (4.5 KB)