vibe-sketcherDocumentation

vibesketcher.server.porous_carbon

REST routes for net-derived porous and negative-curvature carbon models (#204).

Building goes through POST /api/documents/{id}/periodic/build with a kind: porous_carbon recipe (revision-checked, recorded as an edit and undone like any build). These routes list the model plan, preview a build and report the graph checks of a stored structure; none changes a document.

Functions

router(store)

Classes

PorousCarbonPreviewRequest(*, recipe[, ...])

PorousCarbonReportRequest(*, structure[, ...])

class vibesketcher.server.porous_carbon.PorousCarbonPreviewRequest(*, 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).

class vibesketcher.server.porous_carbon.PorousCarbonReportRequest(*, structure, max_ring_size=12, probe_radius=None, probe_species='He')[source]

Bases: BaseModel

Parameters:
  • structure (Annotated[str, MinLen(min_length=1), MaxLen(max_length=64)])

  • max_ring_size (Annotated[int, Ge(ge=6), Le(le=16)])

  • probe_radius (Annotated[float | None, Ge(ge=0), Le(le=10), AllowInfNan(allow_inf_nan=False)])

  • probe_species (Annotated[str, MinLen(min_length=1), MaxLen(max_length=40)])

model_config = {'extra': 'forbid'}

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

structure: str
max_ring_size: int
probe_radius: float | None

Plan (never run) a porosity analysis with this probe radius (angstrom).

probe_species: str
vibesketcher.server.porous_carbon.router(store)[source]
Parameters:

store (Store)

Return type:

APIRouter