Re: [Rdkit-discuss] How can I escape to this error
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Greg L. <gre...@gm...> - 2010-09-30 04:58:35
|
Dear all, On Wed, Sep 29, 2010 at 10:51 AM, James Davidson <J.D...@ve...> wrote: > > Apologies for resurrecting a rather old thread, but I have been > investigating the Q32010_1beta1 release on a set of commercial amines > (from ACD) and came across the 'hypervalent P' issue as well. > > Greg wrote: >> To continue and try to answer Christian's question: it is currently >> impossible to really work with this hypervalent molecule in the RDKit. >> The only real solution is to tell the RDKit that P is allowed to have >> 7 substituents. If you really want to do this you can edit the file >> $RDBASE/Code/GraphMol/atomic_data.cpp and change the allowed valence >> list for P from "3 5" to "3 5 7". After you do this, you will need to >> rebuild the code. > > With the new release currently in beta, I wondered whether this would be > a good time to consider if the change you suggest above for P should > make it into the release code(?) Having said that, I am expecting that > your comment "it is currently impossible to really work with this > hypervalent molecule in the RDKit" suggests that a robust solution is > not as simple as just changing the allowed valence list... That comment really meant "without changing the allowed valence list it is currently impossible..." > > Anyway, what I was finding from my list of amines was that the > hexafluorophosphate counterion [PF6]- was triggering the error. Not a > particularly common counterion - so I can certainly live without(!) - > but not particularly esoteric either :-) It's easy enough to add the extra valence state so that PF6- (and trisphat, and the like) can be read in. They aren't going to behave optimally (for example the 3D coordinate generation won't necessarily generate nice results), but they also shouldn't lead to too many problems. If there are no objections, I will go ahead and add the extra allowed valence state to P for the next release. Best, -greg |