John,

Thanks. I meet a couple of problems with the code you suggested.

Input smiles:

[O-][Cl+3]([O-])([O-])O

Output smiles:
 O[Cl+3](O)(O)O



First of, the input smiles is not charged, so the neutralizing function is
supposed to do nothing. Could you please help me to know whether there is a
function in RDKit to get the charge state of a compound?

Secondly, the out smiles has some problem
If I go to Inchi format

>>> mol = Chem.MolFromSmiles("O[Cl+3](O)(O)O")
>>> Chem.MolToInchi(mol)
'InChI=1S/ClH4O4/c2-1(3,4)5/h2-5H/q+3'
>>> mol = Chem.MolFromInchi("InChI=1S/ClH4O4/c2-1(3,4)5/h2-5H/q+3")
[14:59:03] Explicit valence for atom # 0 Cl, 3, is greater than permitted
[14:59:03] ERROR: Sanitization error: Explicit valence for atom # 0 Cl, 3,
is greater than permitted
>>>


I got an error. Is there a way to solve this problem?

Thanks.

Yingfeng



On Fri, Dec 20, 2013 at 5:04 AM, John May <john.wilkinson...@gmail.com>wrote:

> Hi Yingfeng,
>
> You should use the NeutralisingCompounds on the page Markus linked:
> http://www.rdkit.org/docs/Cookbook.html. This version has different
> SMARTS for neutralising Tetrazoles.
>
> In the version you linked:
>
> # Tetrazoles
>         Chem.MolFromSmarts('[n-]'):                     
> Chem.MolFromSmarts('n'),
>
> In the cookbook version:
>
> # Tetrazoles
>         ('[n-]','[nH]'),
>
>
> J
>
> On 19 Dec 2013, at 20:59, Yingfeng Wang <ywang...@gmail.com> wrote:
>
> The original compound is
> CCCc1nc2ccc(Cl)nc2n1-c1ccc(-c2ccc(-c3ccccc3Cc3nn[n-]n3)cc2)cc1
>
> I used the code at the following link
>
> http://code.google.com/p/rdkit/wiki/NeutralisingCompounds
>
> , and got the neutralized compound
>
> CCCc1nc2ccc(Cl)nc2n1-c1ccc(-c2ccc(-c3ccccc3Cc3nnnn3)cc2)cc1
>
> But it has a problem,
>
> >>> mol =
> Chem.MolFromSmiles("CCCc1nc2ccc(Cl)nc2n1-c1ccc(-c2ccc(-c3ccccc3Cc3nnnn3)cc2)cc1")
> [15:53:43] Can't kekulize mol
>
> Could you please help me to check whether there is a workaround?
>
> Thanks.
>
> Yingfeng
>
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to