[lammps-users] Regarding Density and mass in Gay-Berne potential – #3 by SAHIRE_ANSARY1 – LAMMPS Mailing List Mirror

[…]

Hi,
I am using Gay-Berne Potential for simulation. Before Starting Simulation I specify density,box size etc by following command
units lj
atom_style ellipsoid
dimension 3
lattice sc 0.01
region box block 0 5 0 5 0 5
create_box 1 box
create_atoms 1 box
set type 1 mass 1.0

If I specify mass 1.0 and do my simulation in that case simulation starts from initial density which I specify in this case i.e 0.01 but if I set mass 2 in that case density starts from 0.02 but I specify density 0.01 by using lattice sc 0.01. Why does this happen ?

because you are comparing a “number density” with a “mass density”. The “lattice” command cannot know anything about the latter because it is only about defining a grid of points, which have no mass.

If I give 0.01 density for mass 2 in that case should I get starting density 0.01 or not?

You should not. You define the spacing first and then change the mass.
What you expect makes no sense from the point of a computer program that looks at and processes items in a line by line fashion.

Read more here: Source link