"""
Functions for making models at Sample level.
"""
from typing import Tuple

import tbplas as tb

from model import make_graphene_pc


__all__ = ["make_graphene_sample"]


def make_graphene_sample(t: float = -2.7,
                         a: float = 0.142,
                         with_onsite: bool = False,
                         dim: Tuple[int, int, int] = (1024, 1024, 1)) -> tb.Sample:
    """
    Make a large graphene sample.

    :param t: hopping integral in eV
    :param a: C-C bond length in NM
    :param with_onsite: whether to use non-zero onsite energies
    :param dim: dimension of the sample
    :return: graphene sample with given dimension
    """
    prim_cell = make_graphene_pc(t, a, with_onsite)
    sample = tb.Sample(tb.SuperCell(prim_cell, dim, pbc=(True, True, False)))
    return sample
