Open FanwangM opened 3 years ago
Hi, I'm very sorry for the late reply to this issue. I was only partially able to reproduce the error:
>>> import e3fp.
>>> from e3fp.pipeline import fprints_from_mol, confs_from_smiles
>>> smiles_dict = {"h2": "[HH]", "o2": "O=O", "co": "[C-]#[O+]"}
>>> confgen_params = {'max_energy_diff': 20.0, 'first': 3}
>>> fprint_params = {"bits": 4096, "radius_multiplier": 1.5, "rdkit_invariants": True}
>>> mol = confs_from_smiles(smiles_dict["o2"], "o2", confgen_params=confgen_params)
2022-06-02 02:24:11,639|INFO|Generating conformers for o2.
2022-06-02 02:24:11,648|INFO|Generated 1 conformers for o2.
>>> fprints = fprints_from_mol(mol, fprint_params=fprint_params)
2022-06-02 02:24:19,635|INFO|Generating fingerprints for o2.
2022-06-02 02:24:19,640|INFO|Generated 1 fingerprints for o2.
>>> mol = confs_from_smiles(smiles_dict["co"], "co", confgen_params=confgen_params)
2022-06-02 02:24:29,416|INFO|Generating conformers for co.
2022-06-02 02:24:29,422|INFO|Generated 1 conformers for co.
>>> fprints = fprints_from_mol(mol, fprint_params=fprint_params)
2022-06-02 02:24:31,869|INFO|Generating fingerprints for co.
2022-06-02 02:24:31,873|INFO|Generated 1 fingerprints for co.
>>> mol = confs_from_smiles(smiles_dict["h2"], "h2", confgen_params=confgen_params)
[02:24:41] WARNING: not removing hydrogen atom without neighbors
2022-06-02 02:24:41,237|INFO|Generating conformers for h2.
2022-06-02 02:24:41,244|INFO|Generated 1 conformers for h2.
>>> fprints = fprints_from_mol(mol, fprint_params=fprint_params)
2022-06-02 02:24:42,228|INFO|Generating fingerprints for h2.
2022-06-02 02:24:42,229|ERROR|Error generating fingerprints for h2.
Traceback (most recent call last):
...
i.e. I had no issues fingerprinting O2 and CO, just H2.
In general, diatomic molecules should be supported by e3fp. If I had to guess, H2 fails because we never use atomic coordinates of hydrogens for fingerprinting. But for a molecule that is pure hydrogen (i.e. just this molecule and protons), this would of course cause fingerprinting to fail. Here we could either
Thanks for making this nice tool for the community.
I got problems with computing the e3fp fingerprints for diatomic molecules, such as H2, O2 and CO. Here is the corresponding error information
Do we have a fix for this? Thank you!