vibe-sketcherDocumentation

vibesketcher.server.symmetry_ops

REST routes for adopting symmetry, enantiomorphs and subgroup descent (#199).

Previews read the current document and name its revision; every mutation names the revision it read (409 when stale) and is recorded as an edit. .../symmetry/undo reverts the last adoption of a structure, or removes an enantiomorph or subgroup structure that is unchanged since it was derived. .../symmetry/drop-displacements drops measured displacement tensors with a recorded reason, which edits that cannot transform them require.

Functions

router(store)

Classes

AdoptOptions(*[, symprec, idealize, ...])

AdoptRequest(*[, actor, client, symprec, ...])

DescendOptions(*, transformation, subgroup)

DescendRequest(*[, actor, client, symprec])

DropDisplacementsRequest(*[, actor, client])

EnantiomorphOptions(*[, symprec, ...])

EnantiomorphRequest(*[, actor, client, ...])

class vibesketcher.server.symmetry_ops.AdoptOptions(*, symprec=0.001, idealize=False, diagnostic_symprec=0.1)[source]

Bases: BaseModel

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

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

symprec: float
idealize: bool
diagnostic_symprec: float
class vibesketcher.server.symmetry_ops.AdoptRequest(*, actor='agent', client='rest', revision, symprec=0.001, idealize=False, diagnostic_symprec=0.1, source_sha256)[source]

Bases: RevisionRequest

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

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

  • revision (int)

  • symprec (Annotated[float, Gt(gt=0), Le(le=1)])

  • idealize (bool)

  • diagnostic_symprec (Annotated[float, Gt(gt=0), Le(le=1)])

  • source_sha256 (Annotated[str, _PydanticGeneralMetadata(pattern='^[0-9a-f]{64}$')])

symprec: float
idealize: bool
diagnostic_symprec: float
source_sha256: str

refuses when the structure changed since.

Type:

The preview’s source_sha256

model_config = {'extra': 'forbid'}

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

class vibesketcher.server.symmetry_ops.EnantiomorphOptions(*, symprec=0.001, diagnostic_symprec=0.1)[source]

Bases: BaseModel

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

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

symprec: float
diagnostic_symprec: float
class vibesketcher.server.symmetry_ops.EnantiomorphRequest(*, actor='agent', client='rest', revision, identifier, symprec=0.001, diagnostic_symprec=0.1)[source]

Bases: RevisionRequest

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

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

  • revision (int)

  • identifier (Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z][A-Za-z0-9_-]{0,63}$')])

  • symprec (Annotated[float, Gt(gt=0), Le(le=1)])

  • diagnostic_symprec (Annotated[float, Gt(gt=0), Le(le=1)])

identifier: str
symprec: float
diagnostic_symprec: float
model_config = {'extra': 'forbid'}

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

class vibesketcher.server.symmetry_ops.DescendOptions(*, transformation, subgroup, symprec=0.001)[source]

Bases: BaseModel

Parameters:
  • transformation (Annotated[str, MinLen(min_length=5), MaxLen(max_length=200)])

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

  • symprec (Annotated[float, Gt(gt=0), Le(le=1)])

model_config = {'extra': 'forbid'}

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

transformation: str
subgroup: str
symprec: float
class vibesketcher.server.symmetry_ops.DescendRequest(*, actor='agent', client='rest', revision, identifier, transformation, subgroup, symprec=0.001)[source]

Bases: RevisionRequest

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

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

  • revision (int)

  • identifier (Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z][A-Za-z0-9_-]{0,63}$')])

  • transformation (Annotated[str, MinLen(min_length=5), MaxLen(max_length=200)])

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

  • symprec (Annotated[float, Gt(gt=0), Le(le=1)])

identifier: str
transformation: str
subgroup: str
symprec: float
model_config = {'extra': 'forbid'}

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

class vibesketcher.server.symmetry_ops.DropDisplacementsRequest(*, actor='agent', client='rest', revision, reason)[source]

Bases: RevisionRequest

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

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

  • revision (int)

  • reason (Annotated[str, MinLen(min_length=1), MaxLen(max_length=500)])

reason: str

Recorded in provenance["displacement_parameters_dropped"].

model_config = {'extra': 'forbid'}

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

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

store (Store)

Return type:

APIRouter