How to constrain rounded polyhedrons into a cylinder and a likely bug in LAMMPS

Hi all,

I’m trying to implement the molecular dynamics of rounded cubes in a cylinder. At the moment, I use "fix wall/body/polyhedron k_n c_n c_t zcylinder radius " command, and an error jumped out as follows,

ERROR: Illegal fix wall/body/polyhedron command (…/fix_wall_body_polyhedron.cpp:122)
Last command: fix 3 all wall/body/polyhedron 2000 50 50 zcylinder 0.0 10

I looked through the source code and found that there is no code corresponding to “zcylinder” in fix_wall_body_polyhedron file which cause the error. I wonder it is the bug in the source code.
Could anyone give me some suggestions to implement the simulation of cubes in a cylinder through other approaches?

Best wishes,

This would be a question for Trung (cc’d), who contributed that code.


Hi Mengjie,

indeed zcylinder is not supported for fix wall/body/polyhedron at this point. This was my mistake when making the doc page for fix wall body/polyhedron, will update it as soon as possible.

I cannot tell you when zcylinder will be supported, so if you want to have cubes in a cylinder, you can try model each cube as a rigid body composed of spheres (beads) and use conventional walls (e.g. fix wall/lj126) for the beads.