def MyWriteMDLMolecule(ofs, mol): OEClearAromaticFlags(mol) if not OEMDLHasParity(mol): OEMDLPerceiveParity(mol) OEWriteMDLFile(ofs, mol) ofs.write("$$$$\n")