vibe-sketcherDocumentation

vibesketcher.server.cnt_junctions

REST routes for explicit CNT-linker-metal junction models (#240).

Building goes through POST /api/documents/{id}/periodic/build with a kind: cnt_junction recipe (revision-checked, recorded as an edit and undone like any build). These routes list the explicit surface sites and tube attachment carbons a recipe indexes, and preview a junction without storing it.

Functions

router(store)

Classes

JunctionCarbonsRequest(*[, n, m, periods])

JunctionPreviewRequest(*, recipe[, structure])

JunctionSitesRequest(*, metal, miller[, ...])

class vibesketcher.server.cnt_junctions.JunctionSitesRequest(*, metal, miller, layers=3, repeat=(6, 6), surface_atom=None)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

metal: Literal['Cu', 'Au']
miller: tuple[int, int, int]
layers: int
repeat: tuple[int, int]
surface_atom: str | None
class vibesketcher.server.cnt_junctions.JunctionCarbonsRequest(*, n=8, m=0, periods=4, attachment)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

n: int
m: int
periods: int
attachment: Literal['end_on', 'sidewall']
class vibesketcher.server.cnt_junctions.JunctionPreviewRequest(*, recipe, structure=False)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

recipe: dict[str, Any]
structure: bool

Include the built structure in the answer (it can be large).

vibesketcher.server.cnt_junctions.router(store)[source]
Parameters:

store (Store)

Return type:

APIRouter