How do I use the molecule_matcher function?

It seems that even though I have downloaded both openbabel and pybel, I still can’t use the molecule_matcher function. Did I do anything wrong

Hi @Jump_viriyavaree,

This error is most likely due to a problem in how you’ve constructed your molecule1 object. Could you please show how you’ve defined molecule1?

Thanks,
Sam

Hi Sam,

I figured it out. There are two main problems. The first one is that I use the ‘Imolecule’ to construct the molecule. The second one is that the latest version of open babel has bugged in it.

Jump

Hi Jump,

Glad to hear it. Yes, I suggest you stick with Openbabel 2.4.1 as the latest version 3.0 seems to have some issues, as you’ve seen. Please let me know if you encounter any further problems.

Thanks,
Sam

Hello I still have a problem with this molecule matcher. I am using openbabel3.1.1.1 and I wish to find (pull out) unique molecules from files of different molecules.
When I try to match two molecule to find out whether they are identical (MoleculeMatcher.fit(mol1, mol2 )) I get the following error
MoleculeMatcher.fit(mol1, mol2 )
TypeError: fit() missing 1 required positional argument: ‘mol2’

Can you please provide me with some help on how to fix this?
Many thanks