Masses in atom_style hybrid dipole sphere

Hello,

I am setting up a simulation with atom_style hybrid dipole sphere. The version of LAMMPS that I am using is 29 Aug 2024 - Update 1. I am bit confused about how masses are set (I want to a have combination of finite sphere particles and point particles in the simulation). Atoms are created using create_atoms command. I went through the documentation, previous discussions on the forum, and ran a few tests and concluded following points:

  1. The diameter and density are not explicitly set for point particles, diameter is set to a specific value for spherical particles and only per-type masses are set for all the atoms. In this case, LAMMPS will calculate the mass of atoms (shown in dump file) using default value of diameter and density i.e., 1 for point particles. However, the output data file shows the correct masses set by “mass” command. For spherical particles, the diameter will be the set value but the mass shown in the dump file will still be ~0.5236 (calculated using diameter and density value of 1), and the density will be calculated using this mass (~0.5236) and set diameter. This simulation is not correct.
  2. The diameter and density are not explicitly set for point particles, diameter is set to a specific value for spherical particles and both per-type and per-atom masses are set for all the atoms. LAMMPS will use the per-atom masses set by the user. In this case, the diameter will be 1 for point particles i.e., default set by create_atoms command but the density for all the atoms will be calculated by using mass and diameter value and will not have the default value i.e., 1.
  3. The diameter is set to 0 for point particles, diameter is set to a specific value for spherical particles and both per-type and per-atom masses are set for all the atoms. LAMMPS will use the per-atom masses set by the user. In this case, the density will be equal to the per-atom mass for point particles and not the default value i.e., 1.

I wanted to ask if my understanding is correct? Both cases 2 and 3 also provide the same thermo output which indicates that for point particles where specific fix developed for spherical particles such as nve/sphere are not used and pair style defined by lj/cut is used, the diameter and density do not matter as long as per-atom type masses are explicitly set. The LAMMPS documentation is confusing because according to it, mass is calculated from density and volume (mentioned in set and read_data commands) which does not agree with cases 2 and 3 defined above.

Moreover, LAMMPS documentation also mentions that " If you define a hybrid atom style which includes one (or more) sub-styles which require per-type mass and one (or more) sub-styles which require per-atom mass, then you must define both. However, in this case the per-type mass will be ignored; only the per-atom mass will be used by LAMMPS." A warning is also printed in the output file stating the same. However, for cases 2 and 3, if I don’t set the per-type masses and only set the per-atom masses, thermo output remains the same. However, masses are printed as 0 in the output data file while correct masses are printed in the dump file. How can this effect the simulation?

Thank you for the time, help and guidance.

https://docs.lammps.org/read_data.html

https://docs.lammps.org/set.html

… and how would you define the force field between those two different kinds of particles? There are potentials for point particles, those ignore the diameter and there are potentials for extended particles, but those cannot interact with point particles and vice versa.

Generally, you have to understand that LAMMPS has two ways to store masses: per-type mass and per-atom mass. If a command or keyword only specifies a “generic” mass, then the per-atom mass has precedence over the per-type mass.
The per-type mass is set through the “mass” command, read from the Masses section of a data file, or set by some potentials like EAM.
The per-atom mass can be set either indirectly through providing diameter and density, but also directly with the set command. This ambiguity is because different models have different preferences for how to conveniently enter the mass.

For cases, where you have both, it is strongly recommended to make both settings consistent, as far as it is possible, and take into account that the per-atom mass takes precedence.

If you have a hybrid atom style, all properties for all atoms are available, but whether they will be applied to compute forces depends on the pair style and alike. The mass in return matters for the time integration and calculation of kinetic energy and temperature and there the per-atom mass clearly has precedence over per-type mass. If you set one of the two types of mass, it does not automatically set the other. It is up to you to keep them consistent, if you feel the need.