vibe-sketcherDocumentation

vibesketcher.document.crystal_templates

A library of standard crystals given by space group and asymmetric unit (#231).

Every template is a space-group setting, conventional-cell parameters and an asymmetric unit, expanded by vibesketcher.document.crystal.from_space_group(). The library is therefore also a test of the space-group machinery: each entry records the composition and Z it must produce.

The lattice constants are representative room-temperature experimental values. reference names the source of the structure and its parameters; values a study depends on should be checked against the primary literature for that study’s conditions (temperature, pressure, composition).

Functions

all_templates()

build(name, *, identifier[, cell, a, c, ...])

Expand a template into a crystal, optionally overriding a and c.

describe(template)

find(name)

A template by name, alias or (when unambiguous) formula.

markdown_page()

The manual page listing every template, generated from the data above.

search([query, category])

Templates whose name, title, formula, alias or structure type contains query.

Classes

Surface(miller[, note])

A commonly studied surface of a template, for one-step slabs (#232).

Template(name, title, formula, category, ...)

class vibesketcher.document.crystal_templates.Surface(miller, note='')[source]

Bases: object

A commonly studied surface of a template, for one-step slabs (#232).

Parameters:
miller: tuple[int, int, int]
note: str = ''
class vibesketcher.document.crystal_templates.Template(name: 'str', title: 'str', formula: 'str', category: 'Category', space_group: 'str', a: 'float', sites: 'tuple[Site, ...]', z: 'int', reference: 'str', c: 'float | None' = None, b: 'float | None' = None, beta: 'float | None' = None, aliases: 'tuple[str, ...]'=(), structure_type: 'str' = '', surfaces: 'tuple[Surface, ...]'=(), density: 'float | None' = None, extra: 'dict[str, Any]'=<factory>)[source]

Bases: object

Parameters:
name: str
title: str
formula: str
category: Literal['elements', 'halides', 'oxides', 'semiconductors', 'perovskites', 'spinels', 'layered', 'minerals', 'carbides and nitrides']
space_group: str
a: float
sites: tuple[tuple[str, tuple[float, float, float]], ...]
z: int
reference: str
c: float | None = None
b: float | None = None
beta: float | None = None
aliases: tuple[str, ...] = ()
structure_type: str = ''
surfaces: tuple[Surface, ...] = ()
density: float | None = None

Experimental density in g/cm^3 where checked, for the library test.

extra: dict[str, Any]
parameters()[source]
Return type:

LatticeParameters

vibesketcher.document.crystal_templates.all_templates()[source]
Return type:

list[Template]

vibesketcher.document.crystal_templates.find(name)[source]

A template by name, alias or (when unambiguous) formula.

Parameters:

name (str)

Return type:

Template

vibesketcher.document.crystal_templates.search(query=None, category=None)[source]

Templates whose name, title, formula, alias or structure type contains query.

Parameters:
  • query (str | None)

  • category (str | None)

Return type:

list[Template]

vibesketcher.document.crystal_templates.describe(template)[source]
Parameters:

template (Template)

Return type:

dict[str, Any]

vibesketcher.document.crystal_templates.build(name, *, identifier, cell='primitive', a=None, c=None, species_map=None)[source]

Expand a template into a crystal, optionally overriding a and c.

Parameters:
Return type:

PeriodicStructure

vibesketcher.document.crystal_templates.markdown_page()[source]

The manual page listing every template, generated from the data above.

Return type:

str