I would like to draw lattice models such as these
In LaTeX, however, I'm not sure where to start from. Is there a way to draw these things without going point by point, line by line, etc., in TikZ?
Generally, I would like to be able to draw tight binding models and label different parts of them (hopping, site energies, interactions, ...) while being able to add details such as the nice red-dotted lines in the pictures, however, given their complexity I was wondering if there were shortcuts.
Edit:
So far, I managed to do this:
with this code:
\documentclass{article}
\usepackage{amsmath}
\usepackage[dvipsnames]{xcolor}
\pagestyle{empty}
\usepackage{miller}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc}
\begin{document}
% set view angle
\tdplotsetmaincoords{0}{0}% rot x rot z
\begin{tikzpicture}[tdplot_main_coords,scale=1.5,
axis/.style={thick, ->, >=stealth'}]
\def \s {0.0} % defines shear of z along y (instead of angles), for orthogonal systems: 0
\def \su {-0.0} % defines shear of x along y (instead of angles), for orthogonal systems: 0
\def \a {3} % unit cells along a (only integers!)
\def \b {3} % unit cells along b (only integers!)
\def \d {0.1} % clusterization differential
%real space lattice
\foreach \u in {0,1,...,\a}
\foreach \v in {0,1,...,\b}
\draw (\u,0) -- (\u+\su*\v,\v);
% lattice directions parallel to a
\foreach \u in {0,1,...,\a}
\foreach \v in {0,1,...,\b}
\draw (0+\su*\v,\v) -- (\u+\su*\v,\v);
\foreach \u in {0,1,...,\a}
\foreach \v in {0,1,...,\b}
\draw plot [mark=*, mark size=1] coordinates{(\u+\su*\v,\v)};
%clusterization
%left
\draw[dashed,red] (-\d,-\d) -- (-\d,1+\d);
%right
\draw[dashed,red] (1+\d,-\d) -- (1+\d,1+\d);
%top
\draw[dashed,red] (-\d,1+\d) -- (1+\d,1+\d);
%bottom
\draw[dashed,red] (-\d,-\d) -- (1+\d,-\d);
%left
\draw[dashed,red] (-\d+2,-\d) -- (-\d+2,1+\d);
%right
\draw[dashed,red] (1+\d+2,-\d) -- (1+\d+2,1+\d);
%top
\draw[dashed,red] (-\d+2,1+\d) -- (1+\d+2,1+\d);
%bottom
\draw[dashed,red] (-\d+2,-\d) -- (1+\d+2,-\d);
%left
\draw[dashed,red] (-\d,-\d+2) -- (-\d,1+\d+2);
%right
\draw[dashed,red] (1+\d,-\d+2) -- (1+\d,1+\d+2);
%top
\draw[dashed,red] (-\d,1+\d+2) -- (1+\d,1+\d+2);
%bottom
\draw[dashed,red] (-\d,-\d+2) -- (1+\d,-\d+2);
%left
\draw[dashed,red] (-\d+2,-\d+2) -- (-\d+2,1+\d+2);
%right
\draw[dashed,red] (1+\d+2,-\d+2) -- (1+\d+2,1+\d+2);
%top
\draw[dashed,red] (-\d+2,1+\d+2) -- (1+\d+2,1+\d+2);
%bottom
\draw[dashed,red] (-\d+2,-\d+2) -- (1+\d+2,-\d+2);
\draw (1,0) -- node[left] {$t$} (1,1);
\draw (0,1) -- node[below] {$t$} (1,1);
\draw (1,1) -- node[above] {$te^{ik_x}$} (2,1);
\draw (1,1) -- node[left] {$te^{ik_y}$} (1,2);
\end{tikzpicture}
\end{document}
However, I don't know how to loop through \a and \b in order to draw the red-dashed lines systematically since I'm not sure how to divide those quantities by two and then take their integer part in LaTeX, is there a way?



