Error from molecule and read_data commands

Hi.
lammps version: lammps-23Jun2022

I try to use molecule command to add the SO4 ion to my system (Na2SO4 + H2O) as a rigid molecule!
I have a data file with SO4 excluded and a molecule file for this ion!


read_data data.Na2SO4 extra/bond/per/atom 4 &
extra/angle/per/atom 6 extra/special/per/atom 20

molecule SO SO4.mol toff 3 boff 1 toff 1


When I run the code I get this error:
ERROR: Not all per-type masses are set. Type 4 is missing. (…/atom.cpp:726)

These are my data file and molecule file format:

data file:
32 atoms
20 bonds
10 angles
5 atom types
2 bond types
2 angle types

Masses

1 1.00000 # HW
2 15.9994 # OW
3 22.98977 # Na


molecule file:

SO4 ion. Explicit SO4 geometry for use with fix rigid

5 atoms
4 bonds
6 angles

Coords

1 -2.156 -0.271 0.104 # S
2 -0.696 0.345 -0.002 # O
3 -2.258 -1.014 -1.295 # O
4 -3.11 0.803 0.12 # O
5 -2.16 -1.257 1.147 # O

Types

1 1 # S
2 2 # OS
3 2
4 2
5 2

Masses

1 32.065 # S
2 15.9994 # O
3 15.9994 # O
4 15.9994 # O
5 15.9994 # O

Charges

1 0.9
2 -0.65
3 -0.65
4 -0.65
5 -0.65

Bonds

1 1 1 2
2 1 1 3
3 1 1 4
4 1 1 5

Angles

1 1 2 1 3
2 1 2 1 4
3 1 2 1 5
4 1 3 1 4
5 1 3 1 5
6 1 4 1 5


I would be grateful If you can help me to fix this error.

This error message is self-explanatory. Where is the mass for atom type 4 set?

1 Like