[lammps-users] About region plane

Hi:

Recently I use region plane in Lammps. And I find a trouble while using LAMMPS

I want to create a pyramid region by inputing the following in LAMMPS script file:

region p1 plane 00 0 2 1 0 units box
region p2 plane 0 0 0 -1 1 1.732 units box
region p3 plane 0 0 0 -1 1 -1.732 units box
region p4 plane 0 55 0 0 -1 0 units box
region indent intersect 4 p4 p1 p2 p3

that’s OK

but I subscribe the parameters of Region command with variables or expressions, as the following:

region p1 plane 0 0 0 2 1 0 units box
region p2 plane 0 0 0 -1 1 sqrt(3) units box
region p3 plane 0 0 0 -1 1 -sqrt(3) units box
region indent intersect 4 p4 p1 p2 p3

it could not create a pyramid

what’s wrong with Command Region?
I use LAMMPS of version lammps-21Jul10

Yan Zhang
2011-1-27

region p2 plane 0 0 0 -1 1 sqrt(3) units box

That's not a valid way to use a formula in a LAMMPS
input script.

You need to assign that formula sqrt(3) to an equal-style
variable like this:
variable foo equal sqrt(3)
region p2 plane 0 0 0 -1 1 ${foo} units box

See the variable doc page for lots of details and examples.

Steve

2011/1/27 Zhang Yan <[email protected]...>: