Regarding read_data

Dear Lammps experts,

I am permanently facing with this error regarding read_data command:
“cannot read_data without add keyword after simulation box is defined.” Whereas, I have applied the command after the simulation box command. In addition, ,I have also no idea regarding the “add keyword” . Since, I would like to just read 2 input files and then add their atoms in 2 regions. So, I need not to use add keyword as per the documentation and instead I need to use “region keyword”.

By the way, any help is highly appreciated.

1- Lammps input file:

dimension 2
units metal
atom_style atomic
boundary p p p # in 2d models z shall be periodic

region box block 0 200 0 200 -0.5 0.5 units box ### simulation box
create_box 2 box # 2 is number of atom types
read_data substrate.dat group substrate
read_data agglomerate.dat group agglomerate
lattice sq2 3.61

pair_style lj/cut 6.0 # cut off is usually 2.5 unitless in lj
pair_coeff * * 0.32 2.23
neighbor 2.0 bin
neigh_modify delay 5
#neigh_modify delay 0 every 1 check yes

reset_timestep 0
timestep 0.005 # Achtung! in metal unit time-step is by default 1 picoseconds scale

velocity all create 300 12345 mom yes rot no
fix 1 all nve
fix 2 all temp/rescale 100 300.0 300.0 10.0 1.0
thermo 100
thermo_modify lost ignore flush yes
run 50000

2- atoms positions file 1(ID=1)

Lammps data.desription

3749 atoms
2 atom types

0 200 xlo xhi
0 200 ylo yhi
-0.5 0.5 zlo zhi

#Masses## must have one blank line

Dear Lammps experts,

I am permanently facing with this error regarding read_data command:
"cannot read_data without add keyword after simulation box is defined."
Whereas, I have applied the command after the simulation box command. In
addition, ,I have also no idea regarding the "add keyword" . Since, I would
like to just read 2 input files and then add their atoms in 2 regions. So, I
need not to use add keyword as per the documentation and instead I need to
use "region keyword".

please read the read_data documentation more carefully. there is a
whole section explaining what you can and cannot do when using
read_data multiple times or after a create_box command. that also
explains the function of the add keyword.

in short, you *must* use the add keyword because you use create_box,
and there is no region keyword.

axel.