# Input-output classes

## `reader`

PDBx/mmCIF dictionary and data file parser.

Note

Acknowledgements:

The tokenizer used in this module is modeled after the clever parser design used in the PyMMLIB package.

PyMMLib Development Group:

Authors: Ethan Merritt: merritt@u.washington.edu, Jay Painter: jay.painter@gmail.com

See: http://pymmlib.sourceforge.net/

class pdbx.reader.PdbxReader(input_file)

  PDBx reader for data files and dictionaries.

  read(container_list)

    Appends to the input list of definition and data containers.

    Parameters

      container_list (list) – list of `ContainerBase` containers to append to.

## `writer`

Classes for writing data and dictionary containers in PDBx/mmCIF format.

class pdbx.writer.PdbxWriter(output_file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)

  Write PDBx data files or dictionaries. Use the input container or container list.

  set_row_partition(num_rows)

    Maximum number of rows checked for value length and format.

    Parameters

      num_rows (int) – maximum number of rows

  write(container_list)

    Write out a list of containers.

    Parameters

      container_list (list) – list of `ContainerBase` objects to write.

  write_container(container)

    Write out information for an individual container.

    Parameters

      container (`ContainerBase`) – container to write