the code :
----------------------------
from rdkit import Chem
from rdkit.Chem.Draw import IPythonConsole
sa = 'CC(C)(C)c1ccc(cc1)C(O)CCCN1CCC(CC1)C(O)(c1ccccc1)c1ccccc1'
mol =Chem.MolFromSmarts(sa)
mol
-----------------------------

The error information:

RDKit ERROR: [16:07:15]
RDKit ERROR:
RDKit ERROR: ****
RDKit ERROR: Pre-condition Violation
RDKit ERROR: getExplicitValence() called without call to calcExplicitValence()
RDKit ERROR: Violation occurred on line 162 in file
....soft/rdkit/Code/GraphMol/Atom.cpp
RDKit ERROR: Failed Expression: d_explicitValence > -1
RDKit ERROR: ****
RDKit ERROR:
RDKit ERROR: [16:07:15] Can't kekulize mol.  Unkekulized atoms: 4 5 6 7 8 9
RDKit ERROR:


-----------------------


On Wed, Jul 12, 2017 at 2:27 PM, Greg Landrum <greg.land...@gmail.com>
wrote:

>
>
> On Tue, Jul 11, 2017 at 6:53 PM, Chicago Ji <chicago...@gmail.com> wrote:
>
>>  Thanks a lot for your code.
>>
>> I met another error. I don't know whether it's Normal.
>>
>> I have a correct SMILES, and read it through MolFromSmarts:
>>
>> --------------------------------------------------------
>> sa = 'CC(C)(C)c1ccc(cc1)C(O)CCCN1CCC(CC1)C(O)(c1ccccc1)c1ccccc1'
>> Chem.MolFromSmarts(sa)
>> --------------------------------------------------------
>>
>>
>> Is there something wrong with my input?
>>
>
> Looks fine to me:
>
> In [9]: sa = 'CC(C)(C)c1ccc(cc1)C(O)CCCN1CCC(CC1)C(O)(c1ccccc1)c1ccccc1'
>
> In [10]: m = Chem.MolFromSmarts(sa)
>
> In [11]: m.GetNumAtoms()
> Out[11]: 35
>
>
> What error do you see?
>
> -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

Reply via email to