Question about region in Lammps – LAMMPS Beginners

Hello to everyone.

I have a question about the region command, i need to create a cylindrical region in the center of a box, ¿Is it possible to determine the current box lengths to declare the center of the cylinder? These are the lines in the script.

region caja01 block 0 20 0 20 0 4
create_box 1 caja01
region caja02 cylinder z (xlo+xhi)/2 (ylo+yhi)/2 10 -10 10 units box

Greetings to all


Yes, you can compute those with variables. Please see the documentation of the variable command.

Those are (obviously) not correct, but very similar to what you can achieve with so-called “immediate variables”

Read more here: Source link