vibesketcher.document.cif_import¶
Experimental CIF import with space-group expansion (#228).
A small pure-Python CIF 1.1 reader: it needs no compiled dependency, so it works wherever the sketcher does (Gemmi does not install on Python 3.15 yet, #210). It reads the cell with its standard uncertainties, the symmetry operations (or, without them, the Hall or Hermann-Mauguin symbol), the atom sites with occupancies and disorder groups, and expands the asymmetric unit to the full conventional cell. Partial occupancy is refused unless the caller chooses how to resolve it; every choice and merge is recorded.
The lossless P1 interchange in vibesketcher.document.periodic is
unchanged; this module is for files from experiments and databases.
Syntax: S. R. Hall, F. H. Allen, I. D. Brown, Acta Cryst. A47, 655 (1991).
Functions
|
A copy of |
|
The full conventional cell of one CIF data block (#228). |
|
A CIF number and its standard uncertainty, e.g. 4.7602(3) -> (4.7602, 0.0003). |
|
The data blocks of a CIF 1.1 text (tags lower-cased). |
Classes
|
- class vibesketcher.document.cif_import.Block(name: 'str', items: 'dict[str, str]', loops: 'list[dict[str, list[str]]]')[source]¶
Bases:
object
- vibesketcher.document.cif_import.parse(text)[source]¶
The data blocks of a CIF 1.1 text (tags lower-cased).
- vibesketcher.document.cif_import.number(text, tag)[source]¶
A CIF number and its standard uncertainty, e.g. 4.7602(3) -> (4.7602, 0.0003).
- vibesketcher.document.cif_import.import_cif(text, *, identifier, block=None, disorder='refuse', disorder_group=None, setting=None, merge_tolerance=0.01, occupancy_tolerance=0.01)[source]¶
The full conventional cell of one CIF data block (#228).
disorderdecides partially occupied and disordered sites:"refuse"(default),"group"keepsdisorder_groupand drops the other groups,"majority"keeps the most occupied group of each disorder assembly and, on a mixed or partially vacant site, the most occupied species. Kept sites are written fully occupied; every decision is recorded.settingnames the space-group setting when the file has no operations and its symbol is ambiguous (e.g."Fd-3m:1"). Images closer thanmerge_toleranceangstrom are merged.