Hi Colin,
The RDkit outputs charge information to mol blocks using the CHG line:

In [3]: m = Chem.MolFromSmiles('C[NH3+]')

In [4]: print(Chem.MolToMolBlock(m))

     RDKit          2D

  2  1  0  0  0  0  0  0  0  0999 V2000
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.2990    0.7500    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
M  CHG  1   2   1
M  END


I expect that you will find one of those in your mol file and that it
should be properly read in by other tools.
Is this not the case for you?

Best,
-greg



On Tue, Sep 25, 2018 at 4:39 PM Colin Bournez <colin.bour...@univ-orleans.fr>
wrote:

> Hey everyone,
>
> I have a question concerning the Chem.MolToMolFile() function.
> When I open this file containing a N+ (here is the line corresponding in
> the mol file) :
>
>    11.3700    3.4360  -11.8300 N   0  3  0  0  0  0  0  0  0  0  0  0
>
> And I just save it back withotu any modification, the line is then :
>
>      11.3700    3.4360  -11.8300 N   0  0  0  0  0  0  0  0  0  0  0  0
>
> The problem is that for some software this mol file causes trouble and the
> N+ is transformed to N with 4 bonds.
> I tried several tricks but I was not able to save it as the original line,
> does anyone has suggestion?
>
> Thanks,
>
> --
> *Colin Bournez*
> PhD Student, Structural Bioinformatics & Chemoinformatics
> Institut de Chimie Organique et Analytique (ICOA), UMR CNRS-Université
> d'Orléans 7311
> Rue de Chartres, 45067 Orléans, France
> T. +33 238 494 577
> _______________________________________________
> 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

Reply via email to