Problem in read_data

Dear LAMMPS developers and users:

I am trying to read_data of water to create a droplet, then I will create a flat wall od copper. The script is here but there is a problem “ERROR: Bonds defined but no bond types (…/read_data.cpp:1060).” This error happened when I tried to read the data of water. The data file file is here as well. I already defined how man bonds and their types as mentioned in the script but I don’t know why I see this error?!

If there is any suggestion where is my mistake, please let me know.

Dear LAMMPS developers and users:

I am trying to read_data of water to create a droplet, then I will create
a flat wall od copper. The script is here but there is a problem "ERROR:
Bonds defined but no bond types (../read_data.cpp:1060)." This error
happened when I tried to read the data of water. The data file file is here
as well. I already defined how man bonds and their types as mentioned in
the script but I don't know why I see this error?!

If there is any suggestion where is my mistake, please let me know.

​your mistake is to use the "create_box"​ command before "read_data"
without provisioning sufficient space for the topology information
contained in the data file. once the the simulation box is created, many
settings like number atom types, max. bonds per atom, bond types, number of
exclusions per atom and so on are locked in and cannot be changed anymore.

​the easiest correction is probably to do the "read_data" first and make
certain to add space to the additional data type(s) for any atoms to be
created with "create_atoms"​

​axel.​