ERROR: Group command requires atom attribute molecule (src/group.cpp:207)

Dear LAMMPS Community,

Greetings!

I am performing ReaxFF MD simulation on a simulation box initially containing oxygen molecule and lithium atom. However, when simulation proceeds, oxygen reacts with lithium forming various products such as Li2O, LiO2, and Li2O2 etc. I wanna calculate the number of time evolution of oxygen, lithium and their corresponding products. When I try to define Group for Li2O2 in input script, it shows following error;

“ERROR: Group command requires atom attribute molecule (src/group.cpp:207)”

Kindly guide me how to define Groups for all the products, and how to calculate their time evolution? Below is the input script;

REAXff

-------------------- Init Section ----------------------

units real
boundary p p p
atom_style charge
pair_style reax/c lmp_control

-------------------- Atom Definition Section ------------

read_data datafile.txt

#replicate 6 6 8

group oxygen type 1 # C

group Li type 2 # Li

group Li2O2 molecule 1 2

#--------------------- Pair Coefficients ------------------------

pair_coeff * * ffield.reax.LIS C Li

-------------------- Settings Section -------------------

neighbor 2 bin
neigh_modify every 10 delay 0 check no

timestep 0.1

fix 2 all qeq/reax 1 0.0 10.0 1e-6 reax/c

-------------------- MSD Section -------------------

compute msdli Li msd
variable twopoint_li equal c_msdli[4]/6/(stepdt+1.0e-6)
#fix 3 lithium vector 10000 c_msdli[4]
#variable fitslope equal slope(f_3)/4/(10
dt)

-------------------- Run Section (NVT: diffusion)------------------------

fix 3 all nvt temp 300.0 300.0 500.0

thermo 100
thermo_style custom step time etotal temp press vol density c_msdli[4] v_twopoint_li

dump 1 all atom 100 MD1-NVT*.lammpstrj

#restart 30000 MD.restart

run 1000

write_data data.out

You cannot. Groups are not suitable for the kind of analysis you want to do. Instead you can use the fix reaxff/species command — LAMMPS documentation

Dear akohlmey,

Thanks. Also for reactants (oxygen and lithium), should I need to use reaxff/species command or is it only for products?

Please read the documentation before asking questions.

Dear akohlmey,

Thank you for your kind guidance. I have tried to simulate my ReaxFF MD simulation using " fix Reax/c/species " with two different atom styles (charge and full) but in both cases I am getting same error. i.e.,

WARNING: More than one fix reax/c/species (src/USER-REAXC/fix_reaxc_species.cpp:309)
WARNING: More than one fix reax/c/species (src/USER-REAXC/fix_reaxc_species.cpp:309)
ERROR: Reuse of compute ID ‘SPECATOM’ (src/modify.cpp:1229)

Below is attached LAMMPS input script for both cases. Kindly have a look,

Case 1: Atom_style is full

REAXff - Li-air battery cathode

-------------------- Init Section ----------------------

units real
dimension 3
boundary p p p
atom_style full
pair_style reax/c NULL

-------------------- Atom Definition Section ------------

read_data cathode-npt1.out

Cathode structure

group ztc molecule 1 # Zeolite templated carbon structure
group C type 1 # C

Reactants for electrochemical reaction

group Li molecule 2 # Li
group O2 molecule 3 4 # oxygen
group o1 type 3 # o1 (O2)
group o2 type 4 # o2 (O2)

Products from electrochemical reaction

group li2o2 molecule 2 3 4 # Lithium peroxide
#group li2o molecule 2 3 4 # Lithium oxide
#group lio2 molecule 2 3 4 # Lithium superoxide

#--------------------- Pair Coefficients ------------------------

pair_coeff * * ffield.reax.LIS C O O Li

-------------------- Settings Section -------------------

neighbor 2 bin
neigh_modify every 10 delay 0 check no

timestep 0.1

fix 2 all qeq/reax 1 0.0 10.0 1e-6 reax/c

-------------------- Run Section (NVT: diffusion)------------------------

fix 6 Li nvt temp 300.0 300.0 500.0
fix 7 O2 nvt temp 300.0 300.0 500.0
fix 8 li2o2 nvt temp 300.0 300.0 500.0

fix 10 Li reax/c/species 1 1 1 species.out
fix 11 O2 reax/c/species 1 1 1 species.out
fix 12 li2o2 reax/c/species 1 1 1 species.out cutoff 2 3 0.9 cutoff 3 4 0.65

thermo 100
thermo_style custom step time etotal temp press vol density pe

dump 1 all atom 100 MD1-NVT*.lammpstrj

restart 30000 MD.restart

run 1000

write_data MD_test.end

Case 2 Atom_style is charge

REAXff - Li-air battery cathode

-------------------- Init Section ----------------------

units real
dimension 3
boundary p p p
atom_style charge
pair_style reax/c NULL

-------------------- Atom Definition Section ------------

read_data Cathode-npt2.out

Cathode structure

group C type 1 # Zeolite templated carbon structure

Reactants for electrochemical reaction

group Li type 2 # Li
group O2 type 3 # oxygen

Products from electrochemical reaction

group li2o2 type 2 3 # Lithium peroxide
#group li2o type 2 3 # Lithium oxide
#group lio2 type 2 3 # Lithium superoxide

#--------------------- Pair Coefficients ------------------------

pair_coeff * * ffield.reax.LIS C O Li

-------------------- Settings Section -------------------

neighbor 2 bin
neigh_modify every 10 delay 0 check no

timestep 0.1

fix 4 all qeq/reax 1 0.0 10.0 1e-6 reax/c

-------------------- Run Section (NVT: diffusion)------------------------

fix 6 Li nvt temp 300.0 300.0 500.0
fix 7 O2 nvt temp 300.0 300.0 500.0
fix 8 li2o2 nvt temp 300.0 300.0 500.0

fix 10 Li reax/c/species 1 1 1 species.out
fix 11 O2 reax/c/species 1 1 1 species.out
fix 12 li2o2 reax/c/species 1 1 1 species.out cutoff 2 3 0.9 cutoff 3 3 0.65

thermo 1000
thermo_style custom step time etotal temp press vol density pe

dump 1 all atom 10 MD-NVT*.lammpstrj

restart 30000 MD.restart

run 100000

#write_data MD_test.end

There is nothing to look at. The warning and error are clear: you must not use fix reaxff/species more than once. This is a limitation of the fix.