Packing group of spheres

Dear users,

I am new to LAMMPS. I am trying to pack a group of spheres inside a box. The spheres inside each group have a fixed distance from its immediate neighboring spheres. I would be really grateful if somebody could help me with this as I have a deadline coming soon.

I have made a lattice but I am not able to deform it or make a surface or plane out of it. If I am able to deform a lattice then I might be able to pack such lattices inside a box. Here a group of spheres where each sphere has a fixed distance from its immediate neighboring spheres can be called a lattice.

Thank You,
Dushyant Sahoo

I am not sure if I understand you correctly.

Do you want to make a cluster of spheres, and then tile those periodically through space to make a lattice of such clusters?

I apologize for the confusing post. I want to make ‘n’ different cluster of spheres and then pack these clusters in space. Here a single cluster can be called a lattice as each sphere inside the cluster have neighboring spheres wich are at a fixed distance.

Thank You,
Dushyant Sahoo

The create_atoms command can use “molecules” as input,
and the molecule command can define a molecule
as a set of spheres in a cluster.


I was thinking that approach too, but I got the idea that Dushyant wanted to achieve something like the opposite; that he wanted to make a lattice in which each lattice site is occupied by a different cluster of atoms. This is more difficult to achieve.

Thanks Steve for your answer. My main concern is how to keep the distance between neighboring spheres in a cluster fixed and how to make a cluster deformable keeping the constraint. I have just started using LAMMPS so I am not familiar with the commands and how to approach it. Currently, I am only able to make a lattice but I am not able to put the constraints.

Thank You,

You can’t make a cluster of spheres “fixed” or rigid,

and also have it deformable.

You can make a molecule of spheres with flexible bonds

(e.g. harmonic), then it will be deformable.


Thanks Steve, I have started using harmonic bonds, it works fine now.

A lattice is made of a basis and a translational offset.

So you can build a loop in which each instance creates a number of spheres to form a basis, and offset the origin for the next cycle of the loop.