OEReadCIFFile

Attention

This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.

bool OEReadCIFFile(oemolistream &ifs, OEMolBase &mol,
                   unsigned int flavor)

Reads a molecule from the specified input stream, ‘ifs’, in CIF or mmCIF file format. The reader peeks into the file to check for specific tags to determine whether it is a CIF or mmCIF file, given that the extension used is the same. The mmCIF reader can be enforced by setting the OEFormat::MMCIF on the input stream. A number of different format variants are supported by the use of ‘flavor’ parameter from the OEIFlavor::CIF or the OEIFlavor::MMCIF namespace. This function returns true if the operation was successful, and false if an end-of-file was encountered.

Note

The implementation of mmCIF reading is partial, particularly for metadata processing, and is limited in scope to what is needed for Spruce TK. This means that converting to a PDB file will result in loss of header data.