create_atoms and molecule command

Dear all,
I create a period box with lammps and the input file as follows:

units real

atom_style charge

reax args: hbcut hbnewflag tripflag precision

region mybox prism 0.0 30.9713 0.0 26.8219 0.0 31.3220 -15.4856 0.0 0.0
create_box 1 mybox
molecule O2 molecule.txt
create_atoms 1 random 10 100001 mybox mol O2 100000001
pair_style reax/c lmp_control
pair_coeff * * ffield.reax O

neighbor 2.5 bin
neigh_modify every 10 delay 0 check no
timestep 0.25
fix 1 all qeq/reax 1 0.0 10.0 1e-6 param.qeq
fix 2 all nvt temp 100.0 100.0 25.0

thermo 10
dump 1 all custom 10 dump.custom id element x y z
dump_modify 1 element O format float %15.8f

run 100

the molecule.txt is shown as follows:

#O2

2 atoms

Coords

1 0.87719297 1.12573098 0.00000000
2 -0.28440703 1.12573098 0.00000000

Types

1 1
2 1

Masses

1 15.9990
2 15.9990

But the error occurs:

Created triclinic box = (0 0 0) to (30.9713 26.8219 31.322) with tilt (-15.4856 0 0)
1 by 1 by 2 MPI processor grid
Read molecule O2:
2 atoms with 2 types
0 bonds with 0 types
0 angles with 0 types
0 dihedrals with 0 types
0 impropers with 0 types
ERROR: Invalid atom type in create_atoms mol command (…/create_atoms.cpp:217)
Last command: create_atoms 2 random 10 100001 mybox mol O2 100000001

Could you tell me how to correct it? Thanks.
Best regards,
Jie Wang

the files you copy here and the output from LAMMPS do not match up. the command line printed as erroneous does not occur in the input you provide and your molecule file read indicates at having a different molecule file. here is what i get:

LAMMPS (11 May 2018)
using 1 OpenMP thread(s) per MPI task

Created triclinic box = (0 0 0) to (30.9713 26.8219 31.322) with tilt (-15.4856 0 0)
1 by 1 by 1 MPI processor grid
Read molecule O2:
2 atoms with max type 1
0 bonds with max type 0
0 angles with max type 0
0 dihedrals with max type 0
0 impropers with max type 0
ERROR: Invalid atom type in create_atoms mol command (…/create_atoms.cpp:216)
Last command: create_atoms 1 random 10 100001 mybox mol O2 100000001

the reason for the error message should become obvious, when you re-read the create_atoms command documentation and how its arguments are interpreted in combination with molecule commands. also, double check with the create_box command documentation.

axel.