<LATTICEGRAPH>The edge in the unit cell goes from vertex 1 in the cell to vertex 1 in the cell to the right (with an offset +1), as described in the EDGE element. The offet of 0 in the SOURCE element was omitted, as 0 is the default value for the offet.
<FINITELATTICE>
<LATTICE dimension="1"/>
<EXTENT size="6"/>
<BOUNDARY type="open"/>
</FINITELATTICE>
<UNITCELL dimension="1" vertices="1">
<VERTEX/>
<EDGE>
<SOURCE vertex="1"/>
<TARGET vertex="1" offset="1"/>
</EDGE>
</UNITCELL>
</LATTICEGRAPH>
<LATTICE name="square" dimension="2">Here we made use of the predefinition of named lattices and unit cells (e.g. in a library), which we can then combine be referencing them in the LATTICEGRAPH element. Alternatively we could have defined everything in the LATTICEGRAPH element:
<BASIS>
<VECTOR> 1 0 </VECTOR>
<VECTOR> 0 1 </VECTOR>
</BASIS>
</LATTICE>
<FINITELATTICE name="rectangular periodic" dimension="2">
<LATTICE ref="square"/>
<PARAMETER name="L" />
<PARAMETER name="W" default="L" />
<EXTENT dimension="1" size="L"/>
<EXTENT dimension="2" size="W"/>
<BOUNDARY type="periodic"/>
</FINITELATTICE>
<UNITCELL name="complex example" dimension="2" vertices="2">
<VERTEX id="1" type="0"><COORDINATE> 0.3 0.7 </COORDINATE></VERTEX>
<VERTEX id="2" type="1"><COORDINATE> 0.6 0.3 </COORDINATE></VERTEX>
<EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="1 0"/></EDGE>
<EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="0 1"/></EDGE>
<EDGE><SOURCE vertex="1"/><TARGET vertex="2"/></EDGE>
</UNITCELL>
<LATTICEGRAPH>
<FINITELATTICE ref="rectangular periodic"/>
<UNITCELL ref="complex example"/>
</LATTICEGRAPH>
<LATTICEGRAPH>
<FINITELATTICE dimension="2">
<LATTICE dimension="2">
<BASIS>
<VECTOR> 1 0 </VECTOR>
<VECTOR> 0 1 </VECTOR>
</BASIS>
<PARAMETER name="L" />
<PARAMETER name="W" default="L" />
<EXTENT dimension="1" size="L"/>
<EXTENT dimension="2" size="W"/>
<BOUNDARY type="periodic"/>
</FINITELATTICE>
<UNITCELL dimension="2" vertices="2">
<VERTEX id="1" type="0"><COORDINATE> 0.3 0.7 </COORDINATE></VERTEX>
<VERTEX id="2" type="1"><COORDINATE> 0.6 0.3 </COORDINATE></VERTEX>
<EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="1 0"/></EDGE>
<EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="0 1"/></EDGE>
<EDGE><SOURCE vertex="1"/><TARGET vertex="2"/></EDGE>
</UNITCELL>
</LATTICEGRAPH>
Since both coordinates for the vertices in the unit cell, as well as basis
vectors for the lattice are given, the coordinates of all vertices can be
calculated.