WARNING: Atom style hybrid defines both, per-type and per-atom masses

Hello sir,
i implemented a code for many particles system, but i always have this warning.
units lj
dimension 2
boundary p p p
atom_style hybrid charge sphere
WARNING: Atom style hybrid defines both, per-type and per-atom masses; both must be set, but only per-atom masses will be used (src/atom_vec_hybrid.cpp:133)

I made changes according to the warning but the same result again. My code is running and shows effects according to changes in the mass parameter. what should i do?

region box block 0 36 0 36 0 1.0
create_box 2 box

region subtrate block 0 36 0 36 0 1.0 units box
lattice hex 0.212 origin 0.1 0.1 0.0
create_atoms 1 region subtrate
group substrate type 1
set group substrate diameter 1.0
#set group substrate density/disc 0.3

region mob block 0 36 0 36 0 1.0 units box
create_atoms 2 random 4000 12345 NULL overlap 0.3 maxtry 50
group mobile type 2
set group mobile diameter 1.0
#set group mobile density/disc 0.3

set type 2 charge 0.3
# Per Atom mass
set type 1 mass 1.0
set type 2 mass 1.0
# Per Atom Type mass
mass 1 1.0
mass 2 1.0

Hi @zahidk9,

Since you’re using an hybrid style of particles you’ll get the warning message no matter what since finite-size particles (here style sphere) need a per-atom mass anyway. This is in conflict with most other atom_style including charge. See the documentation on the atom_style command.

The warning message is not an error. It is just a warning telling you which masses will be used in the simulation.

1 Like

Thanks sir

Thank you for your answer sir,
If the particle masses are not defined, doesn’t it creates problem in the simulation? Because mass will directly affects the simulation. Please clarify this.
Thanks

LAMMPS will not run if atoms have no masses.