khive_crystal.crystal_structure API documentation

# Module `khive_crystal.crystal_structure`

## Functions

`def e(i: int) ‑> collections.abc.Callable[[khive_crystal.khive.KHive | list[khive_crystal.khive.KHive]], khive_crystal.khive.KHive | None | list[khive_crystal.khive.KHive | None]]`

  The entry point of e_i. Given H and i, return e_i(H) by appropriate crystal structure.

  ## Args

  `i` :`int`
    i in I

  ## Returns

  `Callable[[Union[KHive, List[KHive]]], int]`
    f_i

  ## Examples

      >>> H: KHive = KHive(
      ...    n=3,
      ...    alpha=[3, 2, 0],
      ...    beta=[2, 3, 0],
      ...    gamma=[0, 0, 0],
      ...    Uij=[[1, 0], [0]]
      ... )
      >>> e(i=1)(H)
      KHive(n=3, alpha=[3, 2, 0], beta=[3, 2, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])

      >>> H = KHive(
      ...     n=3,
      ...     alpha=[1, 1, 0],
      ...     beta=[1, 0, 1],
      ...     gamma=[0, 0, 0],
      ...     Uij=[[0, 0], [1]]
      ... )
      >>> e(i=2)(H)
      KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])

      >>> H: KHive = KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> e(i=2)([H, H])

`def epsilon(i: int) ‑> collections.abc.Callable[[khive_crystal.khive.KHive | list[khive_crystal.khive.KHive]], int]`

  The entry point of epsilon_i. Given H and i, return epsilon_i(H) by appropriate crystal structure.

  ## Args

  `i` :`int`
    i in I

  ## Returns

  `Callable[[Union[KHive, List[KHive]]], int]`
    epsilon_i

  ## Examples

      >>> H: KHive = KHive(
      ...    n=3,
      ...    alpha=[3, 2, 0],
      ...    beta=[2, 3, 0],
      ...    gamma=[0, 0, 0],
      ...    Uij=[[1, 0], [0]]
      ... )
      >>> epsilon(i=1)(H)
      1

      >>> H: KHive = KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> epsilon(i=2)(H)
      0

      >>> H: List[KHive] = [
      ...    KHive(n=3, alpha=[1, 1, 0], beta=[1, 0, 1], gamma=[0, 0, 0], Uij=[[0, 0], [1]]),
      ...    KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]]),
      ... ]
      >>> epsilon(i=2)(H)
      1

`def f(i: int) ‑> collections.abc.Callable[[khive_crystal.khive.KHive | list[khive_crystal.khive.KHive]], khive_crystal.khive.KHive | None | list[khive_crystal.khive.KHive | None]]`

  The entry point of f_i. Given H and i, return f_i(H) by appropriate crystal structure.

  ## Args

  `i` :`int`
    i in I

  ## Returns

  `Callable[[Union[KHive, List[KHive]]], int]`
    f_i

  ## Examples

      >>> H: KHive = KHive(n=3, alpha=[3, 2, 0], beta=[3, 2, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> f(i=1)(H)
      KHive(n=3, alpha=[3, 2, 0], beta=[2, 3, 0], gamma=[0, 0, 0], Uij=[[1, 0], [0]])

      >>> H: KHive = KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> f(i=2)(H)
      KHive(n=3, alpha=[1, 1, 0], beta=[1, 0, 1], gamma=[0, 0, 0], Uij=[[0, 0], [1]])

      >>> H: KHive = KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> f(i=2)([H, H])
      [KHive(n=3, alpha=[1, 1, 0], beta=[1, 0, 1], gamma=[0, 0, 0], Uij=[[0, 0], [1]]), KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])]

`def phi(i: int) ‑> collections.abc.Callable[[khive_crystal.khive.KHive | list[khive_crystal.khive.KHive]], int]`

  The entry point of phi_i. Given H and i, return phi_i(H) by appropriate crystal structure.

  ## Args

  `i` :`int`
    i in I

  ## Returns

  `Callable[[Union[KHive, List[KHive]]], int]`
    phi_i

  ## Examples

      >>> H: KHive = KHive(n=3, alpha=[3, 2, 0], beta=[3, 2, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> phi(i=1)(H)
      1

      >>> H: KHive = KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> phi(i=2)(H)
      1

      >>> H: KHive = KHive(n=3, alpha=[1, 1, 0], beta=[1, 1, 0], gamma=[0, 0, 0], Uij=[[0, 0], [0]])
      >>> phi(i=2)([H, H])
      2