def MyReadMDLMolecule(ifs, mol):
mol.Clear()
if OEReadMDLFile(ifs, mol):
OEFindRingAtomsAndBonds(mol)
OEAssignAromaticFlags(mol)
return 1
mol.Clear()
return 0
def MyWriteMDLMolecule(ofs, mol):
OEClearAromaticFlags(mol)
if not OEMDLHasParity(mol):
OEMDLPerceiveParity(mol)
OEWriteMDLFile(ofs, mol)
ofs.write("$$$$\n")