Re: [Rdkit-discuss] Adjusting/neutralising the formal charges on a molecule

2022-04-09 Thread Gianmarco Ghiandoni
Hello Paolo,

Thanks a lot for your replies. Looks like I have finally managed to achieve
what I wanted to do!

Have a good weekend,

Giammy

On Fri, 8 Apr 2022 at 15:37, Paolo Tosco  wrote:

> Hi Gianmarco,
>
> that's a radical cation, not just a cation, so you'll need to adjust the
> number of radical electrons first, then you may neutralize using
> Chem.MolStandardize.rdMolStandardize.Uncharger as documented in the RDKit
> CookBook:
>
> https://www.rdkit.org/docs/Cookbook.html#neutralizing-molecules
>
> from rdkit import Chem
> from rdkit.Chem.MolStandardize import rdMolStandardize
>
> uc = rdMolStandardize.Uncharger()
>
> Chem.MolToSmiles(uc.uncharge(Chem.MolFromSmiles("[CH+]1C2C2CC2C12")))
>
> 'C1CCC2CC3C3CC2C1'
>
>
> Cheers,
> p.
>
>
> On Fri, Apr 8, 2022 at 4:16 PM Gianmarco Ghiandoni 
> wrote:
>
>> Hi all again,
>>
>> I wonder whether there is a way in RDKit to neutralise the charges of
>> compounds such as "[C+]1C2C2CC2C12". Specifically, in my case I am
>> dealing with only carbon sequences.
>>
>> Thanks,
>> --
>> *Gianmarco*
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>

-- 
*Gianmarco*
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Adjusting/neutralising the formal charges on a molecule

2022-04-08 Thread Paolo Tosco
Hi Gianmarco,

that's a radical cation, not just a cation, so you'll need to adjust the
number of radical electrons first, then you may neutralize using
Chem.MolStandardize.rdMolStandardize.Uncharger as documented in the RDKit
CookBook:

https://www.rdkit.org/docs/Cookbook.html#neutralizing-molecules

from rdkit import Chem
from rdkit.Chem.MolStandardize import rdMolStandardize

uc = rdMolStandardize.Uncharger()
Chem.MolToSmiles(uc.uncharge(Chem.MolFromSmiles("[CH+]1C2C2CC2C12")))

'C1CCC2CC3C3CC2C1'


Cheers,
p.


On Fri, Apr 8, 2022 at 4:16 PM Gianmarco Ghiandoni 
wrote:

> Hi all again,
>
> I wonder whether there is a way in RDKit to neutralise the charges of
> compounds such as "[C+]1C2C2CC2C12". Specifically, in my case I am
> dealing with only carbon sequences.
>
> Thanks,
> --
> *Gianmarco*
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Adjusting/neutralising the formal charges on a molecule

2022-04-08 Thread Gianmarco Ghiandoni
Hi all again,

I wonder whether there is a way in RDKit to neutralise the charges of
compounds such as "[C+]1C2C2CC2C12". Specifically, in my case I am
dealing with only carbon sequences.

Thanks,
-- 
*Gianmarco*
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss