:py:mod:`alhambra.grid`
=======================

.. py:module:: alhambra.grid


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   alhambra.grid.Lattice
   alhambra.grid.AbstractLattice
   alhambra.grid.LatticeSupportingScadnano
   alhambra.grid.AbstractLatticeSupportingScadnano
   alhambra.grid.ScadnanoLattice
   alhambra.grid.SSTLattice
   alhambra.grid.LatticeFactory



Functions
~~~~~~~~~

.. autoapisummary::

   alhambra.grid._skip_polyT_and_inertname
   alhambra.grid.sst_10_11_hofromxy



Attributes
~~~~~~~~~~

.. autoapisummary::

   alhambra.grid.AL
   alhambra.grid.lattice_factory


.. py:class:: Lattice


   Bases: :py:obj:`abc.ABC`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:property:: seed
      :type: alhambra.seeds.Seed | None
      :abstractmethod:


   .. py:method:: __getitem__(index) -> str | Any
      :abstractmethod:


   .. py:method:: __setitem__(index, v)
      :abstractmethod:


   .. py:method:: asdict() -> dict[str, Any]
      :abstractmethod:


   .. py:method:: fromdict(d: dict[str, Any]) -> Lattice
      :classmethod:



.. py:class:: AbstractLattice(v: AbstractLattice | numpy.ndarray, seed: alhambra.seeds.Seed | None = None, seed_offset: tuple[int, int] | None = None)


   Bases: :py:obj:`Lattice`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:property:: tilenames
      :type: list[str]


   .. py:attribute:: grid
      :type: numpy.ndarray

      

   .. py:attribute:: seed
      :type: alhambra.seeds.Seed | None

      

   .. py:attribute:: seed_offset
      :type: tuple[int, int]
      :value: (0, 0)

      

   .. py:method:: __getitem__(index) -> str | Any


   .. py:method:: __setitem__(index, v)


   .. py:method:: asdict() -> dict[str, Any]


   .. py:method:: fromdict(d: dict[str, Any]) -> AL
      :classmethod:


   .. py:method:: empty(shape)
      :classmethod:



.. py:class:: LatticeSupportingScadnano


   Bases: :py:obj:`Lattice`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:attribute:: seed
      :type: alhambra.seeds.SeedSupportingScadnano | None

      

   .. py:method:: to_scadnano_lattice() -> ScadnanoLattice
      :abstractmethod:


   .. py:method:: to_scadnano(tileset: alhambra.tilesets.TileSet) -> scadnano.Design



.. py:class:: AbstractLatticeSupportingScadnano(v: AbstractLattice | numpy.ndarray, seed: alhambra.seeds.Seed | None = None, seed_offset: tuple[int, int] | None = None)


   Bases: :py:obj:`AbstractLattice`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:attribute:: seed
      :type: alhambra.seeds.SeedSupportingScadnano | None

      

   .. py:method:: to_scadnano_lattice() -> ScadnanoLattice
      :abstractmethod:


   .. py:method:: to_scadnano(tileset: alhambra.tilesets.TileSet) -> scadnano.Design



.. py:class:: ScadnanoLattice


   Bases: :py:obj:`LatticeSupportingScadnano`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:attribute:: positions
      :type: dict[tuple[int, int], str]

      

   .. py:attribute:: seed
      :type: alhambra.seeds.SeedSupportingScadnano | None

      

   .. py:attribute:: seed_position
      :type: tuple[int, int]
      :value: (0, 0)

      

   .. py:method:: __getitem__(index: tuple[int, int]) -> str | None


   .. py:method:: __setitem__(index: tuple[int, int], v: str)


   .. py:method:: findtile(tile: str | alhambra.tiles.Tile) -> list[tuple[int, int]]


   .. py:method:: to_scadnano_lattice() -> ScadnanoLattice


   .. py:method:: asdict() -> dict[str, Any]
      :abstractmethod:


   .. py:method:: fromdict(d: dict[str, Any])
      :classmethod:



.. py:data:: AL

   

.. py:function:: _skip_polyT_and_inertname(glue: alhambra.glues.Glue) -> bool


.. py:function:: sst_10_11_hofromxy(x: int, y: int, start_helix: int, start_o: int, p: Literal[10, 11] = 10) -> tuple[int, int]


.. py:class:: SSTLattice(v: AbstractLattice | numpy.ndarray, seed: alhambra.seeds.Seed | None = None, seed_offset: tuple[int, int] | None = None)


   Bases: :py:obj:`AbstractLatticeSupportingScadnano`

   A lattice of flatish tiles.  Position 0,0 is a 10nt-north tile.

   .. py:method:: to_scadnano_lattice() -> ScadnanoLattice



.. py:class:: LatticeFactory


   .. py:attribute:: types
      :type: dict[str, Type[Lattice]]

      

   .. py:method:: register(c: Type[Lattice], n: Optional[str] = None)


   .. py:method:: from_dict(d: dict[str, Any]) -> Lattice



.. py:data:: lattice_factory

   

