vibe-sketcherDocumentation

vibesketcher.server.polymer_packing

REST routes for amorphous polymer boxes and membranes (#205).

A preview reads the current document and changes nothing; applying is checked against the document revision and recorded as an edit; an applied packing has an undo route that refuses when the packed model changed since. Refusals in a preview are returned with applicable: false and stable codes.

Functions

router(store)

Classes

PackingPreviewRequest(*, packing)

PackingRequest(*[, actor, client])

PackingUndoRequest(*[, actor, client])

class vibesketcher.server.polymer_packing.PackingPreviewRequest(*, packing)[source]

Bases: BaseModel

Parameters:

packing (dict[str, Any])

model_config = {'extra': 'forbid'}

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

packing: dict[str, Any]
class vibesketcher.server.polymer_packing.PackingRequest(*, actor='agent', client='rest', revision, packing)[source]

Bases: RevisionRequest

Parameters:
  • actor (Literal['human', 'agent', 'system'])

  • client (Annotated[str, _PydanticGeneralMetadata(pattern='^[a-z0-9][a-z0-9_.:+-]{0,63}$')])

  • revision (int)

  • packing (dict[str, Any])

packing: dict[str, Any]
model_config = {'extra': 'forbid'}

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

class vibesketcher.server.polymer_packing.PackingUndoRequest(*, actor='agent', client='rest', revision, structure)[source]

Bases: RevisionRequest

Parameters:
  • actor (Literal['human', 'agent', 'system'])

  • client (Annotated[str, _PydanticGeneralMetadata(pattern='^[a-z0-9][a-z0-9_.:+-]{0,63}$')])

  • revision (int)

  • structure (str)

structure: str
model_config = {'extra': 'forbid'}

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

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

store (Store)

Return type:

APIRouter