The system was relaxed with NVT ensemble with no problem. But, in the next step ,when I use NPT ensemble, I get this error at zero time step.
TIP4P hydrogen is missing (src/KSPACE/pair_lj_cut_tip4p_long.cpp:223)
Since I used 29 Sep 2021 lammps version, I used reset_atom_ids, but I get below error:
TIP4P hydrogen has incorrect atom type
I looked at my data file and the two hydrogen atoms were listed exactly below its oxygen atom. Hydrogen and oxygen atoms were considered as the first and second type, respectively.
It seems something changes the type of hydrogen atoms during reset_atom_ids.
The first step in such a situation is always to test with the latest release in order to make certain you are not running into a problem that has already been resolved.
To find the origin of this error I had an experiment!
I deleted the delete_atoms command. Instead, I used the the relaxation with fix nve/limit and fix langevin for a bit and then fix nve. Hopefully, I got no error in the case of without fix npt. But I do not understand why I get Error: TIP4P hydrogen is missing when I use fix npt.
This error would typically happen when you are computing interactions between two atoms where one of them is a TIP4P water oxygen and this atom would be a ghost atom. To compute the position M, this also needs to access the positions of both hydrogen atoms of the same water molecule, but if the oxygen atom is close to the ghost atom cutoff (= communication cutoff), one or both of the hydrogens may be outside the subdomain and thus not accessible. The cause for that could be that your neighbor lists are not updated frequently enough, or - more often - that your communication cutoff is too short. If I remember correctly, the second issue was addressed recently by correcting the ghost atom cutoff adjustment for TIP4P styles and should be included in the 3 Nov 2022 version.