Main file of package., transformer=None)

Read content of given CIF file.

  • 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.

a mapping name -> datablock holding information read from all datablocks present in CIF file.

Return type:

A mapping str -> The DataBlock objects have the following attributes: - name: name of the datablock - entries: non-loop dataitems - loop: list of all loops

The non-loop dataitems are stored as pandas.Series (can be accessed like a dictionary). The loops are stored as pandas.DataFrame.