$regions¶
General specifiers¶
To built up a geometry, there are  dependent on the dimension of the simulation to be performed  various basic geometry elements available.
These geometry elements are specified within the keyword $regions
and can be clustered to a bigger object later on.
$regions optional regionnumber integer required regionpriority integer required basegeometry character required xcoordinates double_array optional ycoordinates double_array optional zcoordinates double_array optional center double_array optional radius double optional basecoordinates double_array optional topcoordinates double_array optional cornercoordinates double_array optional semiellipsebase double_array optional semiellipsetop double_array optional $end_regions optional
 regionnumber
 type
integer (\(\ge 1\))
 presence
required
 example
4
An integer number to refer to geometry element. Numbering must be unique. All region numbers together must form a dense set
1,2,3,....,maxnumber
. regionpriority
 type
integer (\(\ge 1\))
 presence
required
 example
2
A positive integer to set overwriting priority. In case of overlapping regions, the region with higher priority (= higher numerical value) overwrites the region with lower priority.
 basegeometry
 type
character
 presence
required
 example
rectangle
type of geometry object.
3D:
cuboid
,shpere
, …2D:
rectangle
,circle
, …1D:
line
These are specified in detail later.
 xcoordinates
 type
double_array
 presence
optional
 unit
[nm]
 example
10.0 10.0
This is for
cuboid
,rectangle
,line
. The values representxmin
,xmax
from left. ycoordinate
 type
double_array
 presence
optional
 unit
[nm]
 example
10.0 10.0
This is for
cuboid
,rectangle
,line
. The values representymin
,ymax
from left. zcoordinates
 type
double_array
 presence
optional
 unit
[nm]
 example
10.0 10.0
This is for
cuboid
,rectangle
,line
. The values representzmin
,zmax
from left. center
 type
double_array
 presence
optional
 unit
[nm]
 example
2.0
This is for
circle
(2D),sphere
(3D). radius
 type
double
 unit
[nm]
 presence
optional
 example
3.0
This is for
circle
(2D),sphere
(3D). basecoordinates
 type
double_array
 presence
optional
 unit
[nm]
 example
10.0 20.0 10.0 20.0 15.0 15.0
This is for
obelisk
,cone
,truncatedcone
,trapezoid
. The values representxmin
xmax
ymin
ymax
zmin
zmax
of obelisk (cone) base plane. (one pair must be equal) topcoordinates
 type
double_array
 presence
optional
 unit
[nm]
 example
10.0 20.0 10.0 20.0 30.0 30.0
This is for
obelisk
,cone
,truncatedcone
,trapezoid
,semiellipsoid
: The values representsxmin
xmax
ymin
ymax
zmin
zmax
of obelisk (cone) base plane (one pair must be equal) orx
y
z
for semiellipsoid. cornercoordinates
 type
double_array
 presence
optional
 unit
[nm]
 example
10.0 10.0 10.0 10.0 30.0 10.0 20.0 20.0 10.0
Triangle corner coordinates, interpreted via orientation and similar for polygon. For triangular prism:
x1 y1 z1 x2 y2 z2 x3 y3 z3
 semiellipsebase
 type
double_array
 presence
optional
 unit
[nm]
 example
60.0 120.0 40.0 40.0
For semiellipse: base line ellipse. These are two pairs of
xmin
,xmax
ymin
,ymax
zmin
,zmax
 one pair equal numbers semiellipsetop
 type
double_array
 presence
optional
 unit
[nm]
 example
100.0 20.0
For semiellipse: top coordinate pair e.g. for coordinate orientation (101) > (x,z)
Details of specification¶
1dimensional objects (only possible in 1D simulations)

 3dimensional objects
cylinder (not implemented yet but could be added > use truncatedcone instead)
regularprism (not implemented yet but could be added)
hexagonalprism (not implemented yet but could be added > use hexagonalobelisk instead)
polygonalprism (not implemented yet but could be added)
pyramid (not implemented yet but could be added > use obelisk instead)
regular_pyramid (not implemented yet but could be added > use obelisk instead)
hexagonal_pyramid (not implemented yet but could be added > use hexagonalobelisk instead)
polygonal_pyramid (not implemented yet but could be added)
1dimensional objects (only possible in 1D simulations)¶
line¶
$regions regionnumber = 1 basegeometry = line regionpriority = 1 xcoordinates = xmin xmax $end_regions
Chosen coordinates must be consistent with simulation orientation.
2dimensional objects¶
rectangle¶
$regions regionnumber = 1 basegeometry = rectangle regionpriority = 1 xcoordinates = xmin xmax ycoordinates = ymin ymax $end_regions
Two pairs of delimiting coordinates are required. Whether these have to be
xcoordinates
andycoordinates
as in the example above, or another combination (e.g. x, z) depends on the simulation orientation which is specified already.
circle¶
$regions regionnumber = 1 basegeometry = circle regionpriority = 1 center = x y radius = r $end_regions
The
circle
is defined by a center with coordinates (x,y) and a radius r.
triangle (can also be specified using polygon)¶
$regions regionnumber = 1 basegeometry = triangle regionpriority = 1 cornercoordinates = x1 y1 x2 y2 x3 y3 $end_regions
The corner coordinates refer to the plane, specified by the simulation orientation.
polygon¶
$regions regionnumber = 1 basegeometry = polygon regionpriority = 1 cornercoordinates = x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 ... $end_regions
The corner coordinates of a polygon refer to the plane, specified by the simulation orientation.
The vertices may be listed clockwise or anticlockwise. The first point could be repeated, i.e. the first point and the last point may be identical but this is not required.
The input polygon may be a compound polygon consisting of several separate subpolygons.
If so, the first vertex of each subpolygon must be repeated.
trapezoid (can also be specified using polygon)¶
$regions regionnumber = 1 basegeometry = trapezoid regionpriority = 1 topcoordinates = 15.0 15.0 20.0 20.0 ! xmin xmax ymin ymax basecoordinates = 25.0 25.0 40.0 40.0 ! xmin xmax ymin ymax $end_regions
For each,
basecoordinates
andtopcoordinates
, 2 values must be equal (meaning only 2 values can be equal), e.g. ymin=ymax=40.0. Then one boundary of the object is a line at y=40 nm. Base and top planes of the trapezoid must be in a coordinate plane. This plane is identified by the implicit rule, that a pair of coordinate values (e.g. ymin ymax) has identical values (ymin = ymax). This also implies that base and top lines are parallel to either the x or the y axis.The example given above shows the blue trapezoid at the bottom of this figure. The top line extends in x direction from 15 to 15 nm. The top line has a constant y coordinate of y = 20 nm The base line extends in x direction from 25 to 25 nm. The base line has a constant y coordinate of y = 40 nm.
semiellipse¶
$regions regionnumber = 1 basegeometry = semiellipse regionpriority = 1 semiellipsebase = xmin xmax ymin ymax semiellipsetop = x1 y1 $end_regions
semiellipsebase
: Here, 2 values must be equal (meaning only 2 values can be equal), e.g. ymin=ymax=40.0. Then one boundary of the object is a line at y=40 nm. Base plane of the semiellipse must be in a coordinate plane. This plane is identified by the implicit rule, that a pair of coordinate values (e.g. ymin ymax) has identical values (ymin = ymax).
semiellipsetop
: This defines a point which determines the height of the semiellipse. In our example (ymin = ymax), the plane is in the (x,z)coordinate plane. Top coordinates specify an arbitrary point “above” the ellipse, representing the base of the semiellipse.Top coordinate must be lower than upper coordinate of base line border in direction of axis mentioned above.
Top coordinate must be higher than lower coordinate of base line border in direction of axis mentioned above.
e.g.) in case of ymin = ymax, xmin < x1 < xmax and (y1 < ymin=ymax or y1 > ymin=ymax)
 Example1
semiellipsebase = 60.0 120.0 40.0 40.0
semiellipsetop = 100.0 20.0
From these data, the following points are extracted: (point: (x,y))
base: ( 60,40) (120,40)
top: (100,20)
 Example2
semiellipsebase = 60.0 120.0 40.0 40.0
semiellipsetop = 100.0 60.0
We changed the y1 coordinate of
semiellipsetop
from20.0
to60.0
. Example3
semiellipsebase = 40.0 40.0 20.0 80.0
semiellipsetop = 100.0 60.0
Here we changed semiellipsebase: Now the two x coordinates have identical values.
 Example4
semiellipsebase = 40.0 40.0 50.0 70.0
semiellipsetop = 100.0 60.0
Here we changed the ymin and ymax coordinates of
semiellipsebase
: Now the y extension of the semiellipse is restricted from ymin = 50 nm to ymax = 70 nm. The baseline is at the fixed value for x = 40 nm. Example5
semiellipsebase = 40.0 40.0 40.0 80.0
semiellipsetop = 60.0 60.0
semiellipsebase = 40.0 40.0 40.0 80.0
semiellipsetop = 20.0 60.0
Here we built a circle out of 2 semiellipses. However, it is obviously easier to use
circle
instead. Example6
semiellipsebase = 42.0 42.0 40.0 80.0
semiellipsetop = 60.0 60.0
semiellipsebase = 38.0 38.0 40.0 80.0
semiellipsetop = 20.0 60.0
Same as example 5 but this time, we moved the baselines a little bit apart from each other to make example 5 easier to understand.
3dimensional objects¶
cuboid¶
$regions regionnumber = 1 basegeometry = cuboid regionpriority = 1 xcoordinates = xmin xmax ycoordinates = ymin ymax zcoordinates = zmin zmax $end_regions
The surfaces of the
cuboid
are assumed to be in coordinate planes of the simulation coordinate system. The coordinates above specify the six coordinate planes which limit the cuboid.
sphere¶
$regions regionnumber = 1 basegeometry = sphere regionpriority = 1 center = x y z ! [nm] radius = r ! [nm] $end_regions
The
sphere
is defined by a center with coordinates (x,y,z) and a radius r.
obelisk¶
$regions regionnumber = 1 basegeometry = obelisk regionpriority = 1 basecoordinates = xmin xmax ymin ymax zmin zmax topcoordinates = xmin xmax ymin ymax zmin zmax $end_regions
Base and top plane of the obelisk have to be in parallel coordinate planes. These planes are identified by the implicit rule, that a pair of coordinate values (e.g. ymin ymax) has the same value (ymin = ymax).
In this example, the plane is in the (x,z)coordinate plane. The remaining four coordinates specify a rectangle in the corresponding plane.
truncatedcone and cylinder¶
$regions regionnumber = 1 basegeometry = truncatedcone ! can be used to specify a cylinder regionpriority = 1 basecoordinates = xmin xmax ymin ymax zmin zmax topcoordinates = xmin xmax ymin ymax zmin zmax $end_regions
A cone with its apex cut off by a plane is called a truncated cone. In our implementation, the truncated cone is bounded by two ellipses of different size that are aligned parallel to each other.
Base and top plane of the truncated cone have to be in parallel coordinate planes. This plane is identified by the implicit rule, that a pair of coordinate values (e.g. xmin xmax) has the same value (xmin = xmax).
In this example, the plane is in the (y,z)coordinate plane. ymin ymax and zmin zmax specify the diameter of the truncated cone top and base in the y and z direction, respectively. This corresponds to the specification of ellipses in the base and top plane.
How to specify a cylinder?
A cylinder is specified as a special case of a
truncatedcone
where the two boundary planes are circles. For a truncated cone, one specifies base and top coordinates.Let us assume we have a spherical cylinder of diameter 10 nm and height 15 nm. Then the base and top coordinates would be, for example,
basecoordinates = 10.0 20.0 10.0 20.0 15.0 15.0
(xmin,xmax,ymin,ymax,zmin,zmax) = (10,20,10,20,15,15)
topcoordinates = 10.0 20.0 10.0 20.0 30.0 30.0
(xmin,xmax,ymin,ymax,zmin,zmax) = (10,20,10,20,30,30)In other words, the x and ycoordinates specify the principal axes of the bottom and top ellipse (or circle) of the cylinder, respectively, and the zcoordinates specify the planes in which these two ellipses lie.
cone¶
$regions regionnumber = 1 basegeometry = cone regionpriority = 1 basecoordinates = xmin xmax ymin ymax zmin zmax topcoordinates = x y z $end_regionsBase plane of the cone has to be in parallel to the coordinate system planes. This plane is identified by the implicit rule, that a pair of coordinate values (e.g. xmin xmax) has the same value (xmin = xmax). In this example, the plane is in the (y,z)coordinate plane. ymin ymax and zmin zmax specify the diameter of the cone base in the y and z direction, respectively. This corresponds to the specification of an ellipse in the base plane. The top of the cone, the apex, is defined by the point (x,y,z).
The cone does not have to be right circular (where circular means that the base is a circle and right means that the axis passes through the center of the base at right angles to its plane).
Oblique cones are allowed, in which the axis does not pass perpendicularly through the center of the base.
The following figure shows several cones and truncatedcones (including the special case of cylinders).
The cones are defined as follows:
! ! This is a cylinder. The base and top planes are parallel to the (y,z) plane. ! regionnumber = 1 basegeometry = truncatedcone regionpriority = 1 ! cylinder basecoordinates = 80.0 80.0 80.0 60.0 80.0 60.0 ! xmin xmax ymin ymax zmin zmax topcoordinates = 40.0 40.0 80.0 60.0 80.0 60.0 ! xmin xmax ymin ymax zmin zmax ! ! This is a right circular cone. The base plane is parallel to the (y,z) plane. ! regionnumber = 2 basegeometry = cone regionpriority = 1 ! cone (right circular) basecoordinates = 80.0 80.0 50.0 90.0 50.0 90.0 ! xmin xmax ymin ymax zmin zmax topcoordinates = 10.0 70.0 70.0 ! x y z ! ! This is a cone where the projection of the apex onto the base plane is located outside the base plane. ! The base plane is parallel to the (y,z) plane. ! regionnumber = 3 basegeometry = cone regionpriority = 2 ! cone basecoordinates = 10.0 10.0 60.0 20.0 80.0 20.0 ! xmin xmax ymin ymax zmin zmax topcoordinates = 40.0 10.0 10.0 ! x y z ! ! This is a truncated cone. The base plane is parallel to the (y,z) plane. ! regionnumber = 4 basegeometry = truncatedcone regionpriority = 3 ! truncatedcone basecoordinates = 20.0 20.0 50.0 90.0 50.0 100.0 ! xmin xmax ymin ymax zmin zmax topcoordinates = 50.0 50.0 60.0 80.0 60.0 70.0 ! xmin xmax ymin ymax zmin zmax ! ! These are three truncated cones where the projection of the top plane on the base plane is outside the base plane. ! The base plane is parallel to the (y,z) plane. ! regionnumber = 5 basegeometry = truncatedcone regionpriority = 4 ! truncatedcone basecoordinates = 50.0 50.0 20.0 40.0 20.0 60.0 ! xmin xmax ymin ymax zmin zmax topcoordinates = 20.0 20.0 50.0 80.0 20.0 40.0 ! xmin xmax ymin ymax zmin zmax
semiellipsoid¶
$regions regionnumber = 1 basegeometry = semiellipsoid regionpriority = 1 basecoordinates = xmin xmax ymin ymax zmin zmax topcoordinates = xtop ytop ztop $end_regionsBase plane of the semiellipsoid must be in a coordinate plane. This plane is identified by the implicit rule, that a pair of coordinate values (e.g. ymin ymax) has identical values (ymin = ymax).
In this example, the plane is in the (x,z)coordinate plane. Top coordinates specify an arbitrary point “above” the ellipse, representing the base of the semiellipsoid.
 Example
A 3D sphere can be constructed from two semiellipsoids. However, it is obviously easier to use
sphere
instead.In this example, the bottom planes of the two halfspheres are at z = 5 nm. The upper halfsphere extends from 5 nm to 6 nm, the lower halfsphere from 5 nm to 4 nm. The extensions in x and y directions for both halfspheres are from 4 nm to 6 nm.
Consequently, the sphere has a diameter of 2 nm.
regionnumber = 1 basegeometry = semiellipsoid ! (upper halfsphere) basecoordinates = 4.0 6.0 4.0 6.0 5.0 5.0 ! xmin xmax ymin ymax zmin=zmax topcoordinates = 5.0 5.0 6.0 ! xtop ytop ztop regionnumber = 2 basegeometry = semiellipsoid ! (lower halfsphere) basecoordinates = 4.0 6.0 4.0 6.0 5.0 5.0 ! xmin xmax ymin ymax zmin=zmax topcoordinates = 5.0 5.0 4.0 ! xtop ytop ztop
hexagonalobelisk¶
$regions regionnumber = 1 basegeometry = hexagonalobelisk regionpriority = 1 basecoordinates = xmin xmax ymin ymax zmin zmax topcoordinates = xmin xmax ymin ymax zmin zmax $end_regionsBase and top plane of the hexagonalobelisk have to be in parallel coordinate planes. These planes are identified by the implicit rule, that a pair of coordinate values (e.g. zmin zmax) has the same value (zmin = zmax). In this example, the plane is in the (x,y)coordinate plane. The remaining four coordinates specify a rectangle in the corresponding plane.
This geometry element is useful for wurtzite.
Many thanks to Lu FuFa (Institute of Technology (CCIT), Taiwan, R.O.C.) for useful suggestions regarding the implementation of this geometry element.
Two hexagonalobelisk shapes are possible:
 ‘hexagonalcylinder’ with 6fold rotational symmetry axis oriented along the z direction (i.e. zmin = zmax).
Requirements:  xmin(base) = xmin(top)  xmax(base) = xmax(top)  ymin(base) = ymin(top)  ymax(base) = ymax(top)
Note
This condition should be fullfilled:
ymax(base)  ymin(base) > (xmax(base)  xmin(base)) / 0.866
where 0.866 = \(cos \pi/6\)
 ‘hexagonalpyramid’ with 6fold rotational symmetry axis oriented along the z direction (i.e. zmin = zmax).
Requirements:  xmin(top), xmax(top), ymin(top), ymax(top) arbitrary
Note
This condition should be fullfilled:
ymax  ymin > (xmax  xmin) / 0.866
For both shapes it holds:
height of pyramid/cylinder: zmax(top)  zmax(base) (zmin = zmax)
width in x direction (distance between two parallel planes): xmax(base)  xmin(base)
width in y direction (distance between two corners) if the condition ymax(base)  ymin(base) > (xmax(base)  xmin(base)) / 0.866 is fullfilled:
If the above cited condition is not fullfilled, then the width is: ymax(base)  ymin(base)
width along y > width along x if ymax(base)  ymin(base) > xmax(base)  xmin(base)
center of hexagonal base plane on x axis: 0.5*(xmin(base) + xmax(base))
center of hexagonal base plane on y axis: 0.5*(ymin(base) + ymax(base)): ymin(base) and ymax(base) can be used to shift the hexagon along the y axis.
Two sides of the hexagonal base plane are aligned parallel to the y axis. To rotate the hexagonal base plane by 30 degrees, the user has to specify values for xmin(top), xmax(top), ymin(top), ymax(top) so that it holds:
xmax(top)  xmin(top) > ymax(top)  ymin(top)
In this case it holds:
width in x direction (distance between two corners) if the condition xmax(base)  xmin(base) > (ymax(base)  ymin(base)) / 0.866 is fullfilled:
width in y direction (distance between two parallel planes): ymax(base)  ymin(base)
width along y < width along x if xmax(base)  xmin(base) > ymax(base)  ymin(base)
center of hexagonal base plane on x axis: 0.5*(xmin(base) + xmax(base)): xmin(base) and xmax(base) can be used to shift the hexagon along the x axis.
If the 6fold rotational axis is oriented along the x (i.e. xmin = xmax) or y directions (i.e. ymin = ymax), cyclic permutations hold for the above statements.
 Example
Hexagonal shaped pyramid with flat top plane:
Hexagonal shaped pyramid:
Hexagonal shaped “cylinder”:
triangularprism¶
$regions regionnumber = 1 basegeometry = triangularprism regionpriority = 1 cornercoordinates = x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 $end_regionsRestrictions:
triangularprism
must be oriented so that the triangles are perpendicular to either the x, y or z directions.Example: Triangles perpendicular to z direction. Then it must hold:
cornercoordinates
z1 = z2 = z3
4 = z5 = z6
In addition it holds:
x1 = x4, y1 = y4
x2 = x5, y2 = y5
x3 = x6, y3 = y6
 Example
$regions regionnumber = 1 basegeometry = triangularprism regionpriority = 1 cornercoordinates = x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 $end_regions