[lammps-users] Initialization and boundary condition

Dear Aparna,

1> Calculation of dimensions of orthogonal box:

From the lattice documentation page:
“A hex style is also a 2d lattice, but the unit cell is rectangular, with a1 = 1 0 0 and a2 = 0 sqrt(3) 0. It has 2 basis atoms, one at the corner and one at the center of the rectangle.”

“For unit style lj, the scale argument is the Lennard-Jones reduced density, typically written as rho*. LAMMPS converts this value into the multiplicative factor via the formula “factor^dim = rho/rho*”, where rho = N/V with V = the volume of the lattice unit cell and N = the number of basis atoms in the unit cell (described below), and dim = 2 or 3 for the dimensionality of the simulation.”

Since you have not specified units, by default, the LJ units are assumed.
You have specified:
lattice hex 0.93
i.e rho* = 0.93

So, as per above documentation,
rho = N/V = 2/(1sqrt(3))
factor^2 = rho/rho
= 2/(0.93*sqrt(3))
hence factor = 1.114277…

region box block 0 100 0 40 -0.25 0.25
default value for region is units lattice
1.e 100 lattices along x and 40 lattices along y.
Hence box dims = 100factor1 along X and 40factorsqrt(3) along Y,
which is the box dimensions printed.

2> Difference in number of atoms:

When you use periodic BCs (and ur box is defined in lattice units),
LAMMPS makes sure that the edges exactly match, and atoms at the edges are considered only once,
so you get: 10040(2 atoms per unit cell) = 8000 atoms.

But when you have s boundary condition,
from the boundary documentation page we have:
“For style s, the position of the face is set so as to encompass the atoms in that dimension (shrink-wrapping), no matter how far they move.”
So the box size would be such, so as to accommodate the atoms of the edge on both sides.
This would lead to additional (101 + 41 -1) atoms.


PS: LAMMPS is documented very well! ;o)

Hello Sir,

I have put the input file from the example.