Re: [Rdkit-discuss] Having trouble getting RDKIT to recognize LiAsF6
Hi Yoolhee If this is something you need fixed *now*, you have access to the RDKit source code and you're confident to build a new version of RDKit, then try the following. 1. from the root folder of the RDkit distribution, find the folder Code/GraphMol/ 2. in that folder, copy atomic_data.cpp to atomic_data.cpp.bak (so you can restore things if necessary) 3. edit atomic_data.cpp as follows - find the line for phosphorus that starts '15 P' (probably line 42 in the file) - note that the line ends '3 5 7 \n \' - find the line for arsenic, starting '33 As' (probably line 60) - this line ends '3 5 \n \' - change the line by inserting 7 immediately after the 5 (that's a tab character) - the end of the arsenic line should now look like the end of the phosphorus line - save the file 4. rebuild RDKit I wouldn't recommend trying this if you haven't previously built RDKit from source. @Greg - is it worth adding higher valence states for the halogens as well while fixing As and Sb? At the moment we have Cl 1 Br 1 I 1 2 5 Shouldn't these all be '1 3 5 7' ? Best regards, Chris On 24 November 2017 at 21:31, Yoolhee Kim wrote: > Chris, > > Thank you very much for your reply! I'm not very familiar with RDKIT, and > I was wondering if you could elaborate how to fix the problem of adding '7' > in the As entry so that the valence state is recognized. > > Best regards, > Yoolhee Kim > > On Tue, Nov 21, 2017 at 8:22 AM, Chris Earnshaw > wrote: > >> Hi >> >> The entries for P and As in RDKit's atomic_data.cpp are - >> 15 P 0.750.892.0830.974 5 31 >> 30.97376163 3 5 7 >> 33 As 1.211.2 1.8574.922 5 75 >> 74.9215965 3 5 >> >> So the required 'connectivities' for PF6- are present in the file >> (final 3 values, '7' being the relevant one here), but not for As. I'm >> not quite sure why this should be so as the phosphorus is P(V) in PF6, >> but this appears to be the cause. You'll have to add the '7' in the As >> entry and rebuild RDKit to allow AsF6- to be processed. A similar fix >> would be needed for antimony too. Someone please let me know if >> there's a more convenient solution! >> >> There are similar issues for the halogens as well. Only iodine has >> values > 1, so by default it's not possible to construct e.g. >> chlorates, or bromates, and no perhalates are allowed. >> >> Regards, >> Chris Earnshaw >> >> On 20 November 2017 at 23:03, Yoolhee Kim >> wrote: >> > Hello, >> > >> > I'm trying to get RDKIT to recognize LiAsF6 from the SMILES Formula >> > "[Li+].F[As-](F)(F)(F)(F)F" but it seems that RDKIT will not read it >> > correctly and is unable to create a molecule object. >> > >> > RDKIT is able to understand LiPF6 from the SMILES formula >> > "[Li+].F[P-](F)(F)(F)(F)F" so I tried using that and replacing P with As >> > using both replaceatom and replacesubstruct functions, but that had some >> > issues as well. >> > >> > Has anyone faced a similar issue or have any suggestions? >> > >> > Thanks! >> > >> > -Yoolhee >> > >> > >> -- >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > ___ >> > Rdkit-discuss mailing list >> > Rdkit-discuss@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> > >> > > > > -- > Yoolhee Kim > M.S. in Energy Science Technology and Policy > Carnegie Mellon University > (714) 326-5820 | yoolh...@andrew.cmu.edu > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Having trouble getting RDKIT to recognize LiAsF6
On Fri, Nov 24, 2017 at 10:32 PM, Yoolhee Kim wrote: > > Thank you for your reply! > > I'm not super familiar with RDKIT... could you please elaborate on how to > fix this problem? > > Ah, sorry, it's something that needs to be fixed in the C++ code. The bug report is filed: https://github.com/rdkit/rdkit/issues/1668 and a fix is on the way. -greg -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Having trouble getting RDKIT to recognize LiAsF6
This is happening because the code doesn't recognize 7 as a valid valence state of As. This is, as you note, inconsistent with how P is handled, which doesn't make a lot of sense. Fortunately, it's a fixable problem. :-) On Tue, Nov 21, 2017 at 12:03 AM, Yoolhee Kim wrote: > Hello, > > I'm trying to get RDKIT to recognize LiAsF6 from the SMILES Formula > "[Li+].F[As-](F)(F)(F)(F)F" but it seems that RDKIT will not read it > correctly and is unable to create a molecule object. > > RDKIT is able to understand LiPF6 from the SMILES formula > "[Li+].F[P-](F)(F)(F)(F)F" so I tried using that and replacing P with As > using both replaceatom and replacesubstruct functions, but that had some > issues as well. > > Has anyone faced a similar issue or have any suggestions? > > Thanks! > > -Yoolhee > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Having trouble getting RDKIT to recognize LiAsF6
Hi A quick follow-up to my last message, w.r.t. halogens. The issue is not that higher oxidation state halogen ions can't be constructed at all, but they end up with bizarre charges on the halogen which are frequently not recognised by other software. Chris On 21 November 2017 at 08:22, Chris Earnshaw wrote: > Hi > > The entries for P and As in RDKit's atomic_data.cpp are - > 15 P 0.750.892.0830.974 5 31 > 30.97376163 3 5 7 > 33 As 1.211.2 1.8574.922 5 75 > 74.9215965 3 5 > > So the required 'connectivities' for PF6- are present in the file > (final 3 values, '7' being the relevant one here), but not for As. I'm > not quite sure why this should be so as the phosphorus is P(V) in PF6, > but this appears to be the cause. You'll have to add the '7' in the As > entry and rebuild RDKit to allow AsF6- to be processed. A similar fix > would be needed for antimony too. Someone please let me know if > there's a more convenient solution! > > There are similar issues for the halogens as well. Only iodine has > values > 1, so by default it's not possible to construct e.g. > chlorates, or bromates, and no perhalates are allowed. > > Regards, > Chris Earnshaw > > On 20 November 2017 at 23:03, Yoolhee Kim wrote: >> Hello, >> >> I'm trying to get RDKIT to recognize LiAsF6 from the SMILES Formula >> "[Li+].F[As-](F)(F)(F)(F)F" but it seems that RDKIT will not read it >> correctly and is unable to create a molecule object. >> >> RDKIT is able to understand LiPF6 from the SMILES formula >> "[Li+].F[P-](F)(F)(F)(F)F" so I tried using that and replacing P with As >> using both replaceatom and replacesubstruct functions, but that had some >> issues as well. >> >> Has anyone faced a similar issue or have any suggestions? >> >> Thanks! >> >> -Yoolhee >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss