:py:mod:`alhambra.seeds`
========================

.. py:module:: alhambra.seeds


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

Classes
~~~~~~~

.. autoapisummary::

   alhambra.seeds.Seed
   alhambra.seeds.SeedSupportingScadnano
   alhambra.seeds.SeedFactory
   alhambra.seeds.DXAdapter
   alhambra.seeds.DXOrigamiSeed
   alhambra.seeds.DiagonalSESeed



Functions
~~~~~~~~~

.. autoapisummary::

   alhambra.seeds._convert_adapts



Attributes
~~~~~~~~~~

.. autoapisummary::

   alhambra.seeds.T
   alhambra.seeds.seed_factory


.. py:data:: T

   

.. py:class:: Seed


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

   Abstact Base Class for a seed structure.

   Generally, seeds need:

   - A method to convert the seed to xgrow-usable information.
   - Methods to convert the seed to and from a dict, for storage

   .. py:method:: to_xgrow(gluenamemap: Callable[[str], str] = lambda x: x, offset: tuple[int, int] | None = None, xgtiles: Optional[Sequence[xgrow.tileset.Tile]] = None) -> tuple[list[xgrow.tileset.Tile], list[xgrow.tileset.Bond], xgrow.tileset.InitState]
      :abstractmethod:

      Create xgrow implementation of the seed.

      Converts the Seed to a list of xgrow tiles to add to a system, a list of bonds to add,
      and an initial state.


   .. py:method:: to_dict() -> dict
      :abstractmethod:


   .. py:method:: from_dict(d: dict) -> T
      :classmethod:
      :abstractmethod:



.. py:class:: SeedSupportingScadnano


   Bases: :py:obj:`Seed`

   Abstact Base Class for a seed structure.

   Generally, seeds need:

   - A method to convert the seed to xgrow-usable information.
   - Methods to convert the seed to and from a dict, for storage

   .. py:method:: ho_from_seed_offset(seed_offset: tuple[int, int], gridysize: int) -> tuple[int, int]
      :abstractmethod:


   .. py:method:: to_scadnano(design: scadnano.Design, helix: int, offset: int) -> list[scadnano.Strand]
      :abstractmethod:



.. py:class:: SeedFactory


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

      

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


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



.. py:class:: DXAdapter


   .. py:attribute:: name
      :type: str | None

      

   .. py:attribute:: edges
      :type: list[str] | None

      

   .. py:attribute:: tilebase
      :type: str | None

      

   .. py:attribute:: loc
      :type: int | None

      

   .. py:attribute:: sequences
      :type: list[str] | None

      

   .. py:method:: from_dict(d: dict) -> DXAdapter
      :classmethod:


   .. py:method:: to_dict() -> dict


   .. py:method:: xgrow_edges(i: int, xgtiles: Optional[Sequence[xgrow.tileset.Tile]], gluenamemap: Callable[[str], str]) -> list[str | int]



.. py:class:: DXOrigamiSeed


   Bases: :py:obj:`Seed`

   Abstact Base Class for a seed structure.

   Generally, seeds need:

   - A method to convert the seed to xgrow-usable information.
   - Methods to convert the seed to and from a dict, for storage

   .. py:attribute:: adapters
      :type: list[DXAdapter]

      

   .. py:attribute:: use_adapters
      :type: list[str] | None

      

   .. py:method:: from_dict(d: dict) -> DXOrigamiSeed
      :classmethod:


   .. py:method:: to_dict() -> dict


   .. py:method:: to_xgrow(gluenamemap: Callable[[str], str] = lambda x: x, offset: tuple[int, int] | None = None, xgtiles: Optional[Sequence[xgrow.tileset.Tile]] = None) -> tuple[list[xgrow.tileset.Tile], list[xgrow.tileset.Bond], xgrow.tileset.InitState]

      Create xgrow implementation of the seed.

      Converts the Seed to a list of xgrow tiles to add to a system, a list of bonds to add,
      and an initial state.



.. py:function:: _convert_adapts(adapters: Sequence[tuple[str | alhambra.glues.Glue, str | alhambra.glues.Glue]]) -> list[tuple[alhambra.glues.Glue, alhambra.glues.Glue]]


.. py:class:: DiagonalSESeed


   Bases: :py:obj:`Seed`

   Tall rectangle origami to DX-tile seed (Barish et al)

   .. py:attribute:: adapters
      :type: Sequence[tuple[alhambra.glues.Glue, alhambra.glues.Glue]]

      

   .. py:method:: to_dict() -> dict


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


   .. py:method:: to_xgrow(gluenamemap: Callable[[str], str] = lambda x: x, offset: tuple[int, int] | None = None, xgtiles: Optional[Sequence[xgrow.tileset.Tile]] = None) -> tuple[list[xgrow.tileset.Tile], list[xgrow.tileset.Bond], xgrow.tileset.InitState]

      Create xgrow implementation of the seed.

      Converts the Seed to a list of xgrow tiles to add to a system, a list of bonds to add,
      and an initial state.



.. py:data:: seed_factory

   

