kristal.io¶
Main file of kristal.io package.
-
kristal.io.
read_cif
(cif_path, transformer=None)¶ Read content of given CIF file.
Parameters: - cif_path (str or pathlib.Path) – path of the CIF file to be read. Can be given as a str object or pathlib.Path object.
- transformer (a subclass of lark.Transformer.) – an optional transformer object that will be used to transformer the parsed tree. It not given, a default transformer will be used.
Returns: a mapping name -> datablock holding information read from all datablocks present in CIF file.
Return type: A mapping str ->
kristal.io.transform.DataBlock
. The DataBlock objects have the following attributes: - name: name of the datablock - entries: non-loop dataitems - loop: list of all loopsThe non-loop dataitems are stored as
pandas.Series
(can be accessed like a dictionary). The loops are stored aspandas.DataFrame
.