<LATTICE name="2D" dimension="2"/>Additionally we can specify the cartesian coordinates of the basis vectors of the lattice. For above lattice this would be:
<LATTICE name="2D" dimension="2">
<BASIS>
<VECTOR> 1 0 </VECTOR>
<VECTOR> 0.5 1 </VECTOR>
</BASIS>
</LATTICE>
Basis vectors can also be specified in a symbolic and parametrized way,
such as:
<LATTICE name="2D" dimension="2">
<PARAMETER name="a" default="1"/>
<PARAMETER name="b" default="1"/>
<PARAMETER name="phi" default="Pi/2"/>
<BASIS>
<VECTOR> a 0 </VECTOR>
<VECTOR> b*sin(phi) b*cos(phi) </VECTOR>
</BASIS>
</LATTICE>
<FINITELATTICE name="5x3">If the dimension attribute is omitted, the extent is assumed to apply to all dimensions, e.g. a cubic lattice
<LATTICE name="2D" dimension="2"/>
<EXTENT dimension="1" size="5"/>
<EXTENT dimension="2" size="3"/>
</FINITELATTICE>
<FINITELATTICE>Not all dimensions need to be finite, and an infinite strip of width two can be specified as
<LATTICE dimension="3"/>
<EXTENT size="4"/>
</FINITELATTICE>
<FINITELATTICE name="strip">In many applications the exact extent is not constant, but an input parameter specified by the user. We can again use a
<LATTICE name="2D" dimension="2"/>
<EXTENT dimension="2" size="2"/>
</FINITELATTICE>
PARAMETER
element to specify the extent. For an L x 2 strip this is:<FINITELATTICE>If we want to have a strip of size L x W, with a default value of 2 for the width in case that W is not specified we provide both a
<LATTICE name="2D" dimension="2"/>
<PARAMETER name="L"/>
<EXTENT dimension="1" size="L"/>
<EXTENT dimension="2" size="2"/>
</FINITELATTICE>
size
and a parameter attribute:<FINITELATTICE>Finally, it is often the case that we consider a square (or cubic) lattice of the same extent L in all dimensions, unless we specifically provide other dimensions (e.g. W for the width or H for the height). This can be described as:
<LATTICE name="2D" dimension="2"/>
<PARAMETER name="L" />
<PARAMETER name="W" default="2" />
<EXTENT dimension="1" size="L" />
<EXTENT dimension="2" size="W" />
</FINITELATTICE>
<FINITELATTICE>The first defined parameter spcifies the dimension. Thus in only L is specified by the user, we get a n LxLxL cube, if L and W are specified an LxWxW block. If L and H are specified we get an LxLxH block and if all of L, W and H are defined we get an LxWxH block.
<LATTICE name="3D" dimension="3"/>
<PARAMETER name="L" />
<PARAMETER name="W" default="L" />
<PARAMETER name="H" default="W" />
<EXTENT dimension="1" size="L" />
<EXTENT dimension="2" size="W" />
<EXTENT dimension="2" size="H" />
</FINITELATTICE>
type attribute that can take either of these
values. E.g. for a periodic L x L square lattice:<FINITELATTICE>Or for a strip that is periodic in the long and open in the short direction:
<LATTICE name="2D" dimension="2"/>
<EXTENT size="L" />
<BOUNDARY type="periodic" />
</FINITELATTICE>
<FINITELATTICE name="strip">Alternatively, if the boundary condition is to be defined at run-time, again a
<LATTICE name="strip" dimension="2"/>
<PARAMETER name="W" default="2" />
<EXTENT dimension=1 size="L" />
<EXTENT dimension=2 size="W" />
<BOUNDARY dimension="1" type="periodic" />
<BOUNDARY dimension="2" type="open" />
</FINITELATTICE>
PARAMETER element can be specified to denote the name
of the parameter that will determine the boundary condition and optionally
provide a default value:<FINITELATTICE>This will specify a cubic lattice with boundary conditions given by the parameter BC, and periodic boundary conditions as default.
<LATTICE name="cube" dimension="3"/>
<PARAMETER name="BC" default="periodic" />
<EXTENT size="L" />
<BOUNDARY type="BC" />
</FINITELATTICE>
<FINITELATTICE name = "finite tilted 2D">we can first define the infinite lattice:
<LATTICE name="tilted 2D" dimension="2">
<BASIS>
<VECTOR> 1 0 </VECTOR>
<VECTOR> 0.5 1 </VECTOR>
</BASIS>
</LATTICE>
<PARAMETER name="BC" default="periodic" />
<EXTENT dimension="1" size="L" />
<EXTENT dimension="2" size="W" />
<BOUNDARY type="BC" />
</FINITELATTICE>
<LATTICE name="tilted 2D" dimension="2"And then every time we define a finite sublattice refer to this lattice by using a ref attribute in the lattice element instead of repeating the definition:
<BASIS>
<VECTOR> 1 0 </VECTOR>
<VECTOR> 0.5, 1 </VECTOR>
</BASIS>
</LATTICE>
<FINITELATTICE name = "finite tilted 2D">We envision that a library of common lattices will be built up rapidly.
<LATTICE ref="tilted 2D">
<PARAMETER name="BC" default="periodic" />
<EXTENT dimension="1" size="L" />
<EXTENT dimension="2" size="W" />
<BOUNDARY type="BC" />
</FINITELATTICE>