"""
Example 2: Extract molecule from a molecule file
"""
from openeye.oechem import oemolistream, OEThrow, OEMol, OEReadMolecule

ifs = oemolistream()
filename = "<your_molecule_filename>"

if not ifs.open(filename):
    OEThrow.Fatal(f"Unable to open file {filename}")

mol = OEMol()
OEReadMolecule(ifs, mol)
ifs.close()
