OEWriteMDLFile

OEWriteMDLFile(ofs: oemolostream, mol: Union[OEGraphMol,OEMol,OEQMol],
               flavor: int) -> None

Writes the molecule as a MDL mol format file to the output stream ‘ofs’. A number of different MDL format variants are supported by the use of the ‘flavor’ parameter from the OEOFlavor_MDL namespace.

By default, only molecules with more than 999 atoms or enhanced stereo groups will be written in V3000 format. The OEOFlavor_MDL_MV30 flavor can be used to force all molecules to be written in the V3000 format.