ERROR: Incorrect format in Atoms section of data file: 1 1 2.000000 0.000000000000 0.000000000000 0.000000000000 For more information see https://docs.lammps.org/err0002 (src/atom.cpp:1074)

The following script is for determining lattice thermal conductivity of SrTiO3 bulk. It requires data.lmp where i suppose i should provide unitcell structure of SrTiO3. I downloaded .cif from material project then converted it to lammps data file using atomsk. But running it giving a error that format is incerrect. What could be possible fix for this?

units real
variable T equal 1100 # temperature
variable Q equal 94275 # random number seed
variable dt equal 1.0 # timestep in fs
variable s equal 500 # screen output frequency
variable trop equal 3 # system isotropy, 1 = isotropic, 2 = anisotropic, 3 = triclinic
variable Ep equal 50000 # npt equilibriation steps
variable Ev equal 50000 # nvt equilibriation steps
variable NT equal 2 # data collection ensemble, 1 = NVE, 2 = NVT, 3 = NPT
variable N equal 5000000 # number of steps
variable d equal 10 # calculation frequency (equilibration lattice vectors and production heat-flux)
variable rep equal 0 # 0 = do not replicate cell, 1 = replicate cell
variable repx equal 12 # replication factor for x
variable repy equal 12 # replication factor for y
variable repz equal 12 # replication factor for z
variable xyz equal 0 # 1 = print xyz file during production phase
#######################################################################
#######################################################################
#system settings
atom_style full
pair_style buck/coul/long 8.5
processors * * * grid numa
read_data data.lmp
if "${rep} == 1" then "replicate ${repx} ${repy} ${repz}"
balance 1.0 shift xyz 20 1.0
#kcal/mol for unit style "real"
pair_coeff * * 0.000000 1.000000 0.000000
pair_coeff 1 3 335921.2159 0.245015 1885.767153
pair_coeff 2 3 546728.0894 0.18558 334.684293
pair_coeff 3 3 42541.68289 0.343645 4441.08738
kspace_style pppm 1.0e-5
#######################################################################
#######################################################################
#general settings
timestep ${dt}
thermo $s
thermo_style custom step temp etotal press vol lx ly lz xy xz yz
thermo_modify flush no
run_style verlet
#######################################################################
#######################################################################
#npt equi skipping
if "${Ep} == 0" then "jump input.lmp NVT"
#######################################################################
#######################################################################
#npt equi
variable myLx equal lx
variable myLy equal ly
variable myLz equal lz
variable myxy equal xy
variable myxz equal xz
variable myyz equal yz
variable repeat equal v_Ep/v_d
velocity all create $T $Q mom yes rot yes dist gaussian
fix A all momentum 100 linear 1 1 1
if "${trop} == 1" then "fix B all npt temp $T $T 100.0 iso 0.0 0.0 1000.0"
if "${trop} == 2" then "fix B all npt temp $T $T 100.0 aniso 0.0 0.0 1000.0"
if "${trop} == 3" then "fix B all npt temp $T $T 100.0 tri 0.0 0.0 1000.0"
fix C all ave/time $d ${repeat} ${Ep} v_myLx v_myLy v_myLz v_myxy v_myxz v_myyz mode
scalar ave one
run ${Ep}
variable newX equal f_C[1]
variable newY equal f_C[2]
variable newZ equal f_C[3]
variable newxy equal f_C[4]
variable newxz equal f_C[5]
variable newyz equal f_C[6]
if "${trop} == 1" then "change_box all x final 0.0 ${newX} y final 0.0 ${newY} z final 0.0 ${newZ}
remap units box"
if "${trop} == 2" then "change_box all x final 0.0 ${newX} y final 0.0 ${newY} z final 0.0 ${newZ}
remap units box"
if "${trop} == 3" then "change_box all x final 0.0 ${newX} y final 0.0 ${newY} z final 0.0 ${newZ} xy
final ${newxy} xz final ${newxz} yz final ${newyz} remap units box"
unfix A
unfix B
unfix C
write_data equi_vol.lmp
#######################################################################
#######################################################################
#nvt equi skipping
label NVT
if "${Ev} == 0" then "jump input.lmp RUN"
#######################################################################
#######################################################################
#nvt equi
velocity all create $T $Q mom yes rot yes dist gaussian
fix A all momentum 100 linear 1 1 1
fix B all nvt temp $T $T 100.0
run ${Ev}
unfix A
unfix B
#######################################################################
#######################################################################
#choose data collection type
label RUN
if "$N == 0" then "jump input.lmp END"
if "${NT} == 1" then "fix B all nve"
if "${NT} == 2" then "fix B all nvt temp $T $T 100.0"
if "${NT} == 3 && ${trop} == 1" then "fix B all npt temp $T $T 100.0 iso 0.0 0.0 1000.0"
if "${NT} == 3 && ${trop} == 2" then "fix B all npt temp $T $T 100.0 aniso 0.0 0.0 1000.0"
if "${NT} == 3 && ${trop} == 3" then "fix B all npt temp $T $T 100.0 tri 0.0 0.0 1000.0"
#######################################################################
#######################################################################
#output variables
variable V equal vol
shell echo $T >> variables.txt
shell echo $V >> variables.txt
shell echo ${dt} >> variables.txt
shell echo $d >> variables.txt
#######################################################################
#######################################################################
#heat-flux output
reset_timestep 0
compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom NULL virial
compute flux all heat/flux myKE myPE myStress
thermo_style custom step temp press pe ke etotal
thermo_modify flush no #flush output
#######################################################################
#######################################################################
#running output
variable timestep equal step
variable Xflux equal c_flux[1]
variable Yflux equal c_flux[2]
variable Zflux equal c_flux[3]
fix C all print $d "${timestep} ${Xflux} ${Yflux} ${Zflux}" append flux.txt screen no
if "${xyz} == 1" then &
"dump 1 all xyz $s structure.xyz" &
"dump_modify 1 element Sr Ti O"
#######################################################################
#######################################################################
#data collection
run $N
#######################################################################
#######################################################################
#new data generation
label END
write_data new_data.lmp

The data file: `

LAMMPS data file

 5 atoms
 0 bonds
 0 angles
 0 dihedrals
 0 impropers

3 atom types

0.0 3.912701310000 xlo xhi
0.0 3.912701310000 ylo yhi
0.0 3.912701310000 zlo zhi

Masses

1 87.62000000  # Sr (example mass)
2 47.86700000 # Ti (example mass)
3 15.99900000  # O (example mass)

Atoms # full

1 1 2.000000 0.000000000000 0.000000000000 0.000000000000
2 2 4.000000 1.956350655000 1.956350655000 1.956350655000
3 3 -2.000000 1.956350655000 0.000000000000 1.956350655000
4 3 -2.000000 1.956350655000 1.956350655000 0.000000000000
5 3 -2.000000 0.000000000000 1.956350655000 1.956350655000

`

Hi @Morsalin_Al_Rabbi,

You provide a response just before your question. If the format is incorrect, you have to check for the atom_style format in your file and check what information is missing and how you can add it yourself if possible. You’ll find more information regarding the data format in the related documentation.

You might want to report the issue to the developer of atomsk Dr. Pierre Hirel. If there is an issue here, I suspect it is either in the code or in your use of it.

That should not be necessary. If I remember correctly, the Atomsk documentation clearly states that its output is exclusively for atom style atomic.

So the input file is incorrect, not the data file.

How can i fix this any suggestion?

You have received suggestions from two people that explain the origin of your problem, not to mention the URL in the error message that also links to an explanation. What else are you looking for?

I’ve never used Atomsk, I didn’t know about that but that’s good to learn.

The # full tag misled me in thinking it might be able to write such files. That said, after looking at the documentation there is a paragraph here stating that if charges are defined in Atomsk, then it will use charge atom style, which is the case here. It also states that it comes with some scripts to do modification in order to make the input suitable for other styles. But then again, @Morsalin_Al_Rabbi, this is more an issue of using correctly Atomsk than a LAMMPS issue.

There are other ways to convert cif files to LAMMPS input files. In addition to what we already said, you can search the archives of the forum for more. This was already discussed here if I recall correctly.