# Basic functions

PDBx/mmCIF Python dictionary resources.

All of the code in this repository is original based on http://mmcif.wwpdb.org/. Specifically, this code is directly derived from the pdbx code linked from PDBx Python Parser Examples and Tutorial.

See PDBx Python Parser Examples and Tutorial for more information about this package, including examples.

pdbx.dump(datacontainers, fobj)

  Write a list of objects to a CIF file.

  Parameters

    - datacontainers (list) – a list of `DataContainer` objects # noqa E501

    - fobj (file) – a file object ready for writing

pdbx.dumps(datacontainers) → str

  Serialize a list of objects to a CIF-formatted string.

  Parameters

    datacontainers (list) – list of `DataContainer` objects # noqa E501

  Returns

    CIF-formatted string

pdbx.load(fobj) → list

  Parse a CIF file.

  Parameters

    fobj (file) – file object ready for reading

  Returns

    a list of `DataContainer` objects

pdbx.loads(text) → list

  Parse a CIF string.

  Parameters

    s (str) – string with CIF data

  Returns

    a list of `DataContainer` objects