ERROR: Fix deposit requires atom attribute molecule (../fix_deposit.cpp:98)

Dear lammps users:
I want deposit oxygen moleculars into the simulaiton box but “ERROR: Fix deposit requires atom attribute molecule (…/fix_deposit.cpp:98)” always occur. Why is that? Is my molecular template went wrong?

My molecule file:

oxygen dimer topology

2 atoms

Coords

1 0 0 0
2 0 0.001209 0

Types

1 2
2 2

My new input file:(I deleted the read dump file part for your convinience.)

ReaxFF MD simulation for Fe(100)-O

1. Initialization

units real
dimension 3
boundary p p f
atom_style charge

2. Atom definition

lattice bcc 2.8700
region box block 0 11 0 11 0 27.875
create_box 2 box
create_atoms 1 box

region up block INF INF INF INF 19.2 INF
region down block INF INF INF INF INF 8.0
region substrate block INF INF INF INF 8.0 19.2
group up region up
group down region down
delete_atoms group up
delete_atoms group down
group substrate region substrate

#read_dump dump.Featom 10000 x y z box yes replace yes

3. Settings

pair_style reax/c NULL checkqeq yes
pair_coeff * * ffield.reax.Fe_O_C_H Fe O

mass 1 55.8450
mass 2 15.9994

group Fe type 1
group oxygen type 2

neighbor 2 bin
neigh_modify every 1 delay 0 check yes

#=================relaxation==================

variable T equal 900
fix 1 substrate nve
fix 2 substrate langevin $T $T 100 587283
fix charge all qeq/reax 1 0.0 10.0 1e-6 reax/c
timestep 1
compute mtemp substrate temp
compute_modify mtemp dynamic yes
thermo 1

run 2
reset_timestep 0

#=================end relaxation=================

#=================oxidation kinetics==================

fix 4 oxygen nve
fix ref oxygen wall/reflect zhi EDGE

variable Nsubtot equal count(all,substrate) #基底内的所有原子
variable Oxysub equal count(oxygen,substrate) #基底内的氧原子数

variable Oxytot equal count(oxygen) #氧原子总数
variable Oxyup equal count(oxygen,up) #上半真空层内的氧原子数
variable Oxymolup equal v_Oxygen*0.5 #上半真空层内的氧分子数
variable a equal 280.0
variable m equal v_a-count(oxygen,up)*0.5 #需要加入的氧气数目

run 0
compute peratom up stress/atom
compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*(0.311*vol))

thermo_style custom step atoms temp etotal press v_press v_Nsubtot v_Oxysub v_Oxytot v_Oxyup v_m
thermo_modify temp mtemp

compute FeFerdf all rdf 100 1 1
fix FeFe all ave/time 100 1 100 c_FeFerdf file FeFerdf.txt mode vector
compute OOrdf all rdf 100 2 2
fix OO all ave/time 100 1 100 c_OOrdf file OOrdf.txt mode vector
compute FeOrdf all rdf 100 1 2
fix FeO all ave/time 100 1 100 c_FeOrdf file FeOrdf.txt mode vector

dump 1 all custom 100 dump.atom id type xs ys zs q
dump 2 all image 100 image2.*.jpg type type axes yes 0.8 0.02 view 80 -30 zoom 1.6 adiam 1.8
dump_modify 2 pad 5
dump_modify 2 backcolor white
dump_modify 2 adiam 2 1.2
dump_modify 2 acolor 1 blue
dump_modify 2 acolor 2 red

region upadd block 0 11 0 11 24 25
molecule mymol molecule.dimer

variable t loop 1000
label loopt
if “$m > 0” then “fix 3 oxygen deposit 1 2 50 12345 region upadd near 1 mol mymol vz -0.00684 -0.00684”
run 100
next t
jump in.process3 loopt

write_restart restart.oxidation

What version of lammps are you using? There is no such error in the current distribution. You might want to update your lammps.

Also, your O2 molecules cannot be this close to each other.

1 0 0 0
2 0 0.001209 0

Ray