|    |  | Domain coordinatesOrientation of crystal relative to simulation coordinate 
systemThe overall simulation domain, that is the real space region in which the 
device is defined, is restricted to a cuboid, a rectangle, or a line - dependent 
on the dimension for the simulation. The extension of this domain must be 
specified by its minimum and maximum value along the corresponding
coordinate axes. The complete simulation domain will be "filled" with 
material information later. Additionally, the orientation of the global three-dimensional coordinate 
system must be oriented with respect to the crystal and some information about a 
substrate for pseudomorphic growth must be given. Keyword - Specifier syntax!----------------------------------------------------!
 $domain-coordinates                         required ! The global simulation domain is 
restricted to be a cuboid, a plane or a line.
  domain-type              
   integer_array
required ! 1 1 1  for xyz-grid, 1 0 1
 for xz-grid, 1 1 0
 for xy-grid ..., 1 0 0
 for x-grid
                                                       !  redundant 
information:$simulation-dimension, orientation = ...is now used. However, this specifier must be still there (CHECK: WHY???).
  x-coordinates               
double_array 
optional ! xmin,xmax of simulation domain
  y-coordinates                 double_array 
optional ! ymin,ymax of simulation domain
  z-coordinates               
double_array 
optional ! zmin,zmax of simulation domain
                                                      
!Miller 
indices of plane perpendicular tohkl-x-direction-zb            
integer_array optional !
 x-coordinate 
axis of simulation coordinate system, e.g. (1 0 0)which 
corresponds to [100] directionMiller 
indices of plane perpendicular tohkl-y-direction-zb           
integer_array optional !
 y-coordinate 
axis of simulation coordinate system, e.g. (0 1 0)which 
corresponds to [010] direction
  hkl-z-direction-zb    
       integer_array optional ! Miller 
indices of plane perpendicular to z-coordinate 
axis of simulation coordinate system, e.g. (0 0 1)which 
corresponds to [001] direction
                                                      
!four-digit Miller-Bravais indices of (hkil) plane that is 
perpendicular tohkil-x-direction             
integer_array optional !
 x-coordinate 
axis direction
  hkil-y-direction      
       integer_array optional ! four-digit Miller-Bravais 
indices of (hkil) plane that is perpendicular to y-coordinate 
axis direction
  hkil-z-direction             
integer_array optional ! four-digit Miller-Bravais indices of (hkil) plane that is 
perpendicular to z-coordinate 
axis direction
 relevant if strain related quantities have to be consideredgrowth-coordinate-axis       integer_array optional !
  pseudomorphic-on             character     optional ! a default material or user defined name
  alloy-concentration           double        optional ! 
in case, that default material is a ternary
  pressure                     double        optional !lattice-constants     
      double_array  optional !
  lattice-constants-temp-coeff double_array  optional !
  crystal-type                 character     optional ! required for 
nondefault substrate material: e.g.
zincblende, wurtzite
 wurtzite-rotation-matrix     character     optional !
 $end_domain-coordinates        
            required !
 !----------------------------------------------------!
   Descriptiondomain-type = l m nl={0,1} , 
m={0,1} , n={0,1} , 
l+m+n=dimension (see
$simulation-dimension)This specifier contains redundant information, i.e. the same information 
as
 $simulation-dimension, orientation = ...which 
is now used.However, the specifier
  domain-type
must be still there (CHECK: WHY???).although the values specified here can be arbitrary.
   Domain extension - Minimum and maximum coordinates:  x-coordinates = xmin  xmax
  y-coordinates = ymin  ymax
  z-coordinates = zmin  zmax
 Only entries for the coordinate axes specified by orientation.
min, max are double precision reals.
  x-coordinates = 0.0d0  350.0d0   Crystal rotations with respect to simulation coordinate systemIf hkl-x-direction-zb, ..., hkil-x-direction-wz, 
... are not specified in the input file, the default directions 
miller-default-direction-of-x, miller-default-direction-of-y as specified in the database in $zb-restrictions or $wz-restrictionsare used. This default coincides with the crystal fixed cartesian 
coordinate system. Zincblende The orientation of the crystal with respect to the general three-dimensional 
simulation coordinate system is fixed by the specification of the Miller 
indices of two perpendicular planes.The Miller indices define a plane. There exists a vector that is perpendicular to this plane, e.g. in zinc blende blende materials, the [hkl] 
vector is always perpendicular to the (hkl) plane.
 However, for wurtzite, this is not necessarily true. For instance, although the [0001] vector is perpendicular to the (0001) plane, in general is does not hold that the vector that is perpendicular to the (hkil) plane is 
given by [hkil].
  hkl-x-direction-zb  =  0  1  0  ! Specify (hkl) plane perpendicular to x axis. In zinc blende the x 
axis is then along this [hkl] direction. Here, (hkl) = (010).
  hkl-y-direction-zb  =  0  0  1  ! Specify (hkl) plane perpendicular to y axis. In zinc blende the y 
axis is then along this [hkl] direction. Here, (hkl) = (001).
 In this example, the x-axis of the simulation coordinate system is directed 
perpendicular to the (0 1 0) plane, 
i.e. 
along [010] of the zinc blende crystal (crystal coordinate 
system).The y-axis of the simulation coordinate system is directed perpendicular 
to the (
 0 0 1) plane, i.e. 
along along [001]
of the 
zinc blende crystal. The direction of the third axis 
is calculated internally.
 Default is:
 
  hkl-x-direction-zb  =  1  0  0  ! x axis perpendicular to (1 0 0) plane, 
i.e. parallel to [100] direction
  hkl-y-direction-zb  =  0  1  
0
 ! 
y axis perpendicular to (0 1 0) 
plane, i.e. parallel to [010] directionz axis perpendicular to ((hkl-z-direction-zb  =  0  0  1) !
0 0 1) 
plane, i.e. parallel to [001] directionExample:
 
  hkl-z-direction-zb  =  3  1  
1  ! x axis perpendicular to (3 1 
1) plane, i.e. parallel to [311] directiony axis perpendicular to (hkl-y-direction-zb  =  0  1 -1  !
0 -1 -1) 
plane, i.e. parallel to [0-1-1] directioncalculated internally.)(hkl-x-direction-zb
 In zinc blende crystals, the cation (metallic elements) polarity is labeled 
{111}A, and the anion polarity is {111}B, which is {11-1}: Wurtzite Similar as above for wurtzite. 
However, wurtzite is hexagonal and the cartesian axes system is cubic. For that 
reason, some crystallographic equivalent planes will have different indices.This can be solved using 4-digit Miller-Bravais indices (hkil) (i.e. four-axis a1, 
a2, a3, c with a1, a2, a3 
lying in the same plane (=basal plane)).
 Rule: The first three indices must some to zero, i.e. h + k + i = 0
  hkil-x-direction  =  1  0 -1  0 
! The x-axis of the simulation coordinate system is parallel to the vector that is perpendicular to 
the(h k i l) =( 1  0 -1  0 
) plane.
  hkil-y-direction  = -1  2 -1  0
! The y-axis of the simulation coordinate system is parallel to 
the vector that is perpendicular to the(h 
k i l) =(-1  2 -1  0 
) plane.The z-axis of the simulation 
coordinate system is parallel to the vector that is perpendicular to thehkil-z-direction  =  0  0  
0  1 !
(h 
k i l) =
( 0  0  0  1
)  plane. (calculated internally)
 The direction of the third axis is calculated internally.
 Usually for wurtzite, the four-digit Miller-Bravais (or Bravais-Miller) indices
  (h k i l)
are used where i = - (h + k), i.e. i is not 
independent.The four integer values (Miller indices) that are given for
  hkil-x-direction refer to a 
plane. The x direction is then the one that is perpendicular to this plane. This vector along the x axis has indices that are in general 
not identical to the Miller indices hkl in wurtzite.
 Why are four-digit Miller-Bravais indices used in wurtzite? This scheme for 
labeling planes in a hexagonal lattice makes permutation symmetries apparent, 
e.g. the similarity between (110) = (11-20) and (1-20) = (1-210) is more obvious 
when the redundant index
  i is shown. A good reference is F. C. Frank, Acta Cryst. 18, 862 (1965). Popular growth planes for wurtzite 
	polar: c-plane: {0001}, Ga-terminated face (Ga-face or Ga 
	polarity)polar: {000-1}, N-terminated face (N-face 
	or N polarity)nonpolar: m-plane: {10-10}, 
	theta = 90° (angle between growth direction and [0001] direction, i.e. 
	c-direction)
  hkil-x-direction = 0 0  0 -1 
	! x coordinate axis is perpendicular to (0 0 0 -1) 
	plane
  hkil-z-direction = 1 0 -1  
	0 
	! z coordinate axis is perpendicular to (1 0 -1 
	0) planeIf one grows the quantum well perpendicular to the (10-10) plane, then the pyroelectric and piezoelectric fields along the 
	growth direction z 
	are zero.
nonpolar: a-plane: 
	{11-20}semi-polar: (1-101) planesemi-polar: (10-11) plane, Ga-facesemi-polar: (10-13) plane, Ga-facesemi-polar: (10-1-1) plane, N-facesemi-polar: (10-1-3) plane, N-facesemi-polar: (11-22) plane, Ga-face
   hkil-x-direction = -1 -1  2  3
	! x coordinate axis is perpendicular to (-1 
	-1 2 3) plane
   hkil-y-direction =  1 -1  0  
	0 ! y coordinate axis is perpendicular to (1 
	-1 0 0) plane
 ! hkil-z-direction =  ?  ?  ?  
	? ! is normal to (11-20) plane (This direction is not needed 
	in the input file. It is sufficient to specify only two axes: hkil-x-direction and hkil-x-direction.)The
  hkil-x-direction = -1 -1 2 3 forms an angle of about 32° with the vector perpendicular to the (0001) 
	plane.
 a-plane and m-plane are orthogonal to each other.   Let's look at a further example. (This should be checked again.) 
	semi-polar: (-1-12-2) planex coordinate axis is perpendicular to (hkil-x-direction  =  1  -1   
	0  0  
!
 1 
	-1  0  0) plane
  hkil-y-direction  = -1  -1   
	2  3 
! y coordinate axis is perpendicular to (-1 
	-1  2  3) planez coordinate axis is perpendicular to (hkil-z-direction  =  8   
	8 -16  9  !
 
	8  8 -16 9) planeIn this example, the
 (1  -1   
	0  0)
	plane is orthogonal to both (-1  -1   
	2  3) and (8   
	8 -16  9)planesbut the direction
  [-1  -1   2  3]  is not orthogonal to the direction [8   8 -16  
	9].The reason for the latter is that the hexagonal unit cell in real crystals 
	does not fulfill the ideal c/a ratio, where it holds c/a = SQRT(3/8) = 
	1.63299....
 a and c are the lattice constants.
 Assuming that the lattice constants 
	fulfill the ratio c/a, i.e.
    %ideal_c = SQRT(8/3) * 0.3189
	lattice-constants =    0.3189d0   
	0.3189d0     %ideal_c                            
	! [nm] a,a,c
 ! lattice-constants =    0.3189d0   
	0.3189d0   0.52076151931570366367674259428247d0  ! 
	[nm] a,a,c
then the orthogonality relation for
  hkil-z-direction  =
	 8   8 -16  9  would 
	be fulfilled. An alternative solution for the real c/a ratio would have 
	been:wherehkil-z-direction  =  100000000000   
	100000000000   -200000000000   113483513101 !
 113483513101 = 3 * a^2 / c^2.A user reported: "For example for (10-1-1) I use these 2 
	planes: (1 -2 1 0) and (-178 0 178 101)." When a simulation is performed, the screen output is redirected to a 
.log file which has the same name as the input file.This file contains some information about rotation of coordinate axes, e.g. for 
the following settings
 
 
     domain-type      =
0 0 1x axis perpendicular to (1-100) planehkil-x-direction = 1 -1  0  0   !
y axis perpendicular to (11-23) planehkil-y-direction = 1  1 -2 -3   !
z axis perpendicular to (11-21) plane!hkil-z-direction = 1  1 -2  1   !
the following is written out:
 
 
     ....
     wurtzite crystal orientation (Bravais-Miller indices as 
specified in input file or database)hkil-x-direction = 1.000000 -1.000000  
0.000000  0.000000
 hkil-y-direction = 1.000000  
1.000000 -2.000000 -3.000000
 
 wurtzite crystal orientation (Bravais-Miller indices [hkil] 
are cooked down to 3 lattice axes used [hkl].)
 hkl-x-direction = 1.000000 -1.000000  
0.000000
 hkl-y-direction = 3.000000  
3.000000 -3.000000
 3rd direction   = 0.408248  
0.408248  0.816497
 3rd direction corresponds to (hkil) plane     
= ( 0.408248 0.408248 -0.816497 0.816497)
 $domain-coordinates: Getting lattice constants for substrate 
material = GaN
 substrate lattice constants for material 1 = 0.31890000 
0.31890000 0.51850000 [nm]
 c/a ratio in wurtzite = 1.625901537 
(ideal ratio = 1.632993162).
 3rd direction corresponds to [hkil] direction = [
0.408248 0.408248 -0.816497 0.463295]
 angle between hkil directions   =  
90.000000000000 ° (substrate)
 angle between hkil_1 and [0001] =  90.000000000000 ° 
(substrate)
 angle between hkil_2 and [0001] = 148.406680335000 ° 
(substrate)
 
 ----------------------------------------------------------------------
 Rotation matrix for material number = 1:
 ( 0.500000000 -0.866025404  0.000000000 ) (hkl-x-direction)
 ( 0.453699101  0.261943298 -0.851788022 ) (hkl-y-direction)
 ( 0.737670066  0.425894011  0.523886596 ) (hkl-z-direction)
 (transformation matrix for a vector from crystal coordinate 
system to simulation coordinate system: material_info(1)%transform_cxyz_to_xyz)
 
 Eigenvalues:
 ( 0.142914947,  0.989734974) ==> e^(+i theta) = 
cos(theta) + i sin(theta)
 ( 0.142914947, -0.989734974) ==> e^(-i theta) = cos(theta) - 
i sin(theta)
 ( 1.000000000,  0.000000000) ==> eigenvalue = 1: axis of 
rotation
 
 Eigenvector: axis of rotation
 (  0.645466750  0.000000000 )
 ( -0.372660402  0.000000000 )
 (  0.666706007  0.000000000 )
 
 Eigenvector: 2nd and 3rd
 ( -0.183290190 -0.508026617 )
 ( -0.656172319  0.000000000 )
 ( -0.189321403  0.491842410 )
 
 ( -0.183290190  0.508026617 )
 ( -0.656172319 -0.000000000 )
 ( -0.189321403 -0.491842410 )
 
 sin(theta) = (0.9897349735464228,0.0000000000000000)
 cos(theta) = (0.1429149472205782,0.0000000000000000)
 theta = arcsin( sin(theta) ) = 81.783443016 ° = 0.454352461 
[pi] = 1.427390354
 theta = arccos( cos(theta) ) = 81.783443016 ° = 0.454352461 
[pi] = 1.427390354
 ==> rotation angle = 81.783443016 ° = 0.454352461 [pi] = 
1.427390354
 ==> rotation axis  = [ 0.645466750 -0.372660402 
0.666706007 ]
 ----------------------------------------------------------------------
 
 material_orientation: l = 1
 material_info(l)%interface_vector_in_cxyz = [ 0.737670066 
0.425894011 0.523886596 ]
 ...
     Homogeneous strainThe following specifier is only necessary for strain-calculation =
homogeneous-strain or hydrostatic-strain.  growth-coordinate-axis = 1 0 0 ! along x axis of simulation coordinate systemalong y axis of simulation 
coordinate system= 0 1 0 !
along z axis of simulation 
coordinate system= 0 0 1 !
This selects one of the simulation coordinate axes (i.e. either the 
x axis, y axis or z axis) as the growth direction. 
For example= l m n ! l={0,1} , 
m={0,1} , n={0,1} ,
l+m+n=1
 
 
if the z axis is to be specified as 
the growth axis (don't confuse this with the Miller 
indices 
above). The z axis itself has default orientationgrowth-coordinate-axis = 0 0 1
 
  hkl-z-direction-zb     = 0 0 1but it can be chosen to be oriented along any other crystal direction, e.g. 
along the vector perpendicular to the (311) plane:
  hkl-z-direction-zb     = 3 1 1The growth direction is only important for the calculation of pseudomorphic 
strain as it enters the equation to calculate the strain tensor:
 
is needed.$simulation-flow-control
 ...
 strain-calculation = hydrostatic-strain            
! growth-coordinate-axis
is needed.strain-calculation = homogeneous-strain             
! growth-coordinate-axis
is  not needed.! strain-calculation = homogeneous-strain-sim-system  
! growth-coordinate-axis
 If growth-coordinate-axis is not present, the default value 
for 1D simulations is the simulation axis.For 2D/3D simulations, the default value of 
the
 
  database_nn3.in file 
is taken specified in
$domain-coordinates-defaults.   Specification on which material all layers are grown pseudomorphically.This can 
be either a material known from the database or a user defined name.
 In the 
latter case, an entry for the lattice constants and the crystal type of this 
user defined material must be supplied.
 In case of pseudomorphic growth on a 
known ternary, its alloy concentration must be specified.
 This specifier is not used for
  strain-calculation =
strain-minimization but it is used for strain-calculation =
strain-minimization-new.In the former case, the lattice constant of the substrate is extracted from
  substrate-cluster-number  ($strain-minimization-model).  pseudomorphic-on = GaAs   
! If strain calculation is omitted, this specifier is optional. However, 
for wurtzite, we still require it. (Should be fixed in the code.)
 GaAs would be a known binary material, so no further input is required here. Alloy concentration of ternary substrate (e.g. pseudomorphic-on 
= Al(x)Ga(1-x)As)  alloy-concentration = 0.3d0 ! Al0.3Ga0.7Asalloy-concentration = x     
! x={0.0d0,1.0d0}
 If pseudomorphic growth is assumed to take place on an unknown material (e.g.
pseudomorphic-on = banana) the lattice constants of this material 
and its crystal structure must be specified.For the structure of the crystal, 
only wurtzite and zinc blende are possible choices at the moment. In wurtzite, 
the lattice constant orderering is
  a, a,
c.  lattice-constants            = 0.4d0    0.4d0    0.4d0More information on temperature dependent lattice constants...lattice-constants-temp-coeff = 3.88d-6  
3.88d-6  3.88d-6  ! [nm/K]
 
  also used for diamond-type materialscrystal-type = 
zincblende !
=
wurtzite
  pressure     = 9.4      
 ! [GPa]The substrate could be strained by an additional external pressure.
   Rotation of wurtzite crystals The ideal axial ratio of the hexagonal lattice (hexagonal close-packed structure) of c/a in wurtzite crystals is SQRT(8/3)=1.63299....However, in real wurtzite crystals such as GaN, AlN and InN, the c/a ratio is 
slightly different.
 c is the lattice constant perpendicular the (0001) plane, a is the lattice 
constant that lies in the (0001) plane.
 In order to specify the rotation matrix that rotates the crystal 
		coordinate system to the simulation coordinate system, the Miller-Bravais 
		indices of the planes have to be specified (hkil-x-direction, 
		...), see the detailed description above.  wurtzite-rotation-matrix =
c-a-ratio-substrate       
! Each material is using the rotation matrix of the common (or local) 
substrate, i.e. substrate's c/a ratio. (default) ([Romanov2006] seems to use the common substrate model.)
                                               
       ! (Note that nextnano³ 
allows to enter (optionally) for each material its own substrate, therefore the 
term '(or local)' in the previous sentence.)
                           
= c-a-ratio-ideal           ! Each material is using the rotation matrix of the ideal wurtzite crystal. (This 
is the implementation of nextnano++.) The rotation matrix for all materials is the same.Each material is using the rotation 
matrix of its local c/a ratio (not implemented yet, not sure if this can be 
useful, e.g. for linearly graded alloys)= c-a-ratio-local           
!
                         
 For example, the angle between the plane (10-1-3) and the c plane (0001) is 
different for (see e.g. [Romanov2006]A. E. Romanov et al., JAP 
100, 023522 (2006)) 
			AlN (31.64°)GaN (32.04°)InN (31.81°) andthe ideal wurtzite crystal (32.15°). So if we specify hkil-x-direction = 1 0 -1 -3, 
we have to define which c/a ratio we want to use. c-a-ratio-substrate: By 
		default, for each material the c/a ratio of its global substrate is 
		used, i.e. the substrate's c/a ratio is used.The crystal coordinate system has been rotated to the simulation coordinate system assuming the 
		substrate's c/a ratio.
 Therefore, for all materials, the same rotation matrix is used (unless 
		one specifies for a material its own substrate).
 
 
  c-a-ratio-ideal:
		Optionally, the user can specify to use the ideal c/a ratio in order to be consistent with 
		the nextnano++ implementation.The crystal coordinate system has been rotated to the simulation coordinate system assuming the ideal c/a ratio.
 For all materials, the same rotation matrix is used.
   More 
information on how the rotation is carried out in the program ... |