alhambra.seeds#

Module Contents#

Classes#

Seed

Abstact Base Class for a seed structure.

SeedSupportingScadnano

Abstact Base Class for a seed structure.

SeedFactory

DXAdapter

DXOrigamiSeed

Abstact Base Class for a seed structure.

DiagonalSESeed

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

Functions#

_convert_adapts(→ list[tuple[alhambra.glues.Glue, ...)

Attributes#

T

seed_factory

alhambra.seeds.T[source]#
class alhambra.seeds.Seed[source]#

Bases: 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

abstract to_xgrow(gluenamemap: Callable[[str], str] = lambda x: ..., offset: tuple[int, int] | None = None, xgtiles: Sequence[xgrow.tileset.Tile] | None = None) tuple[list[xgrow.tileset.Tile], list[xgrow.tileset.Bond], xgrow.tileset.InitState][source]#

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.

abstract to_dict() dict[source]#
abstract classmethod from_dict(d: dict) T[source]#
class alhambra.seeds.SeedSupportingScadnano[source]#

Bases: 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

abstract ho_from_seed_offset(seed_offset: tuple[int, int], gridysize: int) tuple[int, int][source]#
abstract to_scadnano(design: scadnano.Design, helix: int, offset: int) list[scadnano.Strand][source]#
class alhambra.seeds.SeedFactory[source]#
types: dict[str, Type[Seed]][source]#
register(c: Type[Seed], n: str | None = None)[source]#
from_dict(d: dict[str, Any]) Seed[source]#
class alhambra.seeds.DXAdapter[source]#
name: str | None[source]#
edges: list[str] | None[source]#
tilebase: str | None[source]#
loc: int | None[source]#
sequences: list[str] | None[source]#
classmethod from_dict(d: dict) DXAdapter[source]#
to_dict() dict[source]#
xgrow_edges(i: int, xgtiles: Sequence[xgrow.tileset.Tile] | None, gluenamemap: Callable[[str], str]) list[str | int][source]#
class alhambra.seeds.DXOrigamiSeed[source]#

Bases: 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

adapters: list[DXAdapter][source]#
use_adapters: list[str] | None[source]#
classmethod from_dict(d: dict) DXOrigamiSeed[source]#
to_dict() dict[source]#
to_xgrow(gluenamemap: Callable[[str], str] = lambda x: ..., offset: tuple[int, int] | None = None, xgtiles: Sequence[xgrow.tileset.Tile] | None = None) tuple[list[xgrow.tileset.Tile], list[xgrow.tileset.Bond], xgrow.tileset.InitState][source]#

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.

alhambra.seeds._convert_adapts(adapters: Sequence[tuple[str | alhambra.glues.Glue, str | alhambra.glues.Glue]]) list[tuple[alhambra.glues.Glue, alhambra.glues.Glue]][source]#
class alhambra.seeds.DiagonalSESeed[source]#

Bases: Seed

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

adapters: Sequence[tuple[alhambra.glues.Glue, alhambra.glues.Glue]][source]#
to_dict() dict[source]#
classmethod from_dict(d: dict[str, Any]) DiagonalSESeed[source]#
to_xgrow(gluenamemap: Callable[[str], str] = lambda x: ..., offset: tuple[int, int] | None = None, xgtiles: Sequence[xgrow.tileset.Tile] | None = None) tuple[list[xgrow.tileset.Tile], list[xgrow.tileset.Bond], xgrow.tileset.InitState][source]#

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.

alhambra.seeds.seed_factory[source]#