from openeye.oechem import *
import sys
ifs = oemolistream(sys.argv[1])
for mol in ifs.GetOEMols():
    title = mol.GetTitle()
    title = title.strip()
    name = title + '.mol2'
    ofs = oemolostream(name)
    OEWriteMolecule(ofs, mol)
    ofs.close()
    
ifs.close()


