The ihm.dumper Python module

Utility classes to dump out information in mmCIF or BinaryCIF format

class ihm.dumper.Dumper[source]

Base class for helpers to dump output to mmCIF or BinaryCIF. See write().

dump(system, writer)[source]

Use writer to write information about system to mmCIF or BinaryCIF.


Called for all dumpers prior to dump(). This can be used to assign numeric IDs to objects, check for sanity, etc.

ihm.dumper.write(fh, systems, format='mmCIF', dumpers=[])[source]

Write out all systems to the file handle fh. Files can be written in either the text-based mmCIF format or the BinaryCIF format. The BinaryCIF writer needs the msgpack Python module to function.

  • fh (file) – The file handle to write to.
  • systems (list) – The list of ihm.System objects to write.
  • format (str) – The format of the file. This can be ‘mmCIF’ (the default) for the (text-based) mmCIF format or ‘BCIF’ for BinaryCIF.
  • dumpers (list) – A list of Dumper classes (not objects). These can be used to add extra categories to the file.