Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug relating to this PF6- still can not get Bad Conformer Id #6365

Closed
teltim opened this issue May 12, 2023 · 9 comments
Closed

Bug relating to this PF6- still can not get Bad Conformer Id #6365

teltim opened this issue May 12, 2023 · 9 comments
Labels
Milestone

Comments

@teltim
Copy link

teltim commented May 12, 2023

Relating to this issue PF6- still can not get Bad Conformer Id: #5145
I encounterd the same bug with the recent rdkit

rdkit==2023.3.1

mol=Chem.MolFromSmiles("S(F)(F)(F)(F)F")
mol = Chem.AddHs(mol)
AllChem.EmbedMolecule(mol, randomSeed=42)
conf = mol.GetConformer()
print(conf)

this was not fixed yet?


[15:45:10] UFFTYPER: Unrecognized atom type: S_6+6 (1)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[17], line 14
     12 #AllChem.EmbedMolecule(mol, randomSeed=42)
     13 AllChem.EmbedMultipleConfs(m, numConfs = 10, clearConfs = True, pruneRmsThresh = 0.5)
---> 14 conf = mol.GetConformer()
     15 print(conf)

ValueError: Bad Conformer Id
@teltim teltim added the bug label May 12, 2023
@greglandrum
Copy link
Member

It looks like there's a problem here with the crude approximate bounds which are applied when UFF parameters for an atom cannot be found.

In [24]: m = Chem.MolFromSmiles('S(Cl)(Cl)(Cl)(Cl)(Cl)Cl')

In [26]: ps = rdDistGeom.ETKDGv3()

In [27]: ps.trackFailures = True

In [28]: rdDistGeom.EmbedMolecule(m,ps)
[08:06:29] UFFTYPER: Unrecognized atom type: S_6+6 (0)
Out[28]: -1

In [29]: ps.GetFailureCounts()
Out[29]: (65, 5, 0, 0, 0, 0, 0, 0, 0, 0)

In [30]: ps.useRandomCoords = True

In [31]: rdDistGeom.EmbedMolecule(m,ps)
[08:07:57] UFFTYPER: Unrecognized atom type: S_6+6 (0)
Out[31]: -1

In [32]: ps.GetFailureCounts()
Out[32]: (0, 70, 0, 0, 0, 0, 0, 0, 0, 0)

@greglandrum greglandrum added this to the 2023_03_2 milestone May 13, 2023
@teltim
Copy link
Author

teltim commented May 13, 2023

Thanks for the kind investigation,
Are there any methods that can avoid the error?
there is no method for the time being?

@greglandrum
Copy link
Member

Closed in #6379

@teltim
Copy link
Author

teltim commented May 26, 2023

Closed in #6379

What is the situation of this issue ??

@greglandrum
Copy link
Member

As the comment says: it has been fixed. It will be in the next patch release

@teltim
Copy link
Author

teltim commented May 26, 2023

Thanks for the comment,
Is it possible to download modifiyed version in advance? Best regards.

@greglandrum
Copy link
Member

Thanks for the comment, Is it possible to download modifiyed version in advance? Best regards.

The code is in github, so if you are used to doing your own RDKit builds you can try it now. Otherwise it's probably best to wait for the patch release, which probably comes late next week.

@teltim
Copy link
Author

teltim commented May 27, 2023

Thank you for the comment! it was solved!

@ouielba90
Copy link

Is the patch out (which includes such a fix) already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants