How to create prism with triangular cross section

Hello Everyone,

Is it possible to create a prism with triangular cross section in Lammps? The existing prism command creates a parallelepiped topology. I would appreciate it if you could please give suggestions and share your comments.

Thank you very much.

You can create region geometries by combining primitives, e.g. you can create a triangular prism through the union of a block region with two plane regions.

Thank you very much for your suggestion.

https://docs.lammps.org/region.html

a triangular prism is the intersection of 5 plane regions:

region box block -100 100 -100 100 -100 100
create_box 1 box

region a plane 0 0 0 1 0 0
region b plane 0 0 0 0 1 0
region c plane 30 30 0 -1 -1 0
region bottom plane 0 0 -20 0 0 1
region top plane 0 0 20 0 0 -1
region triangle_prism intersect 5 a b c bottom top

mass 1 1
create_atoms 1 random 100000 12345 triangle_prism

dump 1 all image 1 triangle-*.png type type
run 0

Thank you for the feedback. This really helps.